Plugin Deathmatch
#1
Ando buscando un "Deathmatch" que funcione con "ReHLDS" eh buscado por todos lados y ninguno me funciona!

estaba probando este "DeathMatch" de kikizon, pero no tiene Respawn aleatorio. 

Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>

new const P_INFO[ ][ ] = { "DeathMatch""beta""kikizon" };

#define TASK_RESPAWN 1487
#define TASK_PROTECTION 1587

#define ID_RESPAWN ( taskid - TASK_RESPAWN )
#define ID_PROT ( taskid - TASK_PROTECTION )

new kWpn33 ], kLastItem33 ][ ];
new 
dm_timetorespawndm_grenadesdm_protectiontime;

enum _:WPNDATA
{
    
WPN_NAME30 ],
    
WPN_ENT20 ],
    
WPN_CSW
}

new const 
PrimaryWpns[ ][ WPNDATA ] = 
{
    { 
"Mp5 Navy""weapon_mp5navy"CSW_MP5NAVY },
    { 
"Galil""weapon_galil"CSW_GALIL },
    { 
"Famas""weapon_famas"CSW_FAMAS },
    { 
"M4A1""weapon_m4a1"CSW_M4A1 },
    { 
"Ak47""weapon_ak47"CSW_AK47},
    { 
"BullPop (AUG)""weapon_aug"CSW_AUG },
    { 
"AWP Magnum""weapon_awp"CSW_AWP },
    { 
"M249""weapon_m249"CSW_M249 }
};

new const 
SecondaryWpns[ ][ WPNDATA ] =
{
    { 
"Glock""weapon_glock18"CSW_GLOCK18 },
    { 
"USP""weapon_usp"CSW_USP },
    { 
"Deagle""weapon_deagle"CSW_DEAGLE }
};

new const 
objective_ents[ ][ ] = { "func_bomb_target""info_bomb_target""hostage_entity""monster_scientist",
                
"func_hostage_rescue""info_hostage_rescue""info_vip_start",
                
"func_vip_safetyzone""func_escapezone" };

public 
plugin_precache() register_forwardFM_Spawn"fm_SpawnObj" );

public 
plugin_init() 
{
    
register_pluginP_INFO], P_INFO], P_INFO] );
    
    
RegisterHamHam_Spawn"player""ham_PlayerSpawnPost"true );
    
RegisterHamHam_Killed"player""ham_PlayerKilledPost"true );
    
    
register_clcmd"say /guns""cmdWpns" );
    
    
register_event"TeamInfo""WhenJoinTeam""a")
    
register_messageget_user_msgid("StatusIcon"), "message_statusicon" );
    
    
dm_timetorespawn register_cvar"dm_ttr""5.0" );
    
dm_grenades register_cvar"dm_grenades""1" );
    
dm_protectiontime register_cvar"dm_pt""3.0" );
}

public 
client_putinserverindex )
{
    
kLastItemindex ] = { 0}
    
kWpnindex ] = 0;
}

public 
client_disconnectindex 
{
    
remove_taskindex TASK_RESPAWN );
    
remove_taskindex TASK_PROTECTION );
}

public 
WhenJoinTeam()
{
    new 
index read_data(1);
    
    if( !
is_user_connectedindex )) return;
    
    
set_taskget_pcvar_float(dm_timetorespawn), "Respawn"index TASK_RESPAWN );
}

public 
message_statusicon(msg_idmsg_destid)
{
    static 
szIcon[8]; get_msg_arg_string(2szIconcharsmax(szIcon));
 
    if (
equal(szIcon"buyzone") && get_msg_arg_int(1))
    {
        
set_pdata_int(id235get_pdata_int(id235) & ~(1<<0));
        return 
PLUGIN_HANDLED;
    }
 
    return 
PLUGIN_CONTINUE;


public 
ham_PlayerSpawnPostindex )
{
    if( !
is_user_aliveindex )) return;
    
    
kWpnindex ] = 0;
    
    
strip_user_weaponsindex )
    
give_itemindex"weapon_knife" );
    
cmdWpnsindex );
    
    
set_user_godmodeindex);
    
set_user_renderingindexkRenderFxGlowShell02550kRenderNormal10 );
    
set_taskget_pcvar_float(dm_protectiontime), "RemoveGM"index TASK_PROTECTION );
}

public 
ham_PlayerKilledPostvictimattackershouldgibs )
{
    if( !
is_user_connectedattacker )) return;
    
    
set_taskget_pcvar_float(dm_timetorespawn), "Respawn"victim TASK_RESPAWN );
}

