Raised This Month: $ Target: $400
 0% 

hitzone menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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