Object Handles
Fields and methods available on Player, Vehicle, Object and TextDraw values.
Most code calls natives by name. Some values also carry fields and methods: a Player, Vehicle, Object or TextDraw handle can be read and written with .field and called with .method(...). These are thin, typed wrappers over the same natives; use whichever reads better in your code.
Note Native calls are the primary API. Handle fields and methods are a convenience layer; every method row shows the native it delegates to.
knight Copy
player::spawn () {
let p = PlayerV (playerid);
p.health = 100.0 ;
p.message ("Welcome" );
let pos = p.get_position ();
SetPlayerHealth (playerid, 100.0 );
SendClientMessage (playerid, "Welcome" );
let pos2 = GetPlayerPos (playerid);
};
Broadcast
The broadcast name is a handle-like helper for server-wide output.
Player fields 22
Field Access Player.armorread/write Player.armourread/write Player.colorread/write Player.colourread/write Player.connectedread Player.facing_angleread/write Player.healthread/write Player.idread Player.interiorread/write Player.ipread Player.moneyread/write Player.nameread/write Player.pingread Player.scoreread/write Player.skinread/write Player.teamread/write Player.vehicleread Player.virtual_worldread/write Player.weaponread/write Player.xread Player.yread Player.zread
Player methods 38
Method Delegates to apply_animation(string, string, float, bool, bool, bool, bool, int)ApplyPlayerAnimation apply_animation2(string, string, float, bool, bool, bool, bool, int)ApplyPlayerAnimation ban()Ban ban_with_reason(string)BanPlayer clear_animations()ClearPlayerAnimation disable_checkpoint()DisablePlayerCheckpoint distance_to(player) -> float__dist_player force_class_selection()ForceClassSelection get_position() -> array__getpos give_weapon(int, int)GivePlayerWeapon hide_textdraw(textdraw)TextDrawHideForPlayer is_admin() -> boolIsPlayerAdmin kick()Kick kick_with_reason(string)KickPlayer message(string, int)SendClientMessage reset_money()ResetPlayerMoney reset_weapons()ResetPlayerWeapons send_message(string)SendClientMessage send_score(int)SetPlayerScore set_admin(bool)SetPlayerAdmin set_armor(float)SetPlayerArmour set_armour(float)SetPlayerArmour set_camera_behind()SetPlayerCameraBehindPlayer set_camera_look_at(float, float, float, int)SetPlayerCameraLookAt set_camera_pos(float, float, float)SetPlayerCameraPos set_checkpoint(float, float, float, float)SetPlayerCheckpoint set_color(int)SetPlayerColor set_health(float)SetPlayerHealth set_interior(int)SetPlayerInterior set_map_icon(int, float, float, float, int, int, int)SetPlayerMapIcon set_money(int)GivePlayerMoney set_position(float, float, float)SetPlayerPos set_skin(int)SetPlayerSkin set_special_action(int)SetPlayerSpecialAction set_team(int)SetPlayerTeam set_virtual_world(int)SetPlayerVirtualWorld show_dialog(int, int, string, string, string, string)ShowPlayerDialog show_textdraw(textdraw)TextDrawShowForPlayer
Vehicle fields 7
Field Access Vehicle.angleread/write Vehicle.healthread/write Vehicle.idread Vehicle.modelread Vehicle.xread Vehicle.yread Vehicle.zread
Vehicle methods 6
Method Delegates to destroy()DestroyVehicle repair()RepairVehicle set_color(int, int)ChangeVehicleColor set_health(float)SetVehicleHealth set_number_plate(string)SetVehicleNumberPlate set_position(float, float, float)SetVehiclePos
Object fields 5
Field Access Object.idread Object.modelread Object.xread Object.yread Object.zread
Object methods 6
Method Delegates to destroy()DestroyObject move(float, float, float, float, float, float, float)MoveObject set_material(int, int, string, string, int)SetObjectMaterial set_position(float, float, float)SetObjectPos set_rotation(float, float, float)SetObjectRotation stop()StopObject
TextDraw fields 1
Field Access TextDraw.idread
TextDraw methods 3
Method Delegates to destroy()TextDrawDestroy set_string(string)TextDrawSetString show()TextDrawShowForPlayer
Broadcast methods 2
Method Delegates to log(string)Log message(string)SendClientMessageToAll
Rules
Rule Detail Fields Reading returns the current value; writing calls the matching setter Read-only fields Shown with access read (e.g. ping, vehicle) Methods Each method is documented with the native it delegates to Null handles Calling a method on a null handle returns the default value; check != null first