Raised This Month: $ Target: $400
 0% 

[SOLVED] Proper way to block team select menu popup on connect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 04-24-2011 , 11:00   [SOLVED] Proper way to block team select menu popup on connect
Reply With Quote #1

Hello everyone. On connection i want to show menu of my own instead of choose team menu.

That what i tried to do:
PHP Code:
register_message(get_user_msgid("ShowMenu"), "message_ShowMenu")

.......

public 
message_ShowMenu(msgiddestid)
{
    static 
strtemp[32]
    
    if (
zp_cs_bank_status[id]<0)
        
load_player_money(id)

    
get_msg_arg_string(4strtempcharsmax(strtemp))
    
    if (!
equal(strtemp"#Team_Select"strlen("#Team_Select"))||zp_cs_bank_status[id]==2||zp_cs_submenuid[id])
        return 
PLUGIN_CONTINUE

    set_msg_block
(msgidBLOCK_SET)
    
show_menu(id0"^n"1
    
clcmd_bank(id)
    return 
PLUGIN_HANDLED

If I comment //clcmd_bank(id) then there is really no team select menu, but if i don't something strange happens: my custom menu actually apprears instead of team select menu, buy if you press for example 1 in my menu you will select team, and if you press 1 once again, you will select class. Any help/explanation will be appreciated!
__________________


Last edited by SonicSonedit; 04-24-2011 at 14:15. Reason: Solved.
SonicSonedit 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 20:13.


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