need help with command
#5

Could as well be with the check:

pawn Код:
if(!strcmp("/pay",cmdtext))
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, YourX, YourY, YourZ)) //7.0 is the range
    {
        if(GetPlayerMoney(playerid)>2000)
        {
            GivePlayerMoney(playerid, -2000);
            SendClientMessage(playerid,0xFFFFFFFF,"Gate opening!");
            //MoveObject...
            return 1;
         }
         else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You need 2000$ to open the gate!");
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You need to be near the gate to open it!");
}
Just pick the one you want, and don't forget to fill in your coords. ^^
Reply


Messages In This Thread
need help with command - by LegendNissanGTR - 06.10.2010, 14:03
Re: need help with command - by Jeffry - 06.10.2010, 14:06
Re: need help with command - by LegendNissanGTR - 07.10.2010, 04:13
Re: need help with command - by Retardedwolf - 07.10.2010, 04:15
Re: need help with command - by Jeffry - 07.10.2010, 11:29
Re: need help with command - by LegendNissanGTR - 07.10.2010, 11:53
Re: need help with command - by LegendNissanGTR - 07.10.2010, 11:55
Re: need help with command - by Jeffry - 07.10.2010, 11:58
Re: need help with command - by LegendNissanGTR - 08.10.2010, 05:26
Re: need help with command - by Jeffry - 08.10.2010, 11:38

Forum Jump:


Users browsing this thread: 3 Guest(s)