Raised This Month: $ Target: $400
 0% 

native "get_user_weapon"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 04-02-2023 , 02:50   native "get_user_weapon"
Reply With Quote #1

Im having errors on my console with this script... Am i doing something wrong?
Script itself compiles without errors or warnings, but in-game it does.
PHP Code:
public TakeDamagethis idinflictor idattacker Float:damage damagebits )
{
    if ( 
get_user_weaponidattacker ) == CSW_AWP//the run time error starts here (line 13)
    
{
        
SetHamParamFloatdamage )
    }
    else if ( 
get_user_weaponidattacker ) == CSW_KNIFE)
    {
        
SetHamParamFloatdamage 1.5)
    }
    else if (
get_user_weapon(idattacker) == CSW_HEGRENADE)
    {
        if( 
idattacker == idinflictor ){
            return 
HAM_IGNORED;
        }

        
SetHamParamFloatdamage 6)

    }
    else
    {
        
SetHamParamFloatdamage )
        return 
HAM_HANDLED;
    }
    return 
HAM_IGNORED;

PHP Code:
Run time error 10native error (native "get_user_weapon")
[
0dmgmultiplier.sma::TakeDamage (line 13
HowToRuski 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 23:22.


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