class LocalPlayer
package fivem.client.core
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
Static methods
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.