Raised This Month: $ Target: $400
 0% 

hitzone menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-07-2005 , 01:00   hitzone menu
Reply With Quote #1

hello, im a real noob at scripting plugins but i looked at the forum and found a menu tutorial and remove hitzones, so i made up this small plugin but i get errors when i compile

the errors:

Code:
hitzone_menu.sma(45) : warning 217: loose indentation
hitzone_menu.sma(45) : error 017: undefined symbol "remove_head"
hitzone_menu.sma(50) : warning 217: loose indentation
hitzone_menu.sma(50) : error 017: undefined symbol "remove_chest"
hitzone_menu.sma(55) : warning 217: loose indentation
hitzone_menu.sma(55) : error 017: undefined symbol "remove_stomach"
hitzone_menu.sma(60) : warning 217: loose indentation
hitzone_menu.sma(60) : error 017: undefined symbol "remove_arms"
hitzone_menu.sma(65) : warning 217: loose indentation
hitzone_menu.sma(65) : error 017: undefined symbol "remove_legs"
hitzone_menu.sma(72) : error 002: only a single statement (or expression) can follow each "case"
hitzone_menu.sma(72 -- 74) : warning 215: expression has no effect
hitzone_menu.sma(74) : warning 217: loose indentation
hitzone_menu.sma(74) : error 029: invalid expression, assumed zero
hitzone_menu.sma(74) : error 017: undefined symbol "remove_head"
hitzone_menu.sma(74) : fatal error 107: too many error messages on one line
the plugin:

Code:
#include <amxmodx> #include <fun> public plugin_init() {     register_plugin("hitzone_menu()", "1.0" ,"Belsebub")     register_clcmd( "say /menu","ShowMenu", -1, "Shows The menu" )     register_menucmd(register_menuid("\yRemove Hitzones:"), 1023, "MenuCommand" )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public ShowMenu( id ) {     new szMenuBody[256]     new keys     new len = format( szMenuBody, 255, "\yRemove Hitzones:^n" )     len += format( szMenuBody[len], 255-len, "^n\w1. Remove head" )     len += format( szMenuBody[len], 255-len, "^n\w2. Remove chest" )     len += format( szMenuBody[len], 255-len, "^n\w3. Remove stomach" )     len += format( szMenuBody[len], 255-len, "^n\w4. Remove arms" )     len += format( szMenuBody[len], 255-len, "^n\w5. Remove legs" )     len += format( szMenuBody[len], 255-len, "^n^n\w6. Exit Option Name" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<41<<5)           show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public MenuCommand( id, key ) {     client_print( id, print_console, "[AMX] Key=%d", key )     client_print( id, print_chat, "[AMX] Key=%d", key )     switch( key )     {         case 0:       {    client_print(id, print_chat, "You have selected choice number 1")     remove_head(id)       }         case 1:       {    client_print(id, print_chat, "You have selected choice number 2")     remove_chest(id)       }         case 2:       {    client_print(id, print_chat, "You have selected choice number 3")     remove_stomach(id)       }         case 3:       {    client_print(id, print_chat, "You have selected choice number 4")     remove_arms(id)       }         case 4:       {    client_print(id, print_chat, "You have selected choice number 5")     remove_legs(id)       }         case 5:       {    client_print(id, print_chat, "You Have Exit The Menu")     }     return PLUGIN_HANDLED //---------------------------------------------------------------------------------------------- public remove_head(id) {     set_user_hitzones(0,id,253)           new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,253) done.")         client_print(0,print_chat,"Nobody can hit %s with their guns",Name)           return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_chest(id) {     set_user_hitzones(0,id,251)           new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,251) done.")         client_print(0,print_chat,"Nobody can hit %s with their guns",Name)           return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_stomach(id) {     set_user_hitzones(0,id,247)           new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,247) done.")         client_print(0,print_chat,"Nobody can hit %s with their guns",Name)           return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_arms(id) {     set_user_hitzones(0,id,207)           new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,207) done.")         client_print(0,print_chat,"Nobody can hit %s with their guns",Name)           return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_legs(id) {     set_user_hitzones(0,id,63)           new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,63) done.")         client_print(0,print_chat,"Nobody can hit %s with their guns",Name)           return PLUGIN_HANDLED }

