Raised This Month: $ Target: $400
 0% 

help...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tecone
New Member
Join Date: Mar 2005
Old 03-09-2005 , 23:09   help...
Reply With Quote #1

my first time trying this.... would this work...if not what do i fix....

Code:
#include <amxmod>
#include <amxmisc>



public plugin_init()
{
 register_plugin("tecone's Weapon Menu","1.1","tecone")

 register_menucmd(register_menuid("Weapon Menu"),1023,"actionMenu")
 register_clcmd("amx_wmenu","showMenu",ADMIN_KICK)

 
}

public actionMenu(id,key)
{
 switch(key){
 case 0:{
give_item(id,"weapon_awp")
 }
 case 1:{
give_item(id,"weapon_m4a1")
 }
 case 2:{
give_item(id,"weapon_ak47")
 }
 case 3:{
give_item(id,"weapon_aug")
 }
 case 4:{
give_item(id,"weapon_sg552")
 }
 case 5:{
give_item(id,"weapon_scout")
 }
 case 6:{
give_item(id, "weapon_galil")
 }
 case 7:{
give_item(id, "weapon_famas")
 }
 }

 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,511,cstrike_running ? "\yWeapon Menu\R^n^n\w" : "Weapon Menu^n^n")
 len += format(menuBody[len],511-len,"1. Awp^n2. Colt^n3. AK^n4. Aug^n5. Sig552^n6. Scout^n7. Galil^n8. Famas^n^n0. Exit")
 show_menu(id,((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<9)),menuBody)

 return PLUGIN_HANDLED
}
help pls, no flaming
tecone is offline
Send a message via AIM to tecone
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 03-10-2005 , 00:11  
Reply With Quote #2

If that doesn't work for you try this.
Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init ( ) {     register_plugin ("tecone's Weapon Menu", "1.1", "tecone" )     register_menucmd ( register_menuid ( "\rWeapon Menu :^n" ), (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7), "actionMenu" )     register_clcmd ( "amx_wmenu", "showMenu", ADMIN_KICK ) } public showMenu ( id, level, cid ) {     if ( !cmd_access ( id, level, cid, 1 ) ) {         return PLUGIN_HANDLED     }         new MenuBody[512]     new keys     new mLen = format ( MenuBody, 511, "\rWeapon Menu :^n" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\w1. AWP" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\w2. Colt" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\w3. Ak^n" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\r4. Aug" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\r5. Sig552" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\r6. Scout" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\y7. Galil" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\y8. Famas^n" )     mLen += format ( MenuBody[mLen], 511 - mLen, "^n\y0. Exit Menu" )     keys = ( 1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7 )     show_menu ( id, keys, MenuBody, -1 )     return PLUGIN_HANDLED }       public actionMenu ( id, key ) {     switch ( key )     {         case 0:         {             give_item ( id, "weapon_awp" )         }         case 1:         {             give_item ( id, "weapon_m4a1" )         }         case 2:         {             give_item ( id, "weapon_ak47" )         }                 case 3:         {             give_item ( id, "weapon_aug" )         }                 case 4:         {             give_item ( id, "weapon_sg552" )         }                 case 5:         {             give_item ( id, "weapon_scout" )         }                 case 6:         {             give_item ( id, "weapon_galil" )         }                 case 7:         {             give_item ( id, "weapon_famas" )         }                 case 8:         {             client_print ( id, print_chat, "[AMXX] Menu Closed." )         }     }     return PLUGIN_HANDLED }
__________________
Nick is offline
Send a message via MSN to Nick
tecone
New Member
Join Date: Mar 2005
Old 03-10-2005 , 09:43  
Reply With Quote #3

thx ill try them both ......
so now.. you can bind a key to amx_wmenu and it will show up? im new at this whole thing
tecone is offline
Send a message via AIM to tecone
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 03-10-2005 , 20:27  
Reply With Quote #4

Yes, that will work.
__________________
Nick is offline
Send a message via MSN to Nick
tecone
New Member
Join Date: Mar 2005
Old 03-10-2005 , 20:56  
Reply With Quote #5

much thx <3
tecone is offline
Send a message via AIM to tecone
tecone
New Member
Join Date: Mar 2005
Old 03-13-2005 , 19:56  
Reply With Quote #6

ok...hwo can i make this menu 2 pages? add another page iwth like... ex. smgs
tecone is offline
Send a message via AIM to tecone
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 02:08.


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