[HELP] IS PLAYER ON FOOT COMMAND
#1

i want do a command which a player can use it only if he is on foot

how can i do that? help me
Reply
#2

Use a check:

pawn Код:
if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
Reply
#3

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;
}}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)