Hello,
Im new here and new to scripting.
I made a Menu where people can vote if they like the server or not.
But how can i make a command to open the menu and a something that counts the votes ?
Here is my Menu code :
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new mServerRate // Menu
new mcbServerRate // Menu Callback
public plugin_init() {
/* Menu Server Rate */
/* Use menu_display(id, mServerRate, 0) to show the menu to an user. */
mServerRate = menu_create("Server Rate", "mh_ServerRate")
mcbServerRate = menu_makecallback("mcb_ServerRate")
menu_additem(mServerRate, "Bad", "ma_ServerRate", ADMIN_USER, mcbServerRate)
menu_additem(mServerRate, "Normal", "ma_ServerRate", ADMIN_USER, mcbServerRate)
menu_additem(mServerRate, "Awesome !", "ma_ServerRate", ADMIN_USER, mcbServerRate)
/* Menu End */
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
}
/* Menu Server Rate */
public mh_ServerRate(id, menu, item) {
/* This event is called when someone presses a key on this menu */
}
public ma_ServerRate(id) {
/* This event is called when an item was selected */
}
public mcb_ServerRate(id, menu, item) {
/* This is the callback-event, here you can set items enabled or disabled. */
/* If you want to enable an item, use: return ITEM_ENABLED */
/* If you want to disable an item, use: return ITEM_DISABLED */
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1043\\ f0\\ fs16 \n\\ par }
*/
Thanks for reading.