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 , 19:15   Re: Simulate HS kill
Reply With Quote #9

Ooookay, that's the current code. With and without TR_pHit it's the same. No error logs. And I've debugged it enough to see, that it's executed on all players, but not all die - the last one stands alive. Here's the test code:
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 
clip get_pdata_int(ent514// cs_get_weapon_ammo(get_pdata_cbase(id, 373))
    
    
if(!clip)    return
    
    new 
szTeam[15]
    
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)
    new 
iNum num num 6
    
    
for(new iiNumi++)
    {
        
set_tr2(ptrTR_pHitplayers[i])
        
ExecuteHam(Ham_TraceAttackplayers[i], id147.0flDirectionptrDMG_NEVERGIB DMG_BULLET)
        
client_print(idprint_chat"Executed! %d / %d"i+1iNum)
    }
    
    
free_tr2(ptr)

And here is some image for the results:
Therefore it's something from the trie. Any suggestions anyone?
__________________
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