16.01.2013, 11:57
Hola, en un gamemode cuando uso PlayerToPoint me dice qe no existe, que include tengo que bajar? Gracias
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
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);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) &(tempposz > -radi)))
{
return 1;
}
}
return 0;
}
#define PlayerToPoint(%0, %1, %2, %3, %4) IsPlayerInRangeOfPoint(%1, %0, %2, %3, %4)