Raised This Month: $ Target: $400
 0% 

Simulate HS kill


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 01-01-2015 , 18:26   Re: Simulate HS kill
Reply With Quote #7

Hey, dude, thanks a lot! It worked! I created a simple plugin to test it. It does the following: when you shoot a random shot with a deagle, you kill all the players from the opponent team with HS. There is only one thing bothering me - they all die how they should, but only one guy survives and doesn't give a f*ck about my plugin
It's not from the loop, since the 'num' returns 1 (printed it), but the trace doesn't kill the last guy. I mean, they are like 4 CTs, and when I shoot with the deagle, three of them die and the fourth just sirvives like nothing has event ment to kill him. It's strange and I can't understand what is causing that. Here is the code, I think the loops are okay and there is some special detail with the traces, that I'm missing. Some opinions?
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("Insta Deagle HS""1.0""Flicker")
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_deagle""onPrimaryAttack"true)
}

public 
onPrimaryAttack(ent)
{
    new 
id pev(entpev_owner)
    new 
iTeam get_user_team(id)
    new 
clipammo
    get_user_weapon
(idclipammo)
    
    if(!
clip)    return
    
    new 
szTeam[32]
    
copy(szTeamcharsmax(szTeam), iTeam == "CT" "TERRORIST")
    
    new 
ptr create_tr2()
    
set_tr2(ptrTR_iHitgroupHIT_HEAD)
    new 
Float:flDirection[3]
            
    new 
players[32], num
    get_players
(playersnum"aeh"szTeam)
    
    for(new 
inumi++)
    {
        
ExecuteHamB(Ham_TraceAttackplayers[i], id147.0flDirectionptrDMG_NEVERGIB DMG_BULLET)
    }
    
    
free_tr2(ptr)

__________________

Last edited by Flick3rR; 01-01-2015 at 18:26.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



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 15:22.


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