Raised This Month: $ Target: $400
 0% 

menu scripting


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 11-27-2006 , 23:58   menu scripting
Reply With Quote #1

I need serious help with my menu. I am brand new, started yesterday, at attempting to script in AMXX mod. this is my immediate plugin.




#include <amxmod>
#include <amxmisc>
#include <cstrike>
#include <fun>



public plugin_init()
{
register_plugin("MultiMenu","1.0","Bent")

register_menucmd(register_menuid("MultiMenu") ,1023,"actionMenu")
register_clcmd("amx_menu","showMenu",ADMIN_SL AY,"-displays Bent's menu")

new modName[32]
get_modname(modName,31)

}

public actionMenu(id,key)
{
switch(key){
case 0:{

if (get_cvar_num("amx_kyle")==0)
return PLUGIN_HANDLED
set_user_health(id, get_user_health(id) +250)
return PLUGIN_HANDLED

}
case 1:{

if (get_cvar_num("amx_kyle")==0)
return PLUGIN_HANDLED
cs_set_user_money(id, cs_get_user_money(id) +1000)
return PLUGIN_HANDLED

}
case 2:{

if (get_cvar_num("amx_kyle")==0)
return PLUGIN_HANDLED
set_user_armor(id, get_user_armor(id) +100)
return PLUGIN_HANDLED

}
case 3:{

if (get_cvar_num("amx_kyle")==0)
return PLUGIN_HANDLED
set_user_maxspeed(id, 400000000.0)
return PLUGIN_HANDLED

}
}

return PLUGIN_HANDLED
}

public showMenu(id,level,cid)
{
if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED

new menuBody[512]
new len = format(menuBody,255 "\yFirst Menu:^n";)
len += format(menuBody[len],511-len,"1. Health^n2. Money^n3. Armor^n4. Slight Speed^n^n0. Exit")
show_menu(id,((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1< <9)),menuBody)

return PLUGIN_HANDLED
}





What am i doing wrong??? Anyones help would be appreciated. Good Luck, and Thank You.

By the way, this entire thing was done by me PLEASE HELP!
soccdoodcss is offline
Send a message via AIM to soccdoodcss
 


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 06:59.


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