Raised This Month: $ Target: $400
 0% 

edit plugin NST_Effects_Killer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jacktoic
Junior Member
Join Date: Jul 2013
Old 08-23-2013 , 21:20   edit plugin NST_Effects_Killer
Reply With Quote #1

how to put the sound through the wall hs hitting this plugin ?
jacktoic is offline
Winchester90
Senior Member
Join Date: May 2013
Location: Dale! RG4L Baby
Old 08-24-2013 , 05:41   Re: edit plugin NST_Effects_Killer
Reply With Quote #2

Show the code please
__________________
Proyectos No comercio XD
Zombie Resurection 1.0 (45%)
Winchester90 is offline
Old 08-24-2013, 15:54
jacktoic
This message has been deleted by jacktoic.
jacktoic
Junior Member
Join Date: Jul 2013
Old 08-25-2013 , 20:45   Re: edit plugin NST_Effects_Killer
Reply With Quote #3

PHP Code:
///////////////////////////////////////////////////
//  AMXMOD[X]                                    //
//  Effects Killer                            //
//  by NST ([email protected])        //
//                                               //
// cvar:                                         //
//  nst_ek_time_kill < number >                  //
//      < number > = 8,9,....                    //
//                                               //
//  nst_ek_sex < number >                        //
//      < number > = 1 or 2                      //
//      1 - Man                                  //
//      2 - Woman                                //
//  nst_ek_type < number >                       //
//      < number > = 1 or 2                      //
//      1 - use image                            //
//      2 - use text                 //
///////////////////////////////////////////////////

#include <amxmodx>
#include <fakemeta>

#define LEVELS 8

new kills[33] = {0,...};
new 
timekill[33] = {0,...};
new 
victims[33] = {0,...};
new 
levels[8] = {12345678};

new 
spr_current[33] = {0,...}
new 
spr_current_2[33] = {0,...}
new 
time_show_set[33] = {0,...}
new 
iconstatustime_show 2g_firstBloodg_lastkill
new g_FM_Running


public plugin_init() {
    
register_plugin("Effects Killer","1.0","NST")
    
    
register_event("TextMsg""eRestart""a""2&#Game_C""2&#Game_w")
    
register_event("SendAudio""eEndRound""a""2&%!MRAD_terwin""2&%!MRAD_ctwin""2&%!MRAD_rounddraw")
    
register_event("RoundTime""eNewRound""bc")
    
    
register_cvar("nst_ek_time_kill","8")
    
register_cvar("nst_ek_sex","1")
    
register_cvar("nst_ek_type","1")
    
    
register_forward(FM_PlayerPreThink,"check_spr")
    
iconstatus get_user_msgid("StatusIcon")
    
g_FM_Running is_module_loaded("FakeMeta")
    
//return PLUGIN_CONTINUE
}

