Raised This Month: $51 Target: $400
 12% 

HNS Deathmatch 2.1


Post New Thread Reply   
 
Thread Tools Display Modes
quilhos
Veteran Member
Join Date: Jun 2010
Old 07-27-2012 , 17:15   Re: HNS Deathmatch 2.1
Reply With Quote #71

Quote:
L 07/27/2012 - 22:21:47: Info (map "c21_gurka2") (file "addons/amxmodx/logs/error_20120727.log")
L 07/27/2012 - 22:21:47: Invalid trie handle provided (0)
L 07/27/2012 - 22:21:47: [AMXX] Displaying debug trace (plugin "hnsdm.amxx")
L 07/27/2012 - 22:21:47: [AMXX] Run time error 10: native error (native "TrieKeyExists")
L 07/27/2012 - 22:21:47: [AMXX] [0] hnsdm.sma::pfn_spawn (line 221)
L 07/27/2012 - 22:21:47: Invalid trie handle provided (0)
L 07/27/2012 - 22:21:47: [AMXX] Displaying debug trace (plugin "hnsdm.amxx")
L 07/27/2012 - 22:21:47: [AMXX] Run time error 10: native error (native "TrieKeyExists")
L 07/27/2012 - 22:21:47: [AMXX] [0] hnsdm.sma::pfn_spawn (line 221)
L 07/27/2012 - 22:21:47: Invalid trie handle provided (0)
L 07/27/2012 - 22:21:47: [AMXX] Displaying debug trace (plugin "hnsdm.amxx")
L 07/27/2012 - 22:21:47: [AMXX] Run time error 10: native error (native "TrieKeyExists")
L 07/27/2012 - 22:21:47: [AMXX] [0] hnsdm.sma::pfn_spawn (line 221)
L 07/27/2012 - 22:21:47: Invalid trie handle provided (0)
Dont work..
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-27-2012 , 17:34   Re: HNS Deathmatch 2.1
Reply With Quote #72

Damn, my bad, updated.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 07-27-2012 , 20:13   Re: HNS Deathmatch 2.1
Reply With Quote #73

I think this version works, thanks .
(If you can tell me what is wrong with the original version)
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 10-03-2012 , 09:21   Re: HNS Deathmatch 2.1
Reply With Quote #74

Connor I found a bug in windows server, the server run without "error" (no logs), but he crash because some sort of overflow (sz_GetSpace I think). It's not another plugin causing this because I test it.

Appreciate your help
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!

Last edited by quilhos; 10-03-2012 at 09:21.
quilhos is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 11-24-2012 , 04:59   Re: HNS Deathmatch 2.1
Reply With Quote #75

Someone can help?
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 02-02-2013 , 08:17   Re: HNS Deathmatch 2.1
Reply With Quote #76

bump
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 02-16-2013 , 19:50   Re: HNS Deathmatch 2.1
Reply With Quote #77

Connor any luck?
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
Gooday
Junior Member
Join Date: Jan 2024
Old 01-24-2024 , 05:10   Re: HNS Deathmatch 2.1
Reply With Quote #78

Quote:
Originally Posted by benamo6 View Post
you should add hns_hiders_knife cvar like exolent hns, because some people want to show hiders knife...
I was looking for it to. I have no skills at codding, found that Only Stab cvar for CT and coppied it for T but there I like somehow I turned off both animations and it works)) I'm 100% sure there is a better way, but that all I have. There is no cvar, so if somebody will try it, make a copy of your previous amxx, so you have 2 variants hiders knife ON/OFF))

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <hamsandwich>

new const g_Plugin[] = "HNS Deathmatch";
new const 
g_Version[] = "2.1";
new const 
g_Author[] = "Jon";

new 
g_CvarEnable;
new 
g_CvarGameName;
new 
g_CvarStabOnly;
new 
g_CvarRespawnDelay;
new 
g_CvarProtectionTime;
new 
g_CvarNoFlash;
new 
g_CvarHidersFlashbangs;
new 
g_CvarHidersSmokegrenade;
new 
g_CvarHidersHegrenade;
new 
g_CvarSeekersFlashbangs;
new 
g_CvarSeekersSmokegrenade;
new 
g_CvarSeekersHegrenade;
new 
g_MsgScreenFade;



