Position Saving - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Position Saving (
/showthread.php?tid=150348)
Position Saving -
Sascha - 25.05.2010
SOLVED
Re: Position Saving -
ipsBruno - 25.05.2010
Search......
http://forum.sa-mp.com/index.php?act...topic=169012.0
Re: Position Saving -
Nero_3D - 25.05.2010
Quote:
Originally Posted by Sascha
Hi...
I wanted to save a player position, to reload it later...
Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
PlayerData[playerid][coord[1]] = x;
PlayerData[playerid][coord[2]] = y;
PlayerData[playerid][coord[3]] = z;
(defined as under enum with: coord[3]
if you need more information to fix please let me know 
|
You should put a Float tag before coords[3] (Float:coords[3])
if you create an array with 3 cells, the cell are 0, 1 and 2
And here would be the right notation of your code
pawn Код:
GetPlayerPos(playerid, PlayerData[playerid][coord][0], PlayerData[playerid][coord][1], PlayerData[playerid][coord][2]);
if you want to save it to the file, like DraKoN thought, just click on the link
PS: just the remove the "action=printpage;" part in the url if you want to see the normal side and I expect that "Salvar" means save