Raised This Month: $ Target: $400
 0% 

dynamic menu_additem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-23-2010 , 03:12   dynamic menu_additem
Reply With Quote #1

PHP Code:
StartVote()
{
    new 
i;
    new 
title[65];
    
format(title64"Tech Level %d Vote"iCurrentTechLevel+1);
    
//Store the menu in the global
    
gVoteMenu menu_create(title"menu_handler");
    
    
menu_setprop(gVoteMenuMPROP_EXITMEXIT_NEVER);

    
//Add some vote options
    
    
for(0TECHS_PER_LEVELi++)
    {
        new 
vote[65];
        
format(vote64"%s"szTechName[iCurrentTechLevel][i]);
        
menu_additem(gVoteMenuvotei+10);
    }

    for(
0MAX_PLAYERSi++)
    {
        
bPlayerVoted[i] = false;
    }
    
    
bInVote true;
    
fVoteStartTime get_gametime();
    
    
//We will need to create some variables so we can loop through all the players
    
new players[32], pnumtempid;

    
//Fill players with available players
    
get_players(playerspnum);

    
//Start looping through all players to show the vote to
    
for(ii<pnumi++ )
    {
        
//Save a tempid so we do not re-index
        
tempid players[i];

        
//Show the vote to this player
        
menu_display(tempidgVoteMenu0);

        
//Increase how many players are voting
        
gVoting++;
    }

    return 
PLUGIN_HANDLED;

Code:
	for(i = 0; i < TECHS_PER_LEVEL; i++)
	{
		new vote[65];
		format(vote, 64, "%s", szTechName[iCurrentTechLevel][i]);
		menu_additem(gVoteMenu, vote, i+1, 0);
	}
Quote:
Error: Argument type mismatch (argument 3) on line 451
__________________
+|- KARMA Respectively

HLM is offline
 


Thread Tools
Display Modes

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 05:21.


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