Raised This Month: $ Target: $400
 0% 

menu only for a User


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-25-2011 , 08:08   Re: menu only for a User
Reply With Quote #5

PHP Code:
#include < amxmodx >

#define PLUGIN "Vivo ou Morto JailBreak"
#define VERSION "1.0"
#define AUTHOR "Viictor #"

new szSoundM[] = { "misc/morto.wav" }  // remove sound/ from path unless sound is located in cstrike/sound/sound/...
new szSoundV[] = { "misc/vivo.wav" 

new 
bool:g_bCmdHasBeenUsed

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /brincadeiras""ClCmd_FunnyTask")
}

public 
plugin_precache()
{
    
precache_sound(szSoundM)
    
precache_sound(szSoundV)
}

public 
ClCmd_FunnyTaskid )
{
    if( 
g_bCmdHasBeenUsed )
    {
        
client_print(idprint_chat"Outra pessoa ja esta usando o menu de brincadeiras")
        return 
PLUGIN_HANDLED
    
}

    
g_bCmdHasBeenUsed true

    
new menu menu_create("\yVivo ou Morto!\r By Viictor#:""hVivoMortoMenuHandled")

    
menu_additem(menu"\yVivo!")
    
menu_additem(menu"\yMorto!")

    
menu_setprop(menuMPROP_EXITMEXIT_NEVER)

    
menu_display(idmenu0)

    return 
PLUGIN_CONTINUE
}

public 
hVivoMortoMenuHandled(idmenuitem)
{
    switch( 
item // MENU_EXIT implied there, also MEXIT_NEVER is set so there is no exit option
    
{
        case 
0:
        {
            
client_cmd(0"spk %s"szSoundV)
            
set_hudmessage(025500.480.3606.03.0,_,_,-1)
            
show_hudmessage(0"VIVO!")
        }
        case 
1:
        {
            
client_cmd(0"spk %s"szSoundM)
            
set_hudmessage(025500.480.3606.03.0,_,_,-1)
            
show_hudmessage(0"MORTO!")
        }
    }

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-25-2011 at 08:11.
ConnorMcLeod 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 12:10.


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