AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to count all the votes? (https://forums.alliedmods.net/showthread.php?t=183118)

Bilal Pro 04-17-2012 16:10

How to count all the votes?
 
Hello there people i like to know how i count all the votes for a basic vote menu i tryed this

PHP Code:

    if (gVotes[0] > gVotes[1] && gVotes[2] && gVotes[3] && gVotes[4] && gVotes[5])
    {
        
ColorChat(0GREY"[Fn] ^1Funday: ^4HideNseeK"gVotes[0])
    }
    else if (
gVotes[1] > gVotes[0] && gVotes[2] && gVotes[3] && gVotes[4] && gVotes[5])
    {
        
ColorChat(0GREY"[Fn] ^1Funday: ^4Nightcrawler"gVotes[1])
    }
    else if (
gVotes[2] > gVotes[0] && gVotes[3] && gVotes[4] && gVotes[5])
    {
        
ColorChat(0GREY"[Fn] ^1Funday: ^4Zombie day"gVotes[2])
    }
    else if (
gVotes[3] > gVotes[0] && gVotes[2] && gVotes[4] && gVotes[5])
    {
        
ColorChat(0GREY"[Fn] ^1Funday: ^4Scoutzknivez"gVotes[3])
    }
    else if (
gVotes[4] > gVotes[0] && gVotes[2] && gVotes[3] && gVotes[5])
    {
        
ColorChat(0GREY"[Fn] ^1Funday: ^4Sparta day"gVotes[4])
    }
    else if (
gVotes[5] > gVotes[0] && gVotes[2] && gVotes[3] && gVotes[4])
    {
        
ColorChat(0GREY"[Fn] ^1Funday: ^4Scoutzknivez"gVotes[5])
    } 

But it doesnt show up even tryed it with the +

Exolent[jNr] 04-17-2012 16:15

Re: How to count all the votes?
 
https://forums.alliedmods.net/showth...highlight=vote

Bilal Pro 04-17-2012 16:31

Re: How to count all the votes?
 
Thanks but it start from gvotes 0, with this code it starts from 1 so for example i press 1 (HnS) it goed to Nightcrawler :P

Bilal Pro 04-17-2012 16:34

Re: How to count all the votes?
 
Nvm, i think i can solve this by myself thanks anyway

Exolent[jNr] 04-17-2012 16:35

Re: How to count all the votes?
 
I didn't understand any of that.

Bilal Pro 04-17-2012 16:38

Re: How to count all the votes?
 
Nvm, my brother was typing for me. I was in the bathroom, solved it thanks :)


All times are GMT -4. The time now is 07:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.