plz help me with it
Belsebub is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-07-2005 , 10:32  
Reply With Quote #2

You should really watch your indenting, it can help you find errors...

You were missing two closing curly-brackets: }

Try this:

Code:
#include <amxmodx> #include <fun> public plugin_init() {     register_plugin("hitzone_menu()", "1.0" ,"Belsebub")     register_clcmd( "say /menu","ShowMenu", -1, "Shows The menu" )     register_menucmd(register_menuid("\yRemove Hitzones:"), 1023, "MenuCommand" )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public ShowMenu( id ) {     new szMenuBody[256]     new keys     new len = format( szMenuBody, 255, "\yRemove Hitzones:^n" )     len += format( szMenuBody[len], 255-len, "^n\w1. Remove head" )     len += format( szMenuBody[len], 255-len, "^n\w2. Remove chest" )     len += format( szMenuBody[len], 255-len, "^n\w3. Remove stomach" )     len += format( szMenuBody[len], 255-len, "^n\w4. Remove arms" )     len += format( szMenuBody[len], 255-len, "^n\w5. Remove legs" )     len += format( szMenuBody[len], 255-len, "^n^n\w6. Exit Option Name" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<41<<5)     show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public MenuCommand( id, key ) {     client_print( id, print_console, "[AMX] Key=%d", key )     client_print( id, print_chat, "[AMX] Key=%d", key )     switch( key )     {         case 0:         {             client_print(id, print_chat, "You have selected choice number 1")             remove_head(id)         }         case 1:         {             client_print(id, print_chat, "You have selected choice number 2")             remove_chest(id)         }         case 2:         {             client_print(id, print_chat, "You have selected choice number 3")             remove_stomach(id)         }         case 3:         {             client_print(id, print_chat, "You have selected choice number 4")             remove_arms(id)         }         case 4:         {             client_print(id, print_chat, "You have selected choice number 5")             remove_legs(id)         }         case 5:         {             client_print(id, print_chat, "You Have Exit The Menu")         }     }     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_head(id) {     set_user_hitzones(0,id,253)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,253) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_chest(id) {     set_user_hitzones(0,id,251)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,251) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_stomach(id) {     set_user_hitzones(0,id,247)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,247) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_arms(id) {     set_user_hitzones(0,id,207)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,207) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_legs(id) {     set_user_hitzones(0,id,63)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,63) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     return PLUGIN_HANDLED }
xeroblood is offline
Send a message via MSN to xeroblood
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-07-2005 , 12:51  
Reply With Quote #3

ty! didn't get any compile errors
Belsebub is offline
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-08-2005 , 11:01  
Reply With Quote #4

it works now , but now i want to restore hitzones when the player dies, but now it restores hitzones when any player dies, this is what i got now:

Code:
#include <amxmodx> #include <fun> public plugin_init() {     register_plugin("hitzone_menu()", "1.0" ,"Belsebub")     register_clcmd( "say /hitzonemenu","showmenu", -1, "Shows The menu" )     register_clcmd( "say_team /hitzonemenu","showmenu", -1, "Shows The menu" )     register_menucmd(register_menuid("\yRemove Hitzones:"), 1023, "MenuCommand" )     register_event("DeathMsg", "death", "a")     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public showmenu(id) {     new szMenuBody[256]     new keys     new len = format( szMenuBody, 255, "\yRemove Hitzones:^n" )     len += format( szMenuBody[len], 255-len, "^n\w1. Remove head" )     len += format( szMenuBody[len], 255-len, "^n\w2. Remove chest" )     len += format( szMenuBody[len], 255-len, "^n\w3. Remove stomach" )     len += format( szMenuBody[len], 255-len, "^n\w4. Remove arms" )     len += format( szMenuBody[len], 255-len, "^n\w5. Remove legs" )     len += format( szMenuBody[len], 255-len, "^n\w6. hsonly" )     len += format( szMenuBody[len], 255-len, "^n\w7. Restore Hitzones to normal" )     len += format( szMenuBody[len], 255-len, "^n^n\w8. Exit Option Name" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7)     show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public MenuCommand( id, key ) {     switch( key )     {         case 0:         {             remove_head(id)         }         case 1:         {             remove_chest(id)         }         case 2:         {             remove_stomach(id)         }         case 3:         {             remove_arms(id)         }         case 4:         {             remove_legs(id)         }         case 5:         {             hsonly(id)         }         case 6:         {             restore_hitzones(id)         }         case 7:         {             client_print(id, print_chat, "You Have Exit The Menu")         }     }     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_head(id) {     set_user_hitzones(0,id,253)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,253) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the head")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_chest(id) {     set_user_hitzones(0,id,251)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,251) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the chest")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_stomach(id) {     set_user_hitzones(0,id,247)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,247) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the stomach")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_arms(id) {     set_user_hitzones(0,id,207)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,207) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the arms")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_legs(id) {     set_user_hitzones(0,id,63)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,63) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the legs")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public hsonly(id) {     set_user_hitzones(0,id,2)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,2) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Enemies can only do headshot on you!")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public restore_hitzones(id) {     set_user_hitzones(0,id,255)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,255) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Hitzones are restored to normal")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public death(id) {     set_user_hitzones(0,id,255)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,255) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Hitzones are restored to normal")     return PLUGIN_HANDLED } //----------------------------------------------------------------------------------------------
Belsebub is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-08-2005 , 11:11  
Reply With Quote #5

Ok just wild guessing and some copy from my other plugins.
Try this:
Code:
#include <amxmodx> #include <fun> new bool:restore[33] = false public plugin_init() {     register_plugin("hitzone_menu()", "1.0" ,"Belsebub")     register_clcmd( "say /menu","ShowMenu", -1, "Shows The menu" )     register_menucmd(register_menuid("\yRemove Hitzones:"), 1023, "MenuCommand" )         register_event( "ResetHUD", "ResetHud", "b" )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public ShowMenu( id ) {     new szMenuBody[256]     new keys     new len = format( szMenuBody, 255, "\yRemove Hitzones:^n" )     len += format( szMenuBody[len], 255-len, "^n\w1. Remove head" )     len += format( szMenuBody[len], 255-len, "^n\w2. Remove chest" )     len += format( szMenuBody[len], 255-len, "^n\w3. Remove stomach" )     len += format( szMenuBody[len], 255-len, "^n\w4. Remove arms" )     len += format( szMenuBody[len], 255-len, "^n\w5. Remove legs" )     len += format( szMenuBody[len], 255-len, "^n^n\w6. Exit Option Name" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<41<<5)     show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public ResetHud {     if (restore == true)     {          set_user_hitzones(0,id,255)          new Name[32]          get_user_name(id,Name,31)          console_print(id, "set_user_hitzones(0,id,255) done.")          set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)          show_hudmessage(id, "Hitzones are restored to normal")                    restore[id] = false     } } //---------------------------------------------------------------------------------------------- public MenuCommand( id, key ) {     client_print( id, print_console, "[AMX] Key=%d", key )     client_print( id, print_chat, "[AMX] Key=%d", key )     switch( key )     {         case 0:         {             client_print(id, print_chat, "You have selected choice number 1")             remove_head(id)         }         case 1:         {             client_print(id, print_chat, "You have selected choice number 2")             remove_chest(id)         }         case 2:         {             client_print(id, print_chat, "You have selected choice number 3")             remove_stomach(id)         }         case 3:         {             client_print(id, print_chat, "You have selected choice number 4")             remove_arms(id)         }         case 4:         {             client_print(id, print_chat, "You have selected choice number 5")             remove_legs(id)         }         case 5:         {             client_print(id, print_chat, "You Have Exit The Menu")         }     }     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_head(id) {     set_user_hitzones(0,id,253)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,253) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_chest(id) {     set_user_hitzones(0,id,251)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,251) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     restore[id] = true       return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_stomach(id) {     set_user_hitzones(0,id,247)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,247) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     restore[id] = true       return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_arms(id) {     set_user_hitzones(0,id,207)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,207) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     restore[id] = true       return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_legs(id) {     set_user_hitzones(0,id,63)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,63) done.")     client_print(0,print_chat,"Nobody can hit %s with their guns",Name)     restore[id] = true       return PLUGIN_HANDLED }
XunTric is offline
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-08-2005 , 11:25  
Reply With Quote #6

