Raised This Month: $ Target: $400
 0% 

about new menu system


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zwfgdlc
Senior Member
Join Date: May 2006
Old 04-11-2008 , 08:19   about new menu system
Reply With Quote #1

how do statistical data for the player vote?help me,thx.
Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN_NAME "New Plug-In" #define PLUGIN_VERSION  "1.0" #define PLUGIN_AUTHOR   "zwfgdlc" new g_menu new callback public plugin_init() {     register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);     g_menu=menu_create("changle level?","vote_menu",0)     callback=menu_makecallback("backmenu")     load_maps()     register_clcmd("amx_startvote","vote_map") } public vote_menu(id,menu,item) {     new callbackmenu,cmd[10],access,name[32]     menu_item_getinfo(g_menu,item,access,cmd,9,name,31,callbackmenu)     client_print(id,print_chat,"item=%d cmd=%s access=%d name=%s",item,cmd,access,name)     menu_destroy(g_menu) } public backmenu(id,menu,item) {     return ITEM_ENABLED } load_maps() {     new file[64],line=0,temp[32],len     get_configsdir(file,63)     formatex(file,63,"%s/maps.ini",file)     while(read_file(file,line++,temp,31,len))     {         if(len==0||equal(temp,";",1))             continue         if(is_map_valid(temp))         menu_additem(g_menu,temp,"1",0,callback);     }     menu_setprop(g_menu,MPROP_BACKNAME,"back")     menu_setprop(g_menu,MPROP_NEXTNAME,"next")     menu_setprop(g_menu,MPROP_EXITNAME,"exit menu")  } public vote_map(id) {     new players[32],num;     get_players(players,num,"c")     for(new i=0;i<num;i++)     {         menu_display(players[i],g_menu,0)     } }
zwfgdlc 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 17:17.


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