Raised This Month: $51 Target: $400
 12% 

Showing vote progress in the same vote menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jon
Veteran Member
Join Date: Dec 2007
Old 07-16-2010 , 08:32   Showing vote progress in the same vote menu
Reply With Quote #1

I'm pretty new to SourcePawn and the menu system. What I'm trying to do is to create a campaign vote menu for L4D2, but show the vote progress in the same menu. Basically:

Code:
if( g_votes[i] > 0 )             FormatEx( info, sizeof info, "%s (%d votes)", g_campaignName[i], g_votes[i] )             else     FormatEx( info, sizeof info, "%s", g_campaignName[i] ) AddMenuItem( menu, i, g_campaignName[i] )

My problem is, in what way should I re-display the menu to clients that have already voted? Should I just keep doing VoteMenuToAll() every time a new client votes, and use a bool to check if a client has already voted in MenuAction_Select, if he has, return Plugin_Handled?
Jon is offline
Reply



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 11:55.


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