SA-MP Forums Archive
[REQUEST]Position save[HELP] - 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: [REQUEST]Position save[HELP] (/showthread.php?tid=88233)



[REQUEST]Position save[HELP] - _ASUS_ - 25.07.2009

Yes i know "SEARCH" but ive searched and nothing ive also started to create my own but im having problems installing it on the modertopia scritp aka Godfather. IF anyone can help me with this code or make a new code that would be great!

Here is my code for some reason i can't install it on modertopia, i get error after error.....
Quote:

#include <dudb>
#include <Dini>

stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}

public OnPlayerDisconnect(playerid, reason)
{
if (logged[playerid] == 1)
new Float,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
dUserSetINT(PlayerName(playerid)).("x",floatround( x));
dUserSetINT(PlayerName(playerid)).("y",floatround( y));
dUserSetINT(PlayerName(playerid)).("z",floatround( z));
logged[playerid] = 0;
return 1;
}

public OnPlayerSpawn(playerid)
{
if (dUserINT(PlayerName(playerid)).("x")!=0) {
SetPlayerPos(playerid,
float(dUserINT(PlayerName(playerid)).("x")),
float(dUserINT(PlayerName(playerid)).("y")),
float(dUserINT(PlayerName(playerid)).("z")));
}

return 1;
}

If anyone can help me or make a new one i would really appreciated!


Re: [REQUEST]Position save[HELP] - Calgon - 25.07.2009

Because you're mixing two systems and deleting all of the OnPlayerDisconnect/Connect code?