14.10.2010, 15:40
Use the public function public OnPlayerDisconnect(playerid, reason)
Then, get the player position:
GetPlayerPos(playerid, x, y ,z)
Make sure you define x,y,z
Or else x,y,z doesn't mean anything.
Now, make it save into a file with using dini_FloatSet.
When you finished doing that, make it set the player position to the saved position.
Use this public function: public OnPlayerSpawn(playerid).
Define x,y,z again (new Float:.... etc)
Make it read the file by using dini_Float
Then make it spawn at x,y,z:
SetPlayerPos(playerid, x, y, z);
Try figuring out how dini_Floatset and dini_Float work. if I give you the whole script you won't really learn from that
Then, get the player position:
GetPlayerPos(playerid, x, y ,z)
Make sure you define x,y,z
Код:
new Float:x, Float:y, Float:z;
Now, make it save into a file with using dini_FloatSet.
When you finished doing that, make it set the player position to the saved position.
Use this public function: public OnPlayerSpawn(playerid).
Define x,y,z again (new Float:.... etc)
Make it read the file by using dini_Float
Then make it spawn at x,y,z:
SetPlayerPos(playerid, x, y, z);
Try figuring out how dini_Floatset and dini_Float work. if I give you the whole script you won't really learn from that