A ped on the server.
Server-side peds are mostly read-only: the game logic that drives them runs on the client that owns them. Position, seating and weapons can be set from here; animations, tasks and health cannot, and have to be asked of the owning client via an event.
var ped = player.ped;
if (ped != null && ped.isInVehicle) {
trace('${player.name} is driving ${ped.currentVehicle.plate}');
}Static methods
staticcreate(model:Hash, position:Vector3, heading:Float = 0.0, pedType:Int = 4):Ped
Spawns a ped.
Blocks the calling coroutine until the ped is networked: a
server-created entity is orphaned, with no network ID, until a client
comes into scope for it. Returns null if that does not happen within
the timeout.
Constructor
Variables
read onlypedMaxHealth:Int
Maximum health, which for peds is tracked separately from Entity.maxHealth.
Methods
inlinewarpIntoVehicle(vehicle:Vehicle, seat:Int = -1):Void
Puts the ped straight into a seat. -1 is the driver's.