18.06.2011, 21:05
Quote:
i have this, but it dioesnt work nbc of errors
pawn Код:
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;
}
}
if(PlayerToPoint(playerid, X, Y, Z))
{
MoveObject (open,-702.41857910156, 437.17742919922, 18.92423248291, 1.0);
SetTimer("doorclose", 3000, false)
}
return 0;
}