Raised This Month: $ Target: $400
 0% 

Menu Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MouseSplash!
Veteran Member
Join Date: Dec 2009
Location: En Tu Mente!
Old 12-26-2009 , 07:21   Menu Help
Reply With Quote #1

terrorist if say /duel

duel menu to choose duel --> usp --> player menu choose --> mousesplash

prin_chat = TERRORIST is duel usp a mousesplash - start!!!
---------------------------------------------------------------------------


terrorist if say /duel

prin_chat = You Are In Combat!!!
---------------------------------------------------------------------------

more later...
prin_chat = TERRORIST IS WON THE DUEL
---------------------------------------------------------------------------

Terrorist > say /duel - Again

duel menu to choose duel --> usp --> player menu choose --> OTHER-PLAYER

prin_chat = TERRORIST is duel usp a mousesplash - start!!!


------------------------------------------------------------------------
code
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "plugin"
#define VERSION "1.0"
#define AUTHOR "autor"

new g_iMaxPlayers

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_iMaxPlayers get_maxplayers()
    
register_clcmd("say /duel" "duelo_menu")
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
}

public 
duelo_menu(id)
{    
    if (
cs_get_user_team(id) != CS_TEAM_T || !is_user_alive(id))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
ctCounttrCount;
    
    for (new 
1<= g_iMaxPlayersi++)
    {
        if (!
is_user_alive(i))
        {
            continue;
        }
        
        switch (
cs_get_user_team(i))
        {
            case 
CS_TEAM_CT:
            {
                
ctCount++;
            }
            
            case 
CS_TEAM_T:
            {
                
trCount++;
            }
        }
    }

    if (
trCount 1)
    {
        return 
PLUGIN_HANDLED;
    }
    
    if (
ctCount == 0)
    {
        return 
PLUGIN_HANDLED;
    }
    if(
get_user_team(id) == )
    {
        new 
duelomenu menu_create("\yDuel:""sub_duelo_menu")
        
        
menu_additem(duelomenu"\w USP",     "1"0);

        
        
menu_setprop(duelomenuMPROP_EXITMEXIT_ALL);
        
menu_display(idduelomenu0);
    }

    return 
PLUGIN_HANDLED;
}

public 
sub_duelo_menu(idduelomenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(duelomenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[6], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(duelomenuitemAccessData,5Name63Callback);
        
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
Usp(id)
        }
    }

    
menu_destroy(duelomenu);

    return 
PLUGIN_HANDLED;
}

public 
Usp(id)
{
    new 
menu menu_create("\yChoose The Player:""submenu3");
    
    new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];

    
get_players(playerspnum"a");

    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu3(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
tempid str_to_num(data);
    
    
strip_user_weapons(tempid);
    
give_item(tempid"weapon_usp");
    
cs_set_user_bpammo(tempid,CSW_USP,12),
    
give_item(tempid"weapon_knife");
    
set_user_health(tempid100);
    
    
strip_user_weapons(id);
    
set_user_health(id100);
    
give_item(id"weapon_usp");
    
cs_set_user_bpammo(id,CSW_USP,12);
    
give_item(id"weapon_knife");
            
    new 
szName[32], szName2[32];
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_hudmessage050110, -1.00.4025.08.00.00.010);
    
show_hudmessage(0"%s Reto A %s^n a un duelot"szNameszName2);
        
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 }

 public 
fw_PlayerKilled(victimattackershouldgib)
{
      static 
namevictim[33]
      
get_user_name(victimnamevictim32)
      new 
aName[32]
      
get_user_name(attackeraNamesizeof(aName)-1)
 
      if(
get_user_team(attacker) == 1)
            
client_print(0print_chat"%s kill a %s",aName,namevictim)
            
client_print(attackerprint_chat"You Kill a %s",namevictim)

MouseSplash! is offline
Reply


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 04:16.


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