30.05.2011, 05:49
Look:
Makes no sense...
Do it:
you missed a bracket
there's the function
PHP код:
if(!PlayerToPoint(2.0, playerid, 2405.4531, 1022.8162, 10.4792);
Do it:
PHP код:
if(!PlayerToPoint(2.0, playerid, 2405.4531, 1022.8162, 10.4792)) return 1;
there's the function
PHP код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
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 1;
}
return 0;
}

