18.02.2011, 13:50
Hi i wondering about how to make a check with pVars which will check is player position has changed? I will use this in timer...
new
Float: pPos[3]
;
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
SetPVarFloat(playerid, "posX", pPos[0]);
SetPVarFloat(playerid, "posY", pPos[1]);
SetPVarFloat(playerid, "posZ", pPos[2]);
new
Float: pPos[3]
;
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
if(pPos[0] != GetPVarFloat(playerid, "posX") || pPos[1] != GetPVarFloat(playerid, "posY") || pPos[2] != GetPVarFloat(playerid, "posZ"))
{
/* Position is changed... */
}