public 
fm_SpawnObj(ent)
{
    if (!
pev_valid(ent)) return FMRES_IGNORED;

    static 
classname[32], ipev(entpev_classnameclassnamesizeof classname 1);
    
    for (
0sizeof objective_ents; ++i
    {
        if (
equal(classnameobjective_ents[i])) 
        {
            
engfunc(EngFunc_RemoveEntityent);
            return 
FMRES_SUPERCEDE;
        }
    }

    return 
FMRES_IGNORED;
}

public 
Respawntaskid )
{
    if( 
is_user_aliveID_RESPAWN ) ) return;
    
    
ExecuteHamBHam_CS_RoundRespawnID_RESPAWN );
}

public 
RemoveGMtaskid )
{
    if( !
is_user_aliveID_PROT )) return;
    
    
set_user_godmodeID_PROT);
    
set_user_renderingID_PROT );
}

public 
cmdWpnsindex )
{
    static 
menumenu menu_create"\y[ \dDeathMatch \y] \wArmamento^n^t^t^t^t\d by kikizon""menu_cmd" );
    
    
menu_additemmenu"Elegir Armamento""1" );
    
menu_additemmenu, (kLastItemindex ][ ] && kLastItemindex ][ ])?"Elegir Anterior":"\dElegir Anterior""2" );
    
    
menu_displayindexmenu );
    return 
PLUGIN_HANDLED;
}

public 
menu_cmdindexmenuitem )
{
    switch( 
item )
    {
        case 
0ShowWeaponMenuindex );
        case 
1
        {
            if( 
kLastItemindex ][ ] && kLastItemindex ][ ] )
            {
                
Rebuyindex )
                return 
PLUGIN_HANDLED;
            }
            
            
cmdWpnsindex );
        }
        
        case 
MENU_EXIT: { menu_destroymenu ); return PLUGIN_HANDLED; }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

ShowWeaponMenuindex )
{
    static 
menui;
    
    if( 
kWpnindex ] == 0)
    {
        
menu menu_create"\y[ \dDeathMatch \y] \wArmamento Primario^n^t^t^t^t\d by kikizon""menu_weapon" );
        
        for( 
sizeof PrimaryWpns ; ++)
            
menu_additemmenuPrimaryWpns][ WPN_NAME ], "" );
    }
    else if( 
kWpnindex ] == )
    {
        
menu menu_create"\y[ \dDeathMatch \y] \wArmamento Secundario^n^t^t^t^t\d by kikizon""menu_weapon" );
        
        for( 
sizeof SecondaryWpns ; ++)
            
menu_additemmenuSecondaryWpns][ WPN_NAME ], "" );
    }
    
    
menu_displayindexmenu );
}

public 
menu_weaponindexmenuitem )
{
    if( 
item == MENU_EXIT)
    {
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
kWpnindex ] == )
    {
        
give_itemindexPrimaryWpnsitem ][ WPN_ENT ] );
        
cs_set_user_bpammoindexPrimaryWpnsitem ][ WPN_CSW ], 999 );
        
        
kLastItemindex ][ ] = item;
        
kWpnindex ] = 1;
        
        
ShowWeaponMenuindex );
    }
    else if (
kWpnindex ] == )
    {
        
give_itemindexSecondaryWpnsitem ][ WPN_ENT ] );
        
cs_set_user_bpammoindexSecondaryWpnsitem ][ WPN_CSW ], 999 );
        
        
kLastItemindex ][ ] = item;
        
kWpnindex ] = 2;
        
        if( 
get_pcvar_num(dm_grenades))
        {
            
give_itemindex"weapon_hegrenade" );
            
give_itemindex"weapon_flashbang" );
            
cs_set_user_bpammoindexCSW_HEGRENADE);
            
cs_set_user_bpammoindexCSW_FLASHBANG);
        }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

Rebuyindex )
{
    if( !
is_user_aliveindex )) return;
    
    
give_itemindexPrimaryWpnskLastItemindex ][0] ][ WPN_ENT ] );
    
give_itemindexSecondaryWpnskLastItemindex ][1] ][ WPN_ENT ] );
    
cs_set_user_bpammoindexSecondaryWpnskLastItemindex ][1] ][ WPN_CSW ], 999 );
    
cs_set_user_bpammoindexPrimaryWpnskLastItemindex ][0] ][ WPN_CSW ], 999 );
    
    if( 
get_pcvar_num(dm_grenades))
    {
        
give_itemindex"weapon_hegrenade" );
        
give_itemindex"weapon_flashbang" );
        
cs_set_user_bpammoindexCSW_HEGRENADE);
        
cs_set_user_bpammoindexCSW_FLASHBANG);
    }
    
    
kWpnindex ] = 2;


Responder
#2
https://amxmodx-es.com/Thread-Random-spa...0-11-09-14 puedes ocupar este plugin junto a deathmatch.
Responder
#3
busca ReCSDM
https://amxmodx-es.com/Thread-CSDM-para-Re-hlds
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)