AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Need] recommendation about menu / player models (https://forums.alliedmods.net/showthread.php?t=163726)

avril-lavigne 08-02-2011 14:56

[Need] recommendation about menu / player models
 
I have custom menus for

Choosing Team
Choosing Model T&CT

some screens


http://i041.radikal.ru/1108/fa/65a8df667312.jpg


how to Detect moment when user is pressing 1 or 2 or 3 in the menu

I was trying just to add debug text and sound but the keys auto send info , even I didnt touch them at all


PHP Code:

if( contain(szText"Terrorist_Select") != -
    { 
        new 
iKeys get_msg_arg_int(1
        new 
bool:bKeyChanged 
        
new szText[512], 
        
new szName[64
        
formatex(szTextcharsmax(szText), "\ySelect a model\w^n^n"

         if( 
iKeys MENU_KEY_1 
            { 
                
client_cmd(id,"mp3 play sound/quad/announce/Visor.mp3")
                
client_print(id,print_center,"Visor")
               if( 
get_pcvar_string(g_pModelName1szNamecharsmax(szName)) ) 
                { 
            
+= formatex(szText[n], charsmax(szText)-n"1. %s^n"szName
                } 
              else 
                {
                       
+= formatex(szText[n], charsmax(szText)-n"\d1. Not Available\w^n"
                       
iKeys &= ~MENU_KEY_1 
                       bKeyChanged 
true                      
                

            } 


avril-lavigne 08-02-2011 15:18

Re: [Need] recommendation about menu / player models
 
how to hook join menu ... need to know what key pressed
oh found finally https://www.sourcemod.net/showthread.php?p=1517772


All times are GMT -4. The time now is 03:29.

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