fysiks Try to make the code, I have advance the code But it has errors:
Look this is the code:
PHP Code:
public votemap_handle(id, menu, item)
{
if( item < 0 ) return PLUGIN_CONTINUE;
static access, callback
static cmd[1056], cmdname[1056]
cmdname[0] = '^0'
cmd[0] = '^0'
menu_item_getinfo(menu, item, access, cmd,1055,cmdname,1055, callback);
pug_votemap_votes[str_to_num(cmd)]++;
set_hudmessage(0, 255, 0, 0.76, 0.10, 0, 0.0,30.0, 0.0, 0.0, 3)
show_hudmessage(0,"Map votes:")
set_hudmessage(255, 255, 225, 0.76, 0.13,0, 0.0,30.0, 0.0, 0.0, 4)
show_hudmessage(0,cmdname,1055)
client_print(0,print_chat,"",pug_header, LANG_PLAYER, "PUG_VOTED_FOR", cmdname);
console_print(0,"%s %L",pug_header, LANG_PLAYER, "PUG_VOTED_FOR", cmdname);
pug_voted[id] = 1;
if(pug_should_stopvote() ) votemap_end()
return PLUGIN_HANDLED;
}
The problem is that in the hud when 1 person votes by a map, The map is placed in the hud but when another person votes on the other map, clears the first map elected and placed in the hud the second map...
How can I make that once elected any map is left in the hud and do not disappear from hud until q change the map?
Here is a screenshot with what i want