AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] How to fix log error? (https://forums.alliedmods.net/showthread.php?t=272879)

CrazY. 10-08-2015 10:53

[SOLVED] How to fix log error?
 
Hi , i received this error:

PHP Code:

L 10/08/2015 11:28:51Start of error session.
L 10/08/2015 11:28:51Info (map "zm_trakinax_tubo_neon") (file "addons/amxmodx/logs/error_20151008.log")
L 10/08/2015 11:28:51Invalid player id 0
L 10
/08/2015 11:28:51: [AMXXRun time error 10 (plugin "zp43_addon_awp_damage.amxx") (native "get_user_weapon") - debug not enabled!
L 10/08/2015 11:28:51: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes). 

Code of zp43_addon_awp_damage.amxx:
PHP Code:

#include < amxmodx >
#include < hamsandwich >
#include < cs_ham_bots_api >

new cvar_awp_dmg

public plugin_init()
{
    
cvar_awp_dmg register_cvar("zp_awp_damage""10");

    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage");
    
RegisterHamBots(Ham_TakeDamage"fw_TakeDamage");
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if(
get_user_weapon(attacker) == CSW_AWP)
    {
        
SetHamParamFloat(4damage get_pcvar_float(cvar_awp_dmg));
    }



Krtola 10-08-2015 11:57

Re: [HELP] How to fix log error?
 
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if(is_user_alive(attacker) && get_user_weapon(attacker) == CSW_AWP)
{
SetHamParamFloat(4, damage * get_pcvar_float(cvar_awp_dmg));
}
}

CrazY. 10-08-2015 13:56

Re: [HELP] How to fix log error?
 
Thanks. :D


All times are GMT -4. The time now is 22:13.

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