new const 
g_BuyCommands[][] =
{
    
"usp""glock""deagle""p228""elites",
    
"fn57""m3""xm1014""mp5""tmp""p90",
    
"mac10""ump45""ak47""galil""famas",
    
"sg552""m4a1""aug""scout""awp""g3sg1",
    
"sg550""m249""vest""vesthelm""flash",
    
"hegren""sgren""defuser""nvgs""shield",
    
"primammo""secammo""km45""9x19mm""nighthawk",
    
"228compact""fiveseven""12gauge""autoshotgun",
    
"mp""c90""cv47""defender""clarion""krieg552",
    
"bullpup""magnum""d3au1""krieg550"
}

new const 
g_EntityClassNames[][] = 
{
    
"func_breakable"
    
"func_door_rotating"
    
"func_door"
    
"func_vip_safetyzone"
    
"func_escapezone"
    
"hostage_entity"
    
"monster_scientist"
    
"func_bomb_target"
    
"info_bomb_target"
}

new 
bool:g_Joined[33];

public 
plugin_init() 
{
    
register_plugin(g_Pluging_Versiong_Author);
    
register_cvar("hns_deathmatch_version"g_VersionFCVAR_SERVER);
    
    
g_CvarEnable register_cvar("hnsdm_enable""1");
    
    if(!
get_pcvar_num(g_CvarEnable))
        return;
    
    new 
gamename[32];
    
formatex(gamename31"%s %s"g_Pluging_Version);
    
    
g_CvarGameName register_cvar("hnsdm_gamename"gamename);
    
g_CvarStabOnly register_cvar("hnsdm_stabonly""1");
    
g_CvarRespawnDelay register_cvar("hnsdm_respawndelay""1.5");
    
g_CvarProtectionTime register_cvar("hnsdm_protectiontime""5.0");
    
g_CvarNoFlash register_cvar("hnsdm_noflash""1");
    
g_CvarHidersFlashbangs register_cvar("hnsdm_hiders_flashbangs""1")
    
g_CvarHidersSmokegrenade register_cvar("hnsdm_hiders_smokegrenade""1")
    
g_CvarHidersHegrenade register_cvar("hnsdm_hiders_hegrenade""0")
    
g_CvarSeekersFlashbangs register_cvar("hnsdm_seekers_flashbangs""0")
    
g_CvarSeekersSmokegrenade register_cvar("hnsdm_seekers_smokegrenade""0")
    
g_CvarSeekersHegrenade register_cvar("hnsdm_seekers_hegrenade""0")
    
g_MsgScreenFade get_user_msgid("ScreenFade");
    
    
register_event("DeathMsg""eventDeathMsg""a");
    
register_message(g_MsgScreenFade"msgScreenFade");
    
    
register_forward(FM_CmdStart"fwdCmdStart");
    
register_forward(FM_ClientKill"fwdClientKill");
    
register_forward(FM_GetGameDescription,"fwdGetGameDescription");
    
register_forward(FM_PlayerPostThink"fwdPlayerPostThink");
    
    
RegisterHam(Ham_Spawn"player""eventPlayerSpawn"1);

    
register_clcmd("buy""HandleBlock");
    
register_clcmd("buyammo1""HandleBlock");
    
register_clcmd("buyammo2""HandleBlock");
    
register_clcmd("buyequip""HandleBlock");
    
register_clcmd("cl_autobuy""HandleBlock");
    
register_clcmd("cl_rebuy""HandleBlock");
    
register_clcmd("cl_setautobuy""HandleBlock");
    
register_clcmd("cl_setrebuy""HandleBlock");
    
register_clcmd("chooseteam""HandleBlock");
    
register_clcmd("say /respawn""RespawnPlayer");
}

public 
plugin_precache() register_forward(FM_Spawn"fwdSpawn");
    
