Handle Objek
Field dan method pada nilai Player, Vehicle, Object, dan TextDraw.
Sebagian besar kode memanggil native berdasarkan nama. Beberapa nilai juga punya field dan method: handle Player, Vehicle, Object, atau TextDraw bisa dibaca/ditulis dengan .field dan dipanggil dengan .method(...). Semuanya pembungkus bertipe atas native yang sama; pakai mana yang lebih mudah dibaca.
Note Pemanggilan native adalah API utama. Field dan method handle hanyalah lapisan kenyamanan; setiap baris method menunjukkan native yang dipanggil.
knight Copy
player::spawn () {
let p = PlayerV (playerid);
p.health = 100.0 ;
p.message ("Selamat datang" );
let pos = p.get_position ();
};
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
Aturan
Aturan Detail Field Membaca mengembalikan nilai saat ini; menulis memanggil setter-nya Field read-only Ditandai akses read (mis. ping, vehicle) Method Setiap method mencantumkan native yang dipanggil Handle null Method pada handle null mengembalikan nilai default; cek != null dulu