SA-MP Forums Archive
Count slot +rep - 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: Count slot +rep (/showthread.php?tid=525258)



Count slot +rep - iBots - 11.07.2014

well,i have made a system ,this system is like packs,each pack can get only 100 slots,But all of the packs use the same variables/saving system,how can i make it count the slots that are for a specific pack from the whole objects,like for editing a slot and..


Re : Count slot +rep - mirou123 - 11.07.2014

Can you explain more and post some code?


Re: Count slot +rep - Pboachie - 11.07.2014

Well you cant make it specific if all the packs use the same variables. You would have to do something like Ppack1, Ppack2, Ppack3. Then you can do something like if player buys 2 more of pack 2, it would Playerinfo[playerid][Ppack2] += 2;


Re : Count slot +rep - mirou123 - 11.07.2014

Oh I see. If you are going to do it like that, it won't be possible try something like
Playerinfo[MAX_PLAYERS][Ppack2][MAX_PACKS]
So in your enum just add Ppack2[MAX_PACKS],