public 
eventDeathMsg()
{
    new 
killer read_data(1)
    new 
victim read_data(2)
    
    if(
killer == && get_user_team(victim) == 1
    {
        new 
lucky GetRandomCT();
        
        
cs_set_user_team(lucky1)
        
client_print(luckyprint_chat"[HNS] An idiot jumped off and you were lucky and got transfered to Terrorist.")
        
        
cs_set_user_team(victim2);
        
        
GiveItems(lucky)
        
SetStealth(lucky)
    }
    
    else if(
killer == victim)
    {
        
set_task(get_pcvar_float(g_CvarRespawnDelay), "RespawnPlayer"victim)
        
        return 
PLUGIN_HANDLED;
    }
    
    else if(
get_user_team(killer) == 2)     
    { 
        
cs_set_user_team(killer1); 
        
cs_set_user_team(victim2); 
        
        
GiveItems(killer)
        
SetStealth(killer)
    }
            
    
set_task(get_pcvar_float(g_CvarRespawnDelay), "RespawnPlayer"victim)
    
    return 
PLUGIN_CONTINUE;
}

public 
eventPlayerSpawn(id
{
    if(
is_user_alive(id)) GiveItems(id);
}

public 
RespawnPlayer(id
{
    if(!
is_user_alive(id)) ExecuteHam(Ham_CS_RoundRespawnid);    
}

public 
fwdCmdStart(idhandleseed)
{

    if(!
get_pcvar_num(g_CvarStabOnly) || !is_user_alive(id) || get_user_team(id) != 2) {
    static 
clipammo;
    
    if(
get_user_weapon(idclipammo) != CSW_KNIFE) return FMRES_IGNORED;
        
    static 
button;
    
button get_uc(handleUC_Buttons);
                    
    if(
button IN_ATTACK IN_ATTACK2button = (button & ~IN_ATTACK) & (button & ~IN_ATTACK2); 

        
    
set_uc(handleUC_Buttonsbutton);
    
}else{
        
    static 
clipammo;
    
    if(
get_user_weapon(idclipammo) != CSW_KNIFE) return FMRES_IGNORED;
        
    static 
button;
    
button get_uc(handleUC_Buttons);
                    
    if(
button IN_ATTACKbutton = (button & ~IN_ATTACK) | IN_ATTACK2;
        
    
set_uc(handleUC_Buttonsbutton);
    
}
    return 
FMRES_SUPERCEDE;
}

public 
fwdPlayerPostThink(id)
{
    if(!
g_Joined[id])
    {
        if(
get_user_team(id) < && !is_user_alive(id))
        {
            
set_task(1.0"RespawnPlayer"id)
            
            
g_Joined[id] = true;
        }
    }
}

public 
fwdClientKill(id) return FMRES_SUPERCEDE;

public 
fwdSpawn(ent)
{
    if(!
pev_valid(ent)) return FMRES_IGNORED;
    
    new class[
32];
    
pev(entpev_classname, class, 31);
    
    for(new 
0sizeof(g_EntityClassNames); i++)
    {
        if(
equal(class, g_EntityClassNames[i]))
        {
            
engfunc(EngFunc_RemoveEntityent);
            
            return 
FMRES_SUPERCEDE;
        }
    }
    
    return 
FMRES_IGNORED;
}

public 
fwdGetGameDescription()
{
    new 
gamename[32];
    
get_pcvar_string(g_CvarGameNamegamename31)
    
    
forward_return(FMV_STRINGgamename)
    
    return 
FMRES_SUPERCEDE;
}

public 
msgScreenFade(msgiddestid)
{
    if(
is_user_alive(id) && get_pcvar_num(g_CvarNoFlash) == get_user_team(id))
    {
        static 
data[4];
        
data[0] = get_msg_arg_int(4); 
        
data[1] = get_msg_arg_int(5)
        
data[2] = get_msg_arg_int(6); 
        
data[3] = get_msg_arg_int(7)
            
        if(
data[0] == 255 && data[1] == 255 && data[2] == 255 && data[3] > 199) return PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
client_command(id)
{
    new 
sArg[13];
    
    if(
read_argv(0sArg12) > 11) return PLUGIN_CONTINUE;
    
    for(new 
0sizeof(g_BuyCommands); i++)
    {
        if(
equali(g_BuyCommands[i], sArg0)) return PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
HandleBlock(id) return PLUGIN_HANDLED;
    
public 
UnsetStealth(idfm_set_user_rendering(idkRenderFxGlowShell000kRenderNormal255);

SetStealth(id)
{
    if(
get_user_health(id) != 100)
        
fm_set_user_health(id100)
        
    
fm_set_user_rendering(idkRenderFxGlowShell000kRenderTransColor0);
    
set_task(get_pcvar_float(g_CvarProtectionTime), "UnsetStealth"id)
}

GiveItems(id)
{    
    
cs_reset_user_model(id)
    
fm_strip_user_weapons(id)
    
    switch(
get_user_team(id))
    {
        case 
1:
        {    
            
fm_give_item(id"weapon_knife")
            if(
get_pcvar_num(g_CvarHidersFlashbangs))
            {
                
fm_give_item(id"weapon_flashbang")
                
cs_set_user_bpammo(idCSW_FLASHBANGget_pcvar_num(g_CvarHidersFlashbangs))
            }
            
            if(
get_pcvar_num(g_CvarHidersSmokegrenade))
                
fm_give_item(id"weapon_smokegrenade")
                
            if(
get_pcvar_num(g_CvarHidersHegrenade))
                
fm_give_item(id"weapon_hegrenade")
        }
        
        case 
2:
        {
            
fm_give_item(id"weapon_knife")
                
            if(
get_pcvar_num(g_CvarSeekersFlashbangs))
            {
                
fm_give_item(id"weapon_flashbang")
                
cs_set_user_bpammo(idCSW_FLASHBANGget_pcvar_num(g_CvarSeekersFlashbangs))
            }
            
            if(
get_pcvar_num(g_CvarSeekersSmokegrenade))
                
fm_give_item(id"weapon_smokegrenade")
                
            if(
get_pcvar_num(g_CvarSeekersHegrenade))
                
fm_give_item(id"weapon_hegrenade")
        }
    }
}

GetRandomCT()
{
    static 
iPlayers[32], iCT_num;
    
get_players(iPlayersiCT_num"ae""CT");
        
    if(!
iCT_num)
        return 
0;
        
    return 
iCT_num iPlayers[random(iCT_num)] : iPlayers[iCT_num 1];
}

stock fm_set_user_godmode(indexgodmode 0
{
    
set_pev(indexpev_takedamagegodmode == DAMAGE_NO DAMAGE_AIM)

    return 
1
}

stock fm_set_user_rendering(indexfx kRenderFxNone255255255render kRenderNormalamount 16
{
    return 
fm_set_rendering(indexfxrgbrenderamount)
}

stock fm_strip_user_weapons(index
{
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"player_weaponstrip"))
    if (!
pev_valid(ent))
        return 
0

    dllfunc
(DLLFunc_Spawnent)
    
dllfunc(DLLFunc_Useentindex)
    
engfunc(EngFunc_RemoveEntityent)

    return 
1
}

stock fm_give_item(index, const item[]) 
{
    if (!
equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
        return 
0

    
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem))
    if (!
pev_valid(ent))
        return 
0

    
new Float:origin[3]
    
pev(indexpev_originorigin)
    
set_pev(entpev_originorigin)
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN)
    
dllfunc(DLLFunc_Spawnent)

    new 
save pev(entpev_solid)
    
dllfunc(DLLFunc_Touchentindex)
    if (
pev(entpev_solid) != save)
        return 
ent

    engfunc
(EngFunc_RemoveEntityent)

    return -
1
}

stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16
{
    new 
Float:RenderColor[3]
    
RenderColor[0] = float(r)
    
RenderColor[1] = float(g)
    
RenderColor[2] = float(b)

    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorRenderColor)
    
set_pev(entitypev_rendermoderender)
    
set_pev(entitypev_renderamtfloat(amount))

    return 
1
}

stock fm_set_user_health(indexhealth
{
    
health set_pev(indexpev_healthfloat(health)) : dllfunc(DLLFunc_ClientKillindex)

    return 
1

Gooday is offline
Reply



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 18:57.


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