PDA

View Full Version : Weapons saving to trunk


Riwerry
10/11/2013, 11:23 AM
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..

Loot
10/11/2013, 11:53 AM
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.

Riwerry
10/11/2013, 12:33 PM
Well mate, I am not that good pawner. :D Can you vice me an example? Thx