a_samp.incSummary | | | | | | | Print some text to the console. | | Print a string produced according to the formatting string format. | | Produces a string according to the formatting string format and stores the result to output[]. | | Send a message to a single client. | | Send a message to all clients spawned. | | Set the game text for all players spawned. | | Set the game text for a single player. | | Set off a timer to trigger a function. | | Kill a timer that has been set using SetTimer. | | Returns the number of milliseconds since the OS was started. | | | | Sets the game mode title that is displayed in the server browser. | | Sets the number of teams allowed. | | Makes a player model avaliable for selection, define its spawn point and its weapons including ammunition. | | Add a vehicle at a given spawn point with the defined colors. | | Add a pickup item at given coordinates. | | Set whether name tags should be shown or not. | | Set whether players markers (on the map) should be shown or not. | | | | Set the game clock to a certain time and freeze it. | | Gets the name of a weapon from its ID an stores it in weapon[]. | | | | Determines whether the given player is an administrator. | | Kicks the player with the given ID. | | Bans the player with the given ID. | | | | Sets some spawn parameters (including team, skin, spawning position, weapons and ammo) for a given player. | | | | Add a player to the given team. | | Returns the teamID of the player. | | Apply a given skin to a player. | | Set the score of a single player to a given value. | | Returns the current score of the given player. | | Get the x,y and z coordinates of a given player. | | Set the x,y and z coordinates of a given player. | | Get the health value of a given player and store it in health. | | Set the health value of a given player. | | Put a player into a given vehicle onto a given seat. | | Removes a player from his vehicle. | | Determines whether a player is in a given vehicle. | | Determines whether a player is in any vehicle. | | Get a player’s name from his ID and store it in name[]. | | Set the player color for a given playerid. | | Get the color of a given playerid. | | Get the ID of the vehicle of a given player. | | Set a checkpoint for a given player. | | Disable the currently active checkpoint for the given player. | | Determines whether the given player is in the checkpoint or not. | | | | Place the camera at given position. | | Set the camera to look at a given position. | | Set the camera behind the player. | | Toggle whether the player is controllable or not. | | Plays the sound with the given soundid. | | Sets rectangular world bounds. | | Gives a certain amount of money to a player. | | Turns the player at a given angle so he faces into another direction. | | Get the current amount of money from a player. | | Reset a given players money to 0. | | Checks whether a player is connected or not. | | Check the current state of a player. | | Resets all weapons of a given player (player will have no weapons). | | Gives a player a weapon with the given amount of ammunition. | | | | Create a new vehicle at given coordinates with given colors. | | Locate a vehicle and store its coordinates. | | Set the coordiates of a vehicle. | | Set the rotation of a vehicle. | | Set some player-specific parameters for a vehicle. | | | | Tune a vehicle with a given component. | | Changes the colors of a given vehicle. | | Change the paintjob on a given vehicle. | | | | | | This event is triggered when the game mode is initalized. | | This event is triggered when the game mode exits. | | This event is triggered before the filter scripts start. | | This event is triggered when a player connects. | | This event is triggered when a player disconnects. | | This event is triggered when a player spawns. | | This event is triggered when a player dies. | | This event is triggered when a vehicle spawns. | | This event is triggered when a chatmessage arrives. | | This event is triggered when the user sends a command. | | | | This event is triggered when a character class is requested by a player. | | This event is triggered when a player this the key to enter a vehicle. | | This event is triggered when a player exits a vehicle. | | This event is triggered when a player changes his state. | | This event is triggered when a player enters a checkpoint. | | This event is triggered when a player leaves a checkpoint. |
NativesSummary | | | Print some text to the console. | | Print a string produced according to the formatting string format. | | Produces a string according to the formatting string format and stores the result to output[]. | | Send a message to a single client. | | Send a message to all clients spawned. | | Set the game text for all players spawned. | | Set the game text for a single player. | | Set off a timer to trigger a function. | | Kill a timer that has been set using SetTimer. | | Returns the number of milliseconds since the OS was started. | | | | Sets the game mode title that is displayed in the server browser. | | Sets the number of teams allowed. | | Makes a player model avaliable for selection, define its spawn point and its weapons including ammunition. | | Add a vehicle at a given spawn point with the defined colors. | | Add a pickup item at given coordinates. | | Set whether name tags should be shown or not. | | Set whether players markers (on the map) should be shown or not. | | | | Set the game clock to a certain time and freeze it. | | Gets the name of a weapon from its ID an stores it in weapon[]. | | | | Determines whether the given player is an administrator. | | Kicks the player with the given ID. | | Bans the player with the given ID. | | | | Sets some spawn parameters (including team, skin, spawning position, weapons and ammo) for a given player. | | | | Add a player to the given team. | | Returns the teamID of the player. | | Apply a given skin to a player. | | Set the score of a single player to a given value. | | Returns the current score of the given player. | | Get the x,y and z coordinates of a given player. | | Set the x,y and z coordinates of a given player. | | Get the health value of a given player and store it in health. | | Set the health value of a given player. | | Put a player into a given vehicle onto a given seat. | | Removes a player from his vehicle. | | Determines whether a player is in a given vehicle. | | Determines whether a player is in any vehicle. | | Get a player’s name from his ID and store it in name[]. | | Set the player color for a given playerid. | | Get the color of a given playerid. | | Get the ID of the vehicle of a given player. | | Set a checkpoint for a given player. | | Disable the currently active checkpoint for the given player. | | Determines whether the given player is in the checkpoint or not. | | | | Place the camera at given position. | | Set the camera to look at a given position. | | Set the camera behind the player. | | Toggle whether the player is controllable or not. | | Plays the sound with the given soundid. | | Sets rectangular world bounds. | | Gives a certain amount of money to a player. | | Turns the player at a given angle so he faces into another direction. | | Get the current amount of money from a player. | | Reset a given players money to 0. | | Checks whether a player is connected or not. | | Check the current state of a player. | | Resets all weapons of a given player (player will have no weapons). | | Gives a player a weapon with the given amount of ammunition. | | | | Create a new vehicle at given coordinates with given colors. | | Locate a vehicle and store its coordinates. | | Set the coordiates of a vehicle. | | Set the rotation of a vehicle. | | Set some player-specific parameters for a vehicle. | | | | Tune a vehicle with a given component. | | Changes the colors of a given vehicle. | | Change the paintjob on a given vehicle. |
print| native print( | const | string[] | ) |
|
Print some text to the console. Parameters| string[] | The string to be displayed. |
See alsoprintf, format
printf| native printf( | const | format[], | | | {Float,_}:... | ) |
|
Print a string produced according to the formatting string format. Parameters| format[] | String that is to be formatted | | ... | Parameters to be inserted |
See alsoprint, format
format| native format( | | output[], | | | len, | | const | format[], | | | {Float,_}:... | ) |
|
Produces a string according to the formatting string format and stores the result to output[]. Parameters| output[] | Variable where the produced text is stored | | len | Length of output[] | | format[] | Formatting string | | ... | Variables used in the formatting string |
Example codenew string[256]; format(string, sizeof(string), "*** %s died.", name);
See alsoprint, printf
SendClientMessage| native SendClientMessage( | | playerid, | | | color, | | const | message[] | ) |
|
Send a message to a single client. Parameters| playerid | ID of the player that the message should be sent to. | | color | Color used (ex. COLOR_RED, COLOR_BLUE, ...) | | message[] | Message string |
Example codeSendClientMessage(playerid, COLOR_RED, 'Testing');
See alsoSendClientMessageToAll
SendClientMessageToAll| native SendClientMessageToAll( | | color, | | const | message[] | ) |
|
Send a message to all clients spawned. Parameters| color | Color used (ex. COLOR_RED, COLOR_BLUE, ...) | | message[] | Message string |
Example codeSendClientMessageToAll(COLOR_RED, 'Testing');
See alsoSendClientMessageToAll
GameTextForAll| native GameTextForAll( | const | string[], | | | time, | | | style | ) |
|
Set the game text for all players spawned. Parameters| string[] | Message to be displayed. | | time | Time the message is displayed (in milliseconds). | | style | ID of the style the message should be displayed in. |
StylesGametext special strings| ~n~ | new line | | ~r~ | red | | ~g~ | green | | ~b~ | blue | | ~w~ | white | | ~y~ | yellow |
Example code// Produces "Fly like a bird" in red letters GameTextForAll("~r~Fly like a bird.", 3000, 5);
See alsoGameTextForPlayer Credits tomike
GameTextForPlayer| native GameTextForPlayer( | | playerid, | | const | string[], | | | time, | | | style | ) |
|
Set the game text for a single player. For a style / gametext type reference see GameTextForAll. Parameters| playerid | ID of the player that the game text should be set for. | | string[] | Message to be displayed. | | time | Time the message is displayed (in milliseconds). | | style | ID of the style the message should be displayed in. |
Example codeGameTextForPlayer(playerid, "~r~Fly like a bird.", 3000, 5);
See alsoGameTextForAll
SetTimer| native SetTimer( | funcname[], | | interval, | | repeating | ) |
|
Set off a timer to trigger a function. Parameters| funcname[] | Name of the function that should be called after the timer ends. | | interval | Time in milliseconds after which funcname[] is triggered. | | repeating | Should the timer run only once (0) or should it repeat after ending (1)? |
Example codeSetTimer("DefenceWin", 600000, 0); // After 10 minutes, DefenceWin() is triggered.
See alsoKillTimer
KillTimer| native KillTimer( | timerid | ) |
|
Kill a timer that has been set using SetTimer. Parameters| timerid | ID/Handle of the timer. |
Example code// Setting up the timer new gRoundTimer; new gRoundTime = 600000; // Round time - 10 mins gRoundTimer = SetTimer("DefenceWin", gRoundTime, 0);
// Killing the timer KillTimer(gRoundTimer);
See alsoSetTimer
GetTickCountReturns the number of milliseconds since the OS was started. Useful for timing.
SetGameModeText| native SetGameModeText( | const | string[] | ) |
|
Sets the game mode title that is displayed in the server browser. Parameters| string[] | Title to be displayed in the server browser. |
Example codeSetGameModeText("Area 51 Break-in");
SetTeamCount| native SetTeamCount( | count | ) |
|
Sets the number of teams allowed. Parameters| count | Number of teams allowed. |
Example codeSetTeamCount(2); // Allows two teams
AddPlayerClass| native AddPlayerClass( | modelid, | | Float:spawn_x, | | Float:spawn_y, | | Float:spawn_z, | | Float:z_angle, | | weapon1, | | weapon1_ammo, | | weapon2, | | weapon2_ammo, | | weapon3, | | weapon3_ammo | ) |
|
Makes a player model avaliable for selection, define its spawn point and its weapons including ammunition. For a complete, human readable list of all model IDs please look here: http://tinyurl.com/ojjdy Parameters| modelid | ID of the player model according to the peds.ide file. | | spawn_x | Spawn coordinate x | | spawn_y | Spawn coordinate y | | spawn_z | Spawn coordinate z | | z_angle | Roation | | weapon1..3 | ID of weapon1..3. See http://tinyurl.com/ghgrx for reference. | | weapon1..3_ammo | Amount of ammunition avaliable at spawn time. |
Example codeAddPlayerClass(117,-1617.5673,1390.0602,7.1747,333.2159,4,1,23,170,30,300);
See also<AddPlayerClassEx>
AddStaticVehicle| native AddStaticVehicle( | modelid, | | Float:spawn_x, | | Float:spawn_y, | | Float:spawn_z, | | Float:z_angle, | | color1, | | color2 | ) |
|
Add a vehicle at a given spawn point with the defined colors. For a complete, humand readable listing of all vehicle IDs please look here: http://tinyurl.com/j5sow For a handy color chart please look here: http://tinyurl.com/hthuf Parameters| modelid | ID of the vehicle model according to the vehicles.ide file. | | spawn_x | Spawn coordinate x | | spawn_y | Spawn coordinate y | | spawn_z | Spawn coordinate z | | z_angle | Roation | | color1..2 | Colors for the vehicle. |
Example codeAddStaticVehicle(454,-1427.9684,1470.6309,0.5181,135.1407,-1,-1); AddStaticVehicle(473,-1579.3042,1318.4962,-0.5421,249.5810,56,15);
See alsoCreateVehicle, <AddStaticVehicleEx>
AddStaticPickup| native AddStaticPickup( | model, | | type, | | Float:X, | | Float:Y, | | Float:Z | ) |
|
Add a pickup item at given coordinates. For a listing of pickup types please click here: http://tinyurl.com/hkrhb Parameters| modelid | ID of the item model according to the default.ide file. | | type | pickup type | | x,y,z | Coordinates |
ShowNameTags| native ShowNameTags( | show | ) |
|
Set whether name tags should be shown or not. Name tags mean the player names that are written over the model’s head by default. Parameters| show | 1 shows name tags, 0 hides them |
Example code// Show name tags (default setting) ShowNameTags(1); // Hide name tags ShowNameTags(0);
See alsoShowPlayerMarkers
ShowPlayerMarkers| native ShowPlayerMarkers( | show | ) |
|
Set whether players markers (on the map) should be shown or not. Parameters| show | 1 shows name tags, 0 hides them |
Example code// Show player markers (default setting) ShowPlayerMarkers(1); // Hide player markers ShowPlayerMarkers(0);
See alsoShowNameTags
SetWorldTime| native SetWorldTime( | hour | ) |
|
Set the game clock to a certain time and freeze it. Parameters| hour | Time the clock is set to. |
Example code// Set the clock to 10 a.m. SetWorldTime(10);
GetWeaponName| native GetWeaponName( | | weaponid, | | const | weapon[], | | | len | ) |
|
Gets the name of a weapon from its ID an stores it in weapon[]. Parameters| weaponid | ID of the weapon | | weapon[] | the weapon name gets stored in here | | len | length of the weapon[] string |
Example code// Taken from an OnPlayerDeath(playerid, killerid, reason) where reason is the weapon ID new deathreason[20]; GetWeaponName(reason, deathreason, 20); format(string, sizeof(string), "*** %s died. (%s)", name, deathreason);
See alsoGetPlayerName
IsPlayerAdmin| native IsPlayerAdmin( | playerid | ) |
|
Determines whether the given player is an administrator. ParametersExample codeif(IsPlayerAdmin(playerid) == 1) { Kick(badguy); SendClientMessage(playerid, COLOR_BLUE, 'Kick okay.'); } else { SendClientMessage(playerid, COLOR_RED, 'Permission denied, you are not an admin!'); }
See alsoKick, Ban
KickKicks the player with the given ID. Remember to perform a check with IsPlayerAdmin if you want to restrict normal users from kicking people! Parameters| playerid | ID of the player to be kicked |
Example codeif(IsPlayerAdmin(playerid) == 1) { Kick(badguy); SendClientMessage(playerid, COLOR_BLUE, 'Kick okay.'); } else { SendClientMessage(playerid, COLOR_RED, 'Permission denied, you are not an admin!'); }
See alsoIsPlayerAdmin, Ban
BanBans the player with the given ID. Remember to perform a check with IsPlayerAdmin if you want to restrict normal users from banning people! Parameters| playerid | ID of the player to be banned |
Example codeif(IsPlayerAdmin(playerid) == 1) { Ban(badguy); SendClientMessage(playerid, COLOR_BLUE, 'Ban okay.'); } else { SendClientMessage(playerid, COLOR_RED, 'Permission denied, you are not an admin!'); }
See alsoIsPlayerAdmin, Kick
SetSpawnInfo| native SetSpawnInfo( | playerid, | | team, | | skin, | | Float:x, | | Float:y, | | Float:z, | | Float:rotation, | | weapon1, | | weapon1_ammo, | | weapon2, | | weapon2_ammo, | | weapon3, | | weapon3_ammo | ) |
|
Sets some spawn parameters (including team, skin, spawning position, weapons and ammo) for a given player. Parameters| playerid | ID of the player | | team | ID of the team where the player should be added | | skin | ID of the skin to apply to the player | | x,y,z | Coordinates | | rotation | rotates the player | | weapon1..3 | weaponIDs (see AddPlayerClass) | | weapon1..3_ammo | amount of ammunition avaliable for each weapon |
SpawnPlayer| native SpawnPlayer( | playerid | ) |
|
Spawns the given player. Parameters
SetPlayerTeam| native SetPlayerTeam( | playerid, | | teamid | ) |
|
Add a player to the given team. Parameters| playerid | ID of the player | | teamid | ID of the team to add the player to |
See alsoGetPlayerTeam
GetPlayerTeam| native GetPlayerTeam( | playerid | ) |
|
Returns the teamID of the player. ParametersExample codeif(GetPlayerTeam(playerid) == 255) { // player is in no team }
See alsoSetPlayerTeam
SetPlayerSkin| native SetPlayerSkin( | playerid, | | skinid | ) |
|
Apply a given skin to a player. Parameters| playerid | ID of the player | | skinid | ID of the skin (see AddPlayerClass for a list) |
SetPlayerScore| native SetPlayerScore( | playerid, | | score | ) |
|
Set the score of a single player to a given value. Parameters| playerid | ID of the player | | score | Score to set. |
Example code// Set score to 500 SetPlayerScore(500);
See alsoGetPlayerScore
GetPlayerScore| native GetPlayerScore( | playerid | ) |
|
Returns the current score of the given player. ParametersExample codenew score[10]; score = GetPlayerScore(playerid); SendClientMessage(playerid, COLOR_BLUE, score);
See alsoSetPlayerScore
GetPlayerPos| native GetPlayerPos( | | playerid, | | & | Float:x, | | & | Float:y, | | & | Float:z | ) |
|
Get the x,y and z coordinates of a given player. Parameters| playerid | ID of the player | | x,y,z | Variables where the coordinates get stored (these have to be floats!) |
Example codenew Float:x; new Float:y; new Float:z; GetPlayerPos(playerid, x, y, z); new string[30]; format(string, 30, "You are at %f %f %f", x, y, z);
See alsoSetPlayerPos
SetPlayerPos| native SetPlayerPos( | playerid, | | Float:x, | | Float:y, | | Float:z | ) |
|
Set the x,y and z coordinates of a given player. Parameters| playerid | ID of the player | | x,y,z | Coordinates |
See alsoGetPlayerPos
GetPlayerHealth| native GetPlayerHealth( | | playerid, | | & | Float:health | ) |
|
Get the health value of a given player and store it in health. Parameters| playerid | ID of the player | | health | Variable where the health value gets stored |
Example codenew healthvalue; healthvalue = GetPlayerHealth(playerid, healthvalue); SendClientMessage(playerid, COLOR_RED, healthvalue);
See alsoSetPlayerHealth
SetPlayerHealth| native SetPlayerHealth( | playerid, | | Float:health | ) |
|
Set the health value of a given player. Setting health to 0 kills the player. Parameters| playerid | ID of the player | | health | Health value to be set. |
Example code// Kill a player SetPlayerHealth(playerid, 0); // Set health to 20 SetPlayerHealth(playerid, 20);
See alsoGetPlayerHealth
IsPlayerInVehicle| native IsPlayerInVehicle( | playerid, | | vehicleid | ) |
|
Determines whether a player is in a given vehicle. Parameters| playerid | ID of the player | | vehicleid | ID of the vehicle |
Example codeif(IsPlayerInVehicle(playerid, vehicleid)) { RemovePlayerFromVehicle(playerid); } else { SendClientMessage(playerid, COLOR_RED, "Player is not in that vehicle!"); }
See alsoPutPlayerInVehicle, RemovePlayerFromVehicle, IsPlayerInAnyVehicle, GetPlayerVehicleID
GetPlayerName| native GetPlayerName( | | playerid, | | const | name[], | | | len | ) |
|
Get a player’s name from his ID and store it in name[]. Parameters| playerid | ID of the player | | name[] | Variable where the player’s name gets stored | | len | Length of name[]. |
See alsoGetWeaponName
SetPlayerColor| native SetPlayerColor( | playerid, | | color | ) |
|
Set the player color for a given playerid. Parameters| playerid | ID of the player | | color | Color to set. |
Example codeSetPlayerColor(playerid, COLOR_BLUE);
See alsoGetPlayerColor
GetPlayerColor| native GetPlayerColor( | playerid | ) |
|
Get the color of a given playerid. ParametersSee alsoGetPlayerColor
SetPlayerCheckpoint| native SetPlayerCheckpoint( | playerid, | | Float:x, | | Float:y, | | Float:z, | | Float:size | ) |
|
Set a checkpoint for a given player. Parameters| playerid | ID of the player | | x,y,z | Coordinates | | size | Size of the checkpoint |
See alsoDisablePlayerCheckpoint, IsPlayerInCheckpoint
DisablePlayerCheckpoint| native DisablePlayerCheckpoint( | playerid | ) |
|
Disable the currently active checkpoint for the given player. ParametersExample code// Set up a checkpoint SetPlayerCheckpoint(playerid, x, y, z, 20); // Disable it again DisablePlayerCheckpoint(playerid);
See alsoSetPlayerCheckpoint, IsPlayerInCheckpoint
IsPlayerInCheckpoint| native IsPlayerInCheckpoint( | playerid | ) |
|
Determines whether the given player is in the checkpoint or not. ParametersExample codeif(IsPlayerInCheckpoint(playerid)) { SetGameTextForPlayer(playerid, "~r~You have reached the checkpoint!", 3000, 5); }
See alsoSetPlayerCheckpoint, DisablePlayerCheckpoint
SetPlayerInterior| native SetPlayerInterior( | playerid, | | interiorid | ) |
|
Sets the interior ID. For a list of (some) interiors please look here: http://tinyurl.com/en55t If you want to teleport to an interior, you need to use SetPlayerPos and SetPlayerInterior. Parameters| playerid | ID of the player | | interiorid | ID of the interior map you want to use |
TogglePlayerControllable| native TogglePlayerControllable( | playerid, | | toggle | ) |
|
Toggle whether the player is controllable or not. Parameters| playerid | ID of the player | | toggle | player can move (1) or not (0) |
PlayerPlaySound| native PlayerPlaySound( | playerid, | | soundid, | | Float:x, | | Float:y, | | Float:z | ) |
|
Plays the sound with the given soundid. The sound is “placed” at the given coordinates. For a list of soundIDs please click here: http://tinyurl.com/nzbkk Parameters| playerid | ID of the player | | soundid | ID of the sound | | x,y,z | Coordinates |
SetPlayerWorldBounds| native SetPlayerWorldBounds( | playerid, | | Float:x_max, | | Float:x_min, | | Float:y_max, | | Float:y_min | ) |
|
Sets rectangular world bounds. (The user cannot move outside these bounds.) Parameters| playerid | ID of the player | | x_max, y_max | Maximum coordinates | | x_min, y_min | Minimum coordinates |
Example +---------(1) | | (0) ... x_min | y_min | | (1) ... x_max | y_max (0)---------+
GivePlayerMoney| native GivePlayerMoney( | playerid, | | money | ) |
|
Gives a certain amount of money to a player. Parameters| playerid | ID of the player | | money | Amount of money |
See alsoGetPlayerMoney, ResetPlayerMoney
IsPlayerConnected| native IsPlayerConnected( | playerid | ) |
|
Checks whether a player is connected or not. ParametersSee alsoGetPlayerState
GetPlayerState| native GetPlayerState( | playerid | ) |
|
Check the current state of a player. For a complete list of states please look at OnPlayerStateChange. ParametersSee alsoIsPlayerConnected
ResetPlayerWeapons| native ResetPlayerWeapons( | playerid | ) |
|
Resets all weapons of a given player (player will have no weapons). ParametersSee alsoGivePlayerWeapon
GivePlayerWeapon| native GivePlayerWeapon( | playerid, | | weaponid, | | ammo | ) |
|
Gives a player a weapon with the given amount of ammunition. Parameters| playerid | ID of the player | | weaponid | ID of the weapon (see AddPlayerClass for a list) | | ammo | amount of ammunition |
See alsoResetPlayerWeapons
CreateVehicle| native CreateVehicle( | vehicletype, | | Float:x, | | Float:y, | | Float:z, | | Float:rotation, | | color1, | | color2, | | respawn_delay | ) |
|
Create a new vehicle at given coordinates with given colors. For a handy color chart please look here: http://tinyurl.com/hthuf Note that this function creates vehicles at runtime! If you are looking for vehicle spawns please take a look at AddStaticVehicle. Parameters| vehicletype | Type of the vehicle to be created | | x,y,z | Coordinates | | rotation | Rotation | | color1..2 | Colors to be used | | respawn_delay | time in milliseconds after which the vehicle respawns |
See alsoAddStaticVehicle, GetVehiclePos, SetVehiclePos, SetVehicleZAngle, SetVehicleParamsForPlayer
SetVehicleParamsForPlayer| native SetVehicleParamsForPlayer( | vehicleid, | | playerid, | | objective, | | doorslocked | ) |
|
Set some player-specific parameters for a vehicle. Parameters| vehicleid | ID of the vehicle | | playerid | ID of the player | | objective | Whether this vehicle is (1) or isn’t (0) an objective | | doorslocked | Whether the doors are (1) or are not (0) locked |
See alsoCreateVehicle, GetVehiclePos, SetVehiclePos, SetVehicleZAngle
SetVehicleToRespawn| native SetVehicleToRespawn( | vehicleid | ) |
|
Makes a vehicle respawn. Parameters| vehicleid | ID of the vehicle to respawn |
AddVehicleComponent| native AddVehicleComponent( | vehicleid, | | componentid | ) |
|
Tune a vehicle with a given component. A list of components should be avaliable shortly. Parameters| vehicleid | the vehicle to tune | | componentid | ID of the component to add |
See alsoChangeVehicleColor, ChangeVehiclePaintjob
ChangeVehicleColor| native ChangeVehicleColor( | vehicleid, | | color1, | | color2 | ) |
|
Changes the colors of a given vehicle. Parameters| vehicleid | ID of the vehicle | | color1..2 | colors (see our car colors chart) |
See alsoAddVehicleComponent, ChangeVehiclePaintjob
ChangeVehiclePaintjob| native ChangeVehiclePaintjob( | vehicleid, | | paintjobid | ) |
|
Change the paintjob on a given vehicle. Parameters| vehicleid | ID of the vehicle | | paintjobid | the ID of the paintjob to apply (a list of paintjobs should be avaliable shortly) |
See alsoAddVehicleComponent, ChangeVehicleColor
Forwards (Callback declarations)Summary | | | This event is triggered when the game mode is initalized. | | This event is triggered when the game mode exits. | | This event is triggered before the filter scripts start. | | This event is triggered when a player connects. | | This event is triggered when a player disconnects. | | This event is triggered when a player spawns. | | This event is triggered when a player dies. | | This event is triggered when a vehicle spawns. | | This event is triggered when a chatmessage arrives. | | This event is triggered when the user sends a command. | | | | This event is triggered when a character class is requested by a player. | | This event is triggered when a player this the key to enter a vehicle. | | This event is triggered when a player exits a vehicle. | | This event is triggered when a player changes his state. | | This event is triggered when a player enters a checkpoint. | | This event is triggered when a player leaves a checkpoint. |
OnGameModeInitThis event is triggered when the game mode is initalized.
OnGameModeExitThis event is triggered when the game mode exits.
OnFilterScriptInitThis event is triggered before the filter scripts start.
OnPlayerConnectThis event is triggered when a player connects. The player is automatically assigned a playerid. Parameters
OnPlayerDisconnectThis event is triggered when a player disconnects. Parameters
OnPlayerSpawnThis event is triggered when a player spawns. Parameters
OnPlayerDeathThis event is triggered when a player dies. Parameters| playerid | ID of the player | | killerid | playerid of the player who killed the player | | reason | ID of the weapon used |
OnVehicleSpawnThis event is triggered when a vehicle spawns. Parameter| vehicleid | ID of the vehicle |
OnPlayerTextThis event is triggered when a chatmessage arrives. Parameters| playerid | ID of the player | | text[] | Textmessage |
OnPlayerCommandTextThis event is triggered when the user sends a command. e.g. /cmd param1 param2 Parameters| playerid | ID of the player | | cmdtext[] | Command sent by the player |
OnPlayerInfoChange(currently not used) Parameters
OnPlayerRequestClassThis event is triggered when a character class is requested by a player. Parameters| playerid | ID of the player | | classid | ID of the character class |
OnPlayerEnterVehicleThis event is triggered when a player this the key to enter a vehicle. Note that this even triggers if that player cancels his actions (i.e. walking away). If you want to trigger an event when the player is really inside the car, please use OnPlayerStateChange with PLAYER_STATE_DRIVER or with PLAYER_STATE_PASSENGER respectively. Parameters| playerid | ID of the player | | vehicleid | ID of the vehicle | | ispassenger | Whether the player is (1) or is not (0) passenger. |
See alsoOnPlayerExitVehicle Credits toY_Less
OnPlayerExitVehicleThis event is triggered when a player exits a vehicle. Parameters| playerid | ID of the player | | vehicleid | ID of the vehicle | | ispassenger | Whether the player was (1) or was not (0) passenger. |
See alsoOnPlayerEnterVehicle
OnPlayerStateChangeThis event is triggered when a player changes his state. Parameters| playerid | ID of the player | | newstate | New state | | oldstate | Old state |
Overview of possible states| PLAYER_STATE_NONE | empty state | | PLAYER_STATE_ONFOOT | player is on foot | | PLAYER_STATE_DRIVER | player is actively driving a car | | PLAYER_STATE_PASSENGER | player is passenger in a car | | PLAYER_STATE_EXIT_VEHICLE | player is exiting a vehicle (used internally) | | PLAYER_STATE_ENTER_VEHICLE_DRIVER | player is enterting a vehicle as driver (used internally) | | PLAYER_STATE_ENTER_VEHICLE_PASSENGER | player is entering a vehicle as passenger (used internally) | | PLAYER_STATE_WASTED | player is dead and has not yet respawned | | PLAYER_STATE_SPAWNED | player has spawned |
OnPlayerEnterCheckpointThis event is triggered when a player enters a checkpoint. ParametersSee alsoOnPlayerLeaveCheckpoint
OnPlayerLeaveCheckpointThis event is triggered when a player leaves a checkpoint. ParametersSee alsoOnPlayerEnterCheckpoint
|