28.08.2017, 18:58
PHP код:
new pbalas;
SendClientMessageToAll(verde, string);
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);//adiciona isso ao seu gm no
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)//troque isso pelo seu stock que vc tem ai.
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new 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;
}