23.10.2011, 12:32
Add this
In public OnPlayerCommandText(playerid, cmdtext[])
if (PlayerToPoint(5.0, playerid, 757.7714, -1996.8455, -0.3859))
{
GivePlayerMoney(playerid, 2500);
}
Код:
PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { new Float:oldposx, Float:oldposy, Float:oldposz, Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } return 0; }
if (PlayerToPoint(5.0, playerid, 757.7714, -1996.8455, -0.3859))
{
GivePlayerMoney(playerid, 2500);
}