public 
client_death(killervictimwpnindexhitplaceTK)
{
    if (
killer == victim) return PLUGIN_HANDLED
    kills
[victim] = 0
    
    
new team[6],sex[6]
    if (
get_user_team(killer) == 1team "T"
    
else team "CT"
    
    
new sex_cvar get_cvar_num("nst_ek_sex")
    if (
sex_cvar == 2sex "woman"
    
else sex "man"

    
new killer_name[32], victim_name[32]    
    
get_user_name(killerkiller_name31)
    
get_user_name(victimvictim_name31)
    
    
victims[victim] = killer
    
new headshot = (hitplace == HIT_HEAD) ? 0

    
new sec_c get_systime()
    new 
timekill_cvar get_cvar_num("nst_ek_time_kill")
    
    new 
timeleft sec_c-timekill[killer]
    
timekill[killer] = sec_c
    
if (timeleft<=timekill_cvarkills[killer] += 1;
    else 
kills[killer] = 1;
    if (
kills[killer]>LEVELSkills[killer] = 1
    
    
new players_ct[32], players_t[32], ictite
    get_players
(players_ct,ict,"ae","CT")   
    
get_players(players_t,ite,"ae","TERRORIST")
    if (
ict == || ite == 0g_lastkill 1
    
    
new g_revenge 0
    
if (victim == victims[killer])
    {
        
g_revenge 1
        victims
[killer] = 0
    
}
        
    
    new 
check_spr2check_sound
    
if (g_lastkill == 1)
    {
        
g_lastkill 0
        show_spr
(killer15)
        
show_msg(killer,"LAST KILL")
    }    
    else if (
g_revenge == 1)
    {
        
show_spr(killer16)
        
show_msg(killer,"PHUC THU")
        
client_cmd(killer,"spk misc/MultiKill/%s/Revenge_%s"sexteam)
    }
    else if((
wpnindex != CSW_KNIFE) && (wpnindex != CSW_HEGRENADE) && !can_see_fm(killervictim)) 
    {
        if (
headshotshow_spr(killer20)
        else 
show_spr(killer19)
        
show_msg(killer,"WALL SHOT")
    }
    else if (
headshot && wpnindex)
    {
        
show_spr(killer12)
        
show_msg(killer,"HEADSHOT")
        if (
kills[killer] == 1)
        {
            
client_cmd(killer,"spk misc/MultiKill/%s/Headshot_%s"sexteam)
            
check_sound 1
        
}
    }
    else if (
wpnindex == CSW_KNIFE)
    {
        
show_spr(killer14)
        
show_msg(killer,"KNIFE KILL")
        if (
kills[killer] == 1)
        {
            
client_cmd(killer,"spk misc/MultiKill/%s/Knifekill_%s"sexteam)
            
check_sound 1
        
}
    }
    else if (
wpnindex == CSW_HEGRENADE)
    {
        
show_spr(killer11)
        
show_msg(killer,"HEGRENADE KILL")
        if (
kills[killer] == 1)
        {
            
client_cmd(killer,"spk misc/MultiKill/%s/Grenadekill_%s"sexteam)
            
check_sound 1
        
}
    }
    else 
check_spr2 1
    
if (check_spr2 == 1hide_spr(killerspr_current_2[killer])
    

    if (
g_firstBlood)
    {
        
g_firstBlood 0
        show_spr
(killer9)
        
show_msg(killer,"FIRST KILL")
        if (
check_sound != 1client_cmd(killer"spk misc/MultiKill/%s/MultiKill_1_%s"sexteam);
    }
    else {
        for (new 
0LEVELSi++)
        {
            if (
kills[killer] == levels[i])
            {
                
show_spr(killer, (i+1))
                
                new 
msg[33]
                
format (msg ,33"%i KILL", (i+1));
                
show_msg(killermsg);
                
                if (
check_sound != 1client_cmd(killer"spk misc/MultiKill/%s/MultiKill_%i_%s"sex, (i+1), team);
                return 
PLUGIN_CONTINUE;
            }
        }
    }


    return 
PLUGIN_CONTINUE
}

public 
bomb_defused(defuser)
{
    new 
sex[6]
    new 
sex_cvar get_cvar_num("nst_ek_sex")
    if (
sex_cvar == 2sex "woman"
    
else sex "man"
    
    
show_spr(defuser17)
    
client_cmd(defuser"spk misc/MultiKill/%s/C4_Defuse"sex);
}

public 
bomb_planted(planter)
{
    new 
sex[6]
    new 
sex_cvar get_cvar_num("nst_ek_sex")
    if (
sex_cvar == 2sex "woman"
    
else sex "man"

    
show_spr(planter18)
    
client_cmd(planter"spk misc/MultiKill/%s/C4_Set"sex);
}

public 
show_msg(killermsg[])
{
    new 
type_cvar get_cvar_num("nst_ek_type")
    if (
type_cvar == 2)
    {
        
set_hudmessage(02040, -1.00.6510.023.00.30.32)
    
show_hudmessage(idmsg)
}
    return 
PLUGIN_CONTINUE
}

public 
show_spr(ididspr)
{
    new 
type_cvar get_cvar_num("nst_ek_type")
    if (
type_cvar == 1)
    {
        
        new 
sec_c get_systime()
        
time_show_set[id] = sec_c

        hide_spr
(idspr_current[id])
        if (
idspr==11 || idspr==12 || idspr==13 || idspr==14 || idspr==15 || idspr==16 || idspr==19 || idspr==20)
        {
            
hide_spr(idspr_current_2[id])
            
spr_current_2[id] = idspr
        
}
        else
        {
            
spr_current[id] = idspr
        
}
        
        new 
spr_name[33]
        
spr_name get_sprname(idspr)
        
        if(!(
pev(id,pev_button) & FL_ONGROUND))
        {    
            
message_begin(MSG_ONE,iconstatus,{0,0,0},id);
            
write_byte(1); // status (0=hide, 1=show, 2=flash)
            
write_string(spr_name); // sprite name
            
message_end();
        }
    }
    return 
PLUGIN_CONTINUE


public 
hide_spr(ididspr)
{
    if (
idspr 0)
    {
        new 
spr_name[33]
        
spr_name get_sprname(idspr)
        
        if(!(
pev(id,pev_button) & FL_ONGROUND))
        {    
            
message_begin(MSG_ONE,iconstatus,{0,0,0},id);
            
write_byte(0); // status (0=hide, 1=show, 2=flash)
            
write_string(spr_name); // sprite name
            
message_end();
            if (
idspr==11 || idspr==12 || idspr==13 || idspr==14 || idspr==15 || idspr==16 || idspr==19 || idspr==20spr_current_2[id] = 0
            
else spr_current[id] = 0
        
}
    }
    return 
PLUGIN_CONTINUE
}  

public 
check_spr(id)
{
    new 
idspr spr_current[id]
    new 
idspr_2 spr_current_2[id]
    if (
idspr || idspr_2 0)
    {
        new 
sec_c get_systime()
        new 
time_check sec_c time_show_set[id]
        if (
time_check>time_show)
        {
            
hide_spr(ididspr)
            
hide_spr(ididspr_2)
        }
    }

    return 
PLUGIN_CONTINUE
}  


public 
eNewRound()
{
    if (
read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0,floatround_floor))
    {
        
g_firstBlood 1
        
for (new 033i++)
        {
            
timekill[i] = 0
        
}
    }
}

public 
eRestart()
{
    
eEndRound()
    
g_firstBlood 1
}

public 
eEndRound()
{

}


get_sprname(idspr)
{
    new 
spr_name[33]
    if (
idspr==1spr_name "kill_1"
    
if (idspr==2spr_name "kill_2"
    
if (idspr==3spr_name "kill_3"
    
if (idspr==4spr_name "kill_4"
    
if (idspr==5spr_name "kill_5"
    
if (idspr==6spr_name "kill_6"
    
if (idspr==7spr_name "kill_7"
    
if (idspr==8spr_name "kill_8"
    
if (idspr==9spr_name "kill_first"
    
if (idspr==11spr_name "kill_he"
    
if (idspr==12spr_name "kill_headshot"
    
if (idspr==13spr_name "kill_headshot_gold"
    
if (idspr==14spr_name "kill_knife"
    
if (idspr==15spr_name "kill_last"
    
if (idspr==16spr_name "kill_revenge"
    
if (idspr==17spr_name "c4_defuse"
    
if (idspr==18spr_name "c4_set"
    
if (idspr==19spr_name "wall_shot"
    
if (idspr==20spr_name "wall_shot_hs"
    
    
return spr_name
}

bool:can_see_fm(entindex1entindex2)
{
    if ((!
g_FM_Running) || !entindex1 || !entindex2)
        return 
false
//  new ent1, ent2

    
if (pev_valid(entindex1) && pev_valid(entindex1))
    {
        new 
flags pev(entindex1pev_flags)
        if (
flags EF_NODRAW || flags FL_NOTARGET)
        {
            return 
false
        
}

        new 
Float:lookerOrig[3]
        new 
Float:targetBaseOrig[3]
        new 
Float:targetOrig[3]
        new 
Float:temp[3]

        
pev(entindex1pev_originlookerOrig)
        
pev(entindex1pev_view_ofstemp)
        
lookerOrig[0] += temp[0]
        
lookerOrig[1] += temp[1]
        
lookerOrig[2] += temp[2]

        
pev(entindex2pev_origintargetBaseOrig)
        
pev(entindex2pev_view_ofstemp)
        
targetOrig[0] = targetBaseOrig [0] + temp[0]
        
targetOrig[1] = targetBaseOrig [1] + temp[1]
        
targetOrig[2] = targetBaseOrig [2] + temp[2]

        
engfunc(EngFunc_TraceLinelookerOrigtargetOrig0entindex10//  checks the had of seen player
        
if (get_tr2(0TraceResult:TR_InOpen) && get_tr2(0TraceResult:TR_InWater))
        {
            return 
false
        

        else 
        {
            new 
Float:flFraction
            get_tr2
(0TraceResult:TR_flFractionflFraction)
            if (
flFraction == 1.0 || (get_tr2(0TraceResult:TR_pHit) == entindex2))
            {
                return 
true
            
}
            else
            {
                
targetOrig[0] = targetBaseOrig [0]
                
targetOrig[1] = targetBaseOrig [1]
                
targetOrig[2] = targetBaseOrig [2]
                
engfunc(EngFunc_TraceLinelookerOrigtargetOrig0entindex10//  checks the body of seen player
                
get_tr2(0TraceResult:TR_flFractionflFraction)
                if (
flFraction == 1.0 || (get_tr2(0TraceResult:TR_pHit) == entindex2))
                {
                    return 
true
                
}
                else
                {
                    
targetOrig[0] = targetBaseOrig [0]
                    
targetOrig[1] = targetBaseOrig [1]
                    
targetOrig[2] = targetBaseOrig [2] - 17.0
                    engfunc
(EngFunc_TraceLinelookerOrigtargetOrig0entindex10//  checks the legs of seen player
                    
get_tr2(0TraceResult:TR_flFractionflFraction)
                    if (
flFraction == 1.0 || (get_tr2(0TraceResult:TR_pHit) == entindex2))
                    {
                        return 
true
                    
}
                }
            }
        }
    }
    return 
false
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1046{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
jacktoic is offline
Old 08-25-2013, 20:47
jacktoic
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
Old 09-02-2013, 10:20
jacktoic
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
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 18:45.


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