Raised This Month: $ Target: $400
 0% 

Unreachable code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-29-2020 , 13:04   Re: Unreachable code
Reply With Quote #9

Code:
public menu_mode(id, menuid, item) {     // Player wants to exit the menu     if (item == MENU_EXIT)     {         menu_destroy(menuid)         show_menu3_admin(id)         return PLUGIN_HANDLED;     }         // Create some necassary vars     static buffer[2], dummy , gameid         // Retrieve the id of the game mode which was chosen     menu_item_getinfo(menuid, item, dummy, buffer, charsmax(buffer), _, _, dummy)     gameid = buffer[0]     menu_destroy(menuid)         // Check users access level     if (get_user_flags(id) & ArrayGetCell(g_gamemode_flag, (gameid - MAX_GAME_MODES)))     {         // Only allow the game mode to proceed after some checks         if (allowed_custom_game())             command_custom_game(gameid, id)         else             zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT")                     // Show the menu again         show_menu_game_mode(id)     }     else     {         // Player deosnt haves the required access level         zp_colored_print(id, "^x04[ZP]^x01 %L", id, "CMD_NOT_ACCESS")                 // Show the menu again         show_menu_game_mode(id)     }         return PLUGIN_HANDLED; }
__________________








CrazY. 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 13:50.


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