IsPlayerInAnyVehicle
From SA-MP Wiki
(Difference between revisions)
Revision as of 03:32, 31 January 2014 Smithy (Talk | contribs) ← Previous diff |
Revision as of 13:27, 31 January 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 27: | Line 27: | ||
[[pt:IsPlayerInAnyVehicle]] | [[pt:IsPlayerInAnyVehicle]] | ||
[[ru:IsPlayerInAnyVehicle]] | [[ru:IsPlayerInAnyVehicle]] | ||
+ | [[fr:IsPlayerInAnyVehicle]] |
Revision as of 13:27, 31 January 2014
Description:
Check if a player is inside any vehicle.
(playerid)
playerid | The ID of the player to check. |
Return Values:
TRUE (1) if the player is in a vehicle, FALSE (0) if they are not.
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/invehicle", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0x00FF00AA, "You're in a vehicle."); return 1; } return 0; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- IsPlayerInVehicle: Check if a player is in a certain vehicle.
- GetPlayerVehicleSeat: Check what seat a player is in.