Weapons saving to trunk - 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: Weapons saving to trunk (
/showthread.php?tid=474932)
Weapons saving to trunk -
Riwerry - 10.11.2013
Hello guys, is possible to create trunk system, what will save weapons in it? I want to save weapons in trunk to .ini. For example how it should look. Player comes near trunk, he type some command, then will some dialog appear with 3 slots to save, then he can take weapons take back.. Rly big thx..
Re: Weapons saving to trunk -
Loot - 10.11.2013
Of course it's possible...
Create a file to each vehicle exist in your gamemode, and place them on a seperate folder, the index of the .txt files should have the vehicleid as the name of the file so it can be lately use, and store 3 variables inside each file or whatever amount of weapons you want.
When player wants to store a weapon, get the vehicle that he stands near, then format a string to that specific vehicleid file, and store x weapons in its variables (slots). Same goes with taking the guns, get the vehicleid and store inside them 0 on the slot you took. Not that hard.
Re: Weapons saving to trunk -
Riwerry - 10.11.2013
Well mate, I am not that good pawner.

Can you vice me an example? Thx