07.10.2010, 11:29
Could as well be with the check:
Just pick the one you want, and don't forget to fill in your coords. ^^
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!");
}