SA-MP Forums Archive
Save weapons if a player disconnected - 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: Save weapons if a player disconnected (/showthread.php?tid=95192)



Save weapons if a player disconnected - Battlaman - 02.09.2009

Hey,

My Question:
I would like that the weapons of the players in will be saved.
I have search but I found nothing
I have looked here: https://sampwiki.blast.hk/wiki/GetPlayer...o3WaacSOUYLA7Q But I do not really understand

Can anybody explain me how i can make this? :P




Re: Save weapons if a player disconnected - Clavius - 02.09.2009

You need to loop through all 13 slots of weapons, get the weapon data for each, check if weaponid is not 0, and then save the weapon id and ammo to a file.


Re: Save weapons if a player disconnected - Battlaman - 03.09.2009

Quote:
Originally Posted by player007
You need to loop through all 13 slots of weapons, get the weapon data for each, check if weaponid is not 0, and then save the weapon id and ammo to a file.
i dont understand

Can you type the code quickly? Maybe then I understand?