Raised This Month: $ Target: $400
 0% 

Altering ham parameters


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-14-2014 , 19:37   Re: Altering ham parameters
Reply With Quote #1

Setting to attacker didn't work. Will test weapons ent.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 07-14-2014 , 20:09   Re: Altering ham parameters
Reply With Quote #2

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


Last edited by NikKOo31; 07-14-2014 at 20:09.
NikKOo31 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 21:17.


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