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



trunk - iBots - 10.05.2014

i am making a system ,trunk system,each car only have 2 slots in the trunk,like i can store 2 things in the trunk,how can i make when storing something if slot 1 is used it will use slot 2?and if slot 1 is not used it will use it?i tried but it makes them both used..


Re: trunk - DiGiTaL_AnGeL - 10.05.2014

Use 2 variables for the 2 slots, and then you verify: if the first slot is used, use the second one. If not, use the first one. You may need to create something like this:
pawn Код:
new slot1[vehicleid][weaponid]
new slot2[vehicleid][or anything you'd like id]
And then use if and else.