now i get theese errors:

Code:
hitzone_menu.sma(41) : error 055: start of function body without function header
hitzone_menu.sma(42) : error 010: invalid function or declaration
hitzone_menu.sma(47) : error 021: symbol already defined: "get_user_name"
hitzone_menu.sma(52) : error 010: invalid function or declaration
hitzone_menu.sma(99) : warning 219: local variable "Name" shadows a variable at a preceding level
hitzone_menu.sma(113) : warning 219: local variable "Name" shadows a variable at a preceding level
hitzone_menu.sma(127) : warning 219: local variable "Name" shadows a variable at a preceding level
hitzone_menu.sma(141) : warning 219: local variable "Name" shadows a variable at a preceding level
hitzone_menu.sma(155) : warning 219: local variable "Name" shadows a variable at a preceding level
hitzone_menu.sma(169) : warning 219: local variable "Name" shadows a variable at a preceding level
hitzone_menu.sma(179) : warning 203: symbol is never used: "Name"
the plugin again:

Code:
#include <amxmodx> #include <fun> new bool:restore[33] = false public plugin_init() {     register_plugin("Hitzone Menu", "1.0" ,"Belsebub")     register_clcmd( "say /hitzonemenu","showmenu", -1, "Shows The menu" )     register_clcmd( "say_team /hitzonemenu","showmenu", -1, "Shows The menu" )     register_menucmd(register_menuid("\yRemove Hitzones:"), 1023, "MenuCommand" )     register_event( "ResetHUD", "ResetHud", "b" )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public showmenu(id) {     new szMenuBody[256]     new keys     new len = format( szMenuBody, 255, "\yRemove Hitzones:^n" )     len += format( szMenuBody[len], 255-len, "^n\w1. Remove head" )     len += format( szMenuBody[len], 255-len, "^n\w2. Remove chest" )     len += format( szMenuBody[len], 255-len, "^n\w3. Remove stomach" )     len += format( szMenuBody[len], 255-len, "^n\w4. Remove arms" )     len += format( szMenuBody[len], 255-len, "^n\w5. Remove legs" )     len += format( szMenuBody[len], 255-len, "^n\w6. hsonly" )     len += format( szMenuBody[len], 255-len, "^n^n\w7. Exit Option Name" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6)     show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public ResetHud {     if (restore == true)     {          set_user_hitzones(0,id,255)          new Name[32]          get_user_name(id,Name,31)          console_print(id, "set_user_hitzones(0,id,255) done.")          set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)          show_hudmessage(id, "Hitzones are restored to normal")                    restore[id] = false     } } //---------------------------------------------------------------------------------------------- public MenuCommand( id, key ) {     switch( key )     {         case 0:         {             remove_head(id)         }         case 1:         {             remove_chest(id)         }         case 2:         {             remove_stomach(id)         }         case 3:         {             remove_arms(id)         }         case 4:         {             remove_legs(id)         }         case 5:         {             hsonly(id)         }         case 6:         {             client_print(id, print_chat, "You Have Exit The Menu")         }     }     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_head(id) {     set_user_hitzones(0,id,253)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,253) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the head")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_chest(id) {     set_user_hitzones(0,id,251)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,251) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the chest")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_stomach(id) {     set_user_hitzones(0,id,247)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,247) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the stomach")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_arms(id) {     set_user_hitzones(0,id,207)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,207) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the arms")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_legs(id) {     set_user_hitzones(0,id,63)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,63) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the legs")     restore[id] = true       return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public hsonly(id) {     set_user_hitzones(0,id,2)     new Name[32]     get_user_name(id,Name,31)     console_print(id, "set_user_hitzones(0,id,2) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Enemies can only do headshot on you!")     restore[id] = true     return PLUGIN_HANDLED } //----------------------------------------------------------------------------------------------
Belsebub is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-08-2005 , 11:29  
Reply With Quote #7

