19.02.2011, 01:18
I'm working on a RCXD for my TDM server, I need to save the position where the player uses the cmd (to use the RCXD) to after blowing it, will set the player back to that pos. How to do that ?
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPVarFloat(playerid,"X",x);
SetPVarFloat(playerid,"Y",y);
SetPVarFloat(playerid,"Z",z);
SetPlayerPos(playerid,GetPVarFloat(playerid,"X"),GetPVarFloat(playerid,"Y"),GetPVarFloat(playerid,"Z"));
new
Float:pPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]); // When using the RCXD
-----
SetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]); // When the RCXD blows up