26.12.2014, 21:20
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 ...
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(i, 24, 500);
format(string, sizeof(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(i, 25, 500);
format(string, sizeof(string), "Cea mai votata arma a fost: Shotgun. (%d voturi)", VoteGun2);
}