04.01.2010, 16:55
Add this to your gamemode:
Second errors with "Safe" is probably an anti-cheat system. With that I can't help you.
pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:Px, Float:Py, Float:Pz);
public PlayerToPoint(Float:radi, playerid, Float:Px, Float:Py, Float:Pz)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -Px);
tempposy = (oldposy -Py);
tempposz = (oldposz -Pz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}