Raised This Month: $ Target: $400
 0% 

fw_TakeDamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Miljan9
Member
Join Date: Dec 2011
Location: Belgrade / Serbia
Old 01-05-2013 , 08:51   fw_TakeDamage
Reply With Quote #1

I have a problem with hamsandwich function (fw_TakeDamage).

This is a log:
Code:
L 01/05/2013 - 13:39:47: Invalid player id 0 L 01/05/2013 - 13:39:47: [AMXX] Displaying debug trace (plugin "zp_addon_gamemodes.amxx") L 01/05/2013 - 13:39:47: [AMXX] Run time error 10: native error (native "get_user_weapon") L 01/05/2013 - 13:39:47: [AMXX]    [0] zp_addon_gamemodes.sma::fw_TakeDamage (line 139)
I work in this way:


#include <hamsandwich> (in top)

in plugin_init:
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage");

And down:

Code:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type) { 
    if((get_user_weapon(attacker) == CSW_KNIFE && is_user_assassin[attacker]) || (get_user_weapon(attacker) == CSW_AWP && is_user_sniper[attacker])) {
        SetHamParamFloat(4, damage * 999)
    }
    return HAM_IGNORED;
}
(example)

Please help me
__________________
Hi I'm from Serbian and i don't speak English good.

Last edited by Miljan9; 01-05-2013 at 08:51.
Miljan9 is offline
 


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 13:41.


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