26.04.2015, 00:49
Este erro ocorre quando acontece isto:
Ou seja vocк deveria fazer isto para concertar:
Mas aconselho vocк trocar todas elas por IsPlayerInRangeOfPoint(Nгo hб diferenca porem uma ja e nativa do samp por isto aconselho ela )
PHP код:
forward Opoa(v,v1,v2);
main()
{
Opoa(1,3,4);
}
PHP код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
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);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return true;
}
}
return 0;
}