Raised This Month: $ Target: $400
 0% 

menu only for a User


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
victorngl
Member
Join Date: Feb 2011
Old 12-25-2011 , 03:08   menu only for a User
Reply With Quote #1

I need this menu can be accessed only by the first user to type the command to open it.

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >


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

new szSoundM[] = { "sound/misc/morto.wav" 
new 
szSoundV[] = { "sound/misc/vivo.wav" 

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

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

public 
szFunny(id)
{
    new 
menu menu_create("\yVivo ou Morto!\r By Viictor#:""szMenu_Handled")
    
    
menu_additem(menu"\yVivo!""1"0)
    
menu_additem(menu"\yMorto!""2"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_NEVER)
    
    
menu_display(idmenu0)
}
public 
szMenu_Handled(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data)
    
    switch(
key)
    {
        case 
1:{
            
server_cmd("amx_execall spk sound/misc/vivo.wav")
            
set_hudmessage(025500.480.3606.03.0)
            
show_hudmessage(0"VIVO!")
            
szFunny(id)
            
menu_destroy(menu)
            return 
PLUGIN_HANDLED
        
}
        case 
2:{
            
server_cmd("amx_execall spk sound/misc/morto.wav")
            
set_hudmessage(025500.480.3606.03.0)
            
show_hudmessage(0"MORTO!")
            
szFunny(id)
            
menu_destroy(menu)
            return 
PLUGIN_HANDLED
        
}
    }
    
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

victorngl is offline
Send a message via MSN to victorngl Send a message via Skype™ to victorngl
 


Thread Tools
Display Modes

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