The player at this keyboard — the one entity client code touches most.

Everything here is a static shortcut for Player.local(), avoiding both the wrapper allocation and the repeated PlayerId() call in per-frame code:

Thread.everyFrame(() -> {
    if (LocalPlayer.coords().distance(shopPoint) < 2.0) drawPrompt();
});

ped() deliberately re-reads PlayerPedId() on every call rather than caching. The handle changes whenever the player respawns or their model is swapped, and a cached one silently stops working after either.

Static variables

staticwrite onlyinvincible:Bool

staticwantedLevel:Int

Static methods

staticinlineasPlayer():Player

As a Player, for the properties that aren't shortcut here.

staticinlinecoords():Vector3

staticinlineheading():Float

staticinlineid():Int

The client-local player index.

staticinlineisDead():Bool

staticinlineisInVehicle():Bool

staticinlinename():String

staticinlineped():Ped

The player's current character. Never cache the result.

staticinlinepedHandle():Int

The raw ped handle, for passing straight into a native.

staticinlineserverId():Int

The server-assigned ID — the value to send in events.

staticsetModel(model:Hash):Bool

Swaps the player's character model, streaming it in first.

The ped handle changes as a result, so anything holding the old one must re-read it. Returns false if the model couldn't be loaded.

staticinlinestate():StateBag

The player's replicated state bag.

staticteleport(position:Vector3, ?heading:Float):Void

Teleports the player, waiting for collision at the destination first so they don't drop through unloaded ground.

staticinlinevehicle():Vehicle

The vehicle the player is in, or null when on foot.