SA-MP Forums Archive
Weapon Saving System [Y_INI] - 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)
+--- Thread: Weapon Saving System [Y_INI] (/showthread.php?tid=547311)



Weapon Saving System [Y_INI] - WhiteAngels - 22.11.2014

How to make a weapon saved when player logout ?


Re: Weapon Saving System [Y_INI] - Raweresh - 22.11.2014

I don't use that file system but i can give you a hand with saving that.
Код:
new Weapons[13];
new Ammo[13];
for(new A,B = 13; A < B; A++)
{
	GetPlayerWeaponData(playerid,A,Weapons[A],Ammo[A]);
}
I recommend put that code in OnPlayerDisconnect. Now you have ids in Weapons variable and ammo of that weapon ids in Ammo variable. Now just save it and load when play first spawn.


Re: Weapon Saving System [Y_INI] - WhiteAngels - 22.11.2014

I've seen a script like that..
nah, the problem i can't make it saved when player loggout


Re: Weapon Saving System [Y_INI] - Jihanz - 14.01.2015

Bikin Sendiri lah...

Kalo susah baru ngomong..