SA-MP Forums Archive
Help [+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: Help [+REP] (/showthread.php?tid=552849)



Help [+REP] - Edw - 26.12.2014

I have a problem to order / vote (for paintball gun vote) All the time choose the first gun voted, and would need if Weapon 2 was voted one gun several times and often have fewer
2nd weapon would need to win but win only the first weapon voted here ...
PHP код:
                if(VoteGun1 VoteGun2 || VoteGun1 VoteGun3 || VoteGun1 VoteGun4 || VoteGun1 VoteGun5 ||
                
VoteGun1 VoteGun6 || VoteGun1 VoteGun7)
                {
                    
GivePlayerWeapon(i24500);
                    
format(stringsizeof(string), "Cea mai votata arma a fost: Deagle. (%d voturi)"VoteGun1);
                }
                else if(
VoteGun2 VoteGun1 || VoteGun2 VoteGun3 || VoteGun2 VoteGun4 || VoteGun2 VoteGun5 ||
                
VoteGun2 VoteGun6 || VoteGun2 VoteGun7)
                {
                    
GivePlayerWeapon(i25500);
                    
format(stringsizeof(string), "Cea mai votata arma a fost: Shotgun. (%d voturi)"VoteGun2);
                }