SA-MP Forums Archive
weapon - 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: weapon (/showthread.php?tid=84669)



weapon - Ribber - 02.07.2009

Hi.
How can i make that the player weapons save if he disconnects?
and if he login in, he become again his weapons what he have before the disconnects.

I have already done all, but i only need the weapon save.




Re: weapon - refshal - 02.07.2009

You'll need to create a file to save the player's weapons. You could use dudb. Search around.


Re: weapon - Ribber - 02.07.2009

yea i have already dudb, dini, dutils.
i make it with dudb.

But how can i save the weapons...
i have all done for example my moneys save, level save etc.


Re: weapon - refshal - 02.07.2009

Do the same with the weapons. Just edit the SetPlayerMoney to GivePlayerWeapon etc.


Re: weapon - Kyosaur - 02.07.2009

Save their weapons with file functions (https://sampwiki.blast.hk/wiki/File_Functions).


Re: weapon - Ribber - 02.07.2009

Quote:
Originally Posted by cοοp
Do the same with the weapons. Just edit the SetPlayerMoney to GivePlayerWeapon etc.
okay that i already know.
but how i get the weapons from the player?


Re: weapon - refshal - 02.07.2009

GetPlayerWeaponData();


Re: weapon - Ribber - 02.07.2009

off course i get it like this..

but accurate?


Re: weapon - refshal - 02.07.2009

Post your money thingy. Then I will do it for you.


Re: weapon - Ribber - 02.07.2009

save if disconnect:

pawn Код:
if(Logged[playerid] == 1)
{
dUserSetINT(PlayerName(playerid)).("money",GetPlayerMoney(playerid));
}
login:

pawn Код:
GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money"));