If player not in range, disable command
#1

Hello,
i'm trying to disable command to players, but it seems not working. I want to make, that if ONLY, the player is near the coordinates, can use the commands. The code seems good, but it's not working Any ideas, to get that to work?

Code:
if(playerDB[playerid][vip] == true)
{
   GetPlayerPos( playerid, Xaa, Yaa, Zaa );
   if(Xaa <= -2069 && Xaa >= -2064 && Yaa <= -262 && Yaa >= -268)
   {
       SendClientMessage(playerid, 0xFF9900FF, " You are to far away!");
       return 1;
    } else {
       if (!strcmp("/gates", cmdtext, true)) return MoveDynamicObject(zon1, -2067.7896, -265.9207, 36.4651, 5);
    }
}
Thanks.
Reply


Messages In This Thread
If player not in range, disable command - by NBass - 13.03.2017, 21:28
Re: If player not in range, disable command - by LEOTorres - 13.03.2017, 21:34
Re: If player not in range, disable command - by NBass - 13.03.2017, 21:42
Re: If player not in range, disable command - by Flamehaze7 - 13.03.2017, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)