16.10.2009, 03:51
pawn Код:
//top
new Float:x2,y2,z2,angle2;
forward MINZCHECK(playerid);
stock EnsurePlayerSpawn(playerid,Float:x,Float:y,Float:z,Float:angle)
{
SetPlayerPos(playerid,x2,y2,z2);
SetplayerFacingAngle(playerid,angle2);
SetTimer("MINZCHECK", 1500, 1);
}
public MINZCHECK(playerid)
{
new Float:tempx,tempy,tempz;
GetPlayerPos(playerid,tempx,tempy,tempz);
if(tempz<z2)
{
SetPlayerPos(playerid,x2,y2,z2);
return 1;
}
else if(tempz>=z2)
{
KillTimer(MINZCHECK(playerid));
}
return 1;
}