Raised This Month: $ Target: $400
 0% 

Vote Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
JusTGo
Veteran Member
Join Date: Mar 2013
Old 11-30-2015 , 13:08   Re: Vote Menu
Reply With Quote #10

Quote:
Originally Posted by zmd94 View Post
PHP Code:
 public EndVote()
 {
    
//If the first option recieved the most votes
    
if ( gVotes[0] > gVotes[1] )
        
client_print(0print_chat"First option recieved most votes (%d )"gVotes[0] );

    
//Else if the second option recieved the most votes
    
else if ( gVotes[0] < gVotes[1] )
        
client_print(0print_chat"Second option recieved most votes (%d )"gVotes[1] );

    
//Otherwise the vote tied
    
else
    {
        
// Random victory    
        
switch(random_num(01))
        {
            case 
0:
            {
                
client_print(0print_chat"First option recieved most votes (%d )"gVotes[0] );
            }
            case 
1:
            {
                
client_print(0print_chat"Second option recieved most votes (%d )"gVotes[1] );
            }
        }
    }
        
client_print(0print_chat"The vote tied at %d votes each."gVotes[0] );

    
//Don't forget to destroy the menu now that we are completely done with it
    
menu_destroygVoteMenu );

    
//Reset that no players are voting
    
gVoting 0;
 } 
Ty
__________________
JusTGo is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:05.


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