[HELP] IS PLAYER ON FOOT COMMAND - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] IS PLAYER ON FOOT COMMAND (
/showthread.php?tid=116993)
[HELP] IS PLAYER ON FOOT COMMAND -
akis_tze - 30.12.2009
i want do a command which a player can use it only if he is on foot
how can i do that? help me
Re: [HELP] IS PLAYER ON FOOT COMMAND -
MadeMan - 30.12.2009
Use a check:
pawn Код:
if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
Re: [HELP] IS PLAYER ON FOOT COMMAND -
Mike Garber - 30.12.2009
pawn Код:
if (strcmp(cmdtext, "/command") == 0){
if(IsPlayerInAnyVehicle(playerid)){
SendClientMessage(playerid,0x00FF00AA,"You cannot use this command as you're in a vehicle."):
}else{
// Do whatever the command should do
return 1;
}}