Raised This Month: $ Target: $400
 0% 

help lastmenu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
spirit
Senior Member
Join Date: Jul 2009
Location: Quimper
Old 10-21-2009 , 13:52   help lastmenu
Reply With Quote #1

Hi all can you help me for this code. I need create a menu for the last CT and T who the lastman say /last a menu's open and 2 choice possible (shoot for shoot and knife duel). When I choose the knife duel or shoot for shoot my enemy have 15 second for acept or decline. (disarm 2 player and give just knife for knife duel and deagle for shoot for shoot).
But i'm noob for make this menu.
Can you help me please


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

#define PLUGIN    "last_menu"
#define AUTHOR    "spirit"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event"DeathMsg""Event_DeathMsg""a" );
    
register_clcmd"say /last","lastman");
    
register_clcmd"say_team /last","lastman");
    
register_clcmd"say_team /last","lastman");
}

public 
Event_DeathMsg() 
{
    new 
Players32 ];
    new 
Num;
    new 
Count;
    
get_playersPlayersNum"a" );
    
    for ( new 
0Numi++ )  
    {
        switch( 
cs_get_user_teamPlayers ) )
        {
            case 
CS_TEAM_T:
            {
                
Count++
            }
            case 
CS_TEAM_CT:
            {
                
Count++
            }
        }
    }
}

public 
lastman(id)
{
    new 
menu menu_create("\lastman:""last_menu"//menu 
    
menu_additem(menu"\wknife duel""1"0);
    
menu_additem(menu"\wshoot for shoot""2"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
last_menu (id
    
//help code

 
switch(key)
{
    case 
1:
    {
        if( 
is_user_alive(id) )
        
give_item(id"weapon_knife");
        
set_user_health(id100);
        
set_hudmessage(50255)
        
//disarm all
        
strip_user_weapons      
        show_hudmessage
(0,"You have choose knife duel.")  
    }
    case 
2:
    {
        if( 
is_user_alive(id) )
            
//disarm team 
        
strip_user_weapons    
        
// they delay them has 100hp as well as a deagle 
        
set_user_health(id100);
        
give_item(id,"weapon_deagle")
        
cs_set_user_bpammo(id,CSW_DEAGLE,200)
        
set_hudmessage(50255)
        
show_hudmessage(0,"You have choose shoot for shoot.")  
    }

// addition of the time of answer with 2 choices possible 
Can you help me is different of last request because it's for last CT and T and it have a time of answer.

Last edited by spirit; 10-25-2009 at 12:32.
spirit 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 17:36.


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