23.10.2010, 17:31
pawn Код:
//first you got a function wrong its
//IsPlayerInRangeOfPoint(playerid,Range,X,Y,Z);
//and this should fix it
if (strcmp(cmdtext, "/pay", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,90,1110.4412,-1738.2471,13.4317)) return SendClientMessage(playerid,red,"You are too far from the gate to pay");
if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid,red,"You do not have enough money");
if(GetPlayerMoney(playerid) > 500)
{
SendClientMessage(playerid,red,"You have just paid and the gate is open");
MoveObject(980, 1101.7249755859, -1741.2767333984, 15.273958206177,2.0);
GivePlayerMoney(playerid,-500);
}
return 1;
}