As i said, just wild guessing
Get somebody that knows what hes talking about to help
XunTric is offline
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-10-2005 , 14:12  
Reply With Quote #8

can anyone help me plz? i dont want to wait anymore!
Belsebub is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-10-2005 , 14:34  
Reply With Quote #9

This compiles... Im not sure if it works though.
Just add those prints when you choose menu option if you want.
I just copyed the first post, where those prints wasnt there...

Code:
#include <amxmodx> #include <fun> new bool:restore[33] = false public plugin_init() {     register_plugin("Hitzone Menu", "1.0" ,"Belsebub")     register_clcmd( "say /hitzonemenu","showmenu", -1, "Shows The menu" )     register_clcmd( "say_team /hitzonemenu","showmenu", -1, "Shows The menu" )     register_menucmd(register_menuid("\yRemove Hitzones:"), 1023, "MenuCommand" )     register_event( "ResetHUD", "ResetHUD", "b" ) } //---------------------------------------------------------------------------------------------- public showmenu(id) {     new szMenuBody[256]     new keys     new len = format( szMenuBody, 255, "\yRemove Hitzones:^n" )     len += format( szMenuBody[len], 255-len, "^n\w1. Remove head" )     len += format( szMenuBody[len], 255-len, "^n\w2. Remove chest" )     len += format( szMenuBody[len], 255-len, "^n\w3. Remove stomach" )     len += format( szMenuBody[len], 255-len, "^n\w4. Remove arms" )     len += format( szMenuBody[len], 255-len, "^n\w5. Remove legs" )     len += format( szMenuBody[len], 255-len, "^n\w6. hsonly" )     len += format( szMenuBody[len], 255-len, "^n^n\w7. Exit Option Name" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6)     show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public ResetHUD(id) {     if (restore[id] == true)     {          console_print(id, "set_user_hitzones(0,id,255) done.")          set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)          show_hudmessage(id, "Hitzones are restored to normal")                  restore[id] = false     }     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public MenuCommand( id, key ) {     switch( key )     {         case 0:         {             remove_head(id)         }         case 1:         {             remove_chest(id)         }         case 2:         {             remove_stomach(id)         }         case 3:         {             remove_arms(id)         }         case 4:         {             remove_legs(id)         }         case 5:         {             hsonly(id)         }         case 6:         {             client_print(id, print_chat, "You Have Exit The Menu")         }     }     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_head(id) {     set_user_hitzones(0,id,253)         console_print(id, "set_user_hitzones(0,id,253) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the head")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_chest(id) {     set_user_hitzones(0,id,251)       console_print(id, "set_user_hitzones(0,id,251) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the chest")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_stomach(id) {     set_user_hitzones(0,id,247)     console_print(id, "set_user_hitzones(0,id,247) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the stomach")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_arms(id) {     set_user_hitzones(0,id,207)     console_print(id, "set_user_hitzones(0,id,207) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the arms")     restore[id] = true     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public remove_legs(id) {     set_user_hitzones(0,id,63)         console_print(id, "set_user_hitzones(0,id,63) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Now Enemies can't hit you in the legs")     restore[id] = true       return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public hsonly(id) {     set_user_hitzones(0,id,2)           console_print(id, "set_user_hitzones(0,id,2) done.")     set_hudmessage(200, 200, 0, -1.0, 0.45, 2, 6.0, 3.0, 0.01, 0.1, 86)     show_hudmessage(id, "Enemies can only do headshot on you!")     restore[id] = true     return PLUGIN_HANDLED } //----------------------------------------------------------------------------------------------
XunTric is offline
Reply


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 14:09.


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