18.02.2011, 15:20
The part where you get the positions and save the positions in with PVars.
The part where you check if it's changed.
Another options is to use floatcmp.
pawn Код:
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]);
pawn Код:
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... */
}