23.10.2010, 17:10
Try this. You forgot too add a range parameter on IsPlayerInRangeOfPoint.
pawn Код:
#include <a_samp>
#define COLOR_RED 0xAA3333AA
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/pay", cmdtext, true))
{
if(IsPlayerInRangeOfPoint(playerid,50.0/*range*/,1110.4412,-1738.2471,13.4317))
return SendClientMessage(playerid,COLOR_RED,"You are too far from the gate to pay");
if(GetPlayerMoney(playerid, < 500))
return SendClientMessage(playerid,COLOR_RED,"You do not have enough money");
if(GetPlayerMoney(playerid, > 500))
return SendClientMessage(playerid,COLOR_RED,"You have just paid and the gate is open");
MoveObject(980, 1101.7249755859, -1741.2767333984, 15.273958206177,2.0)
return 1;
}
return 0;
}