Raised This Month: $ Target: $400
 0% 

Altering ham parameters


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-15-2014 , 06:30   Re: Altering ham parameters
Reply With Quote #8

Quote:
Originally Posted by NikKOo31 View Post
Just for testing purposes

PHP Code:
public fw_takedamage(victiminflictorattackerFloat:damagebits)
{
    if(!
is_user_alive(victim) || !is_user_connected(attacker))
        return 
HAM_IGNORED

    
if(victim != attacker)
        return 
HAM_IGNORED

    
//option 1
    
SetHamParamEntity(1attacker)
    
SetHamParamEntity(2attacker == inflictor victim:inflictor)
    
SetHamParamEntity(3victim)

    
//option 2
    /*SetHamParamFloat(4, 0.0)
    ExecuteHam(Ham_TakeDamage, attacker, attacker == inflictor ? victim:inflictor, victim, damage, bits)*/
    
return HAM_SUPERCEDE

This changes "player" to weapon the actual victim(target) is carrying. I need actual attackers weapon.

Quote:
Originally Posted by KliPPy View Post
Try leaving attacker as it is, and just swap first(this) and second(inflictor) parameter.
Nope, doesn't work.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
 



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 21:17.


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