Page 1 of 1

vip

Posted: 2013 Feb 23 13:20
by SkiD
Galit padet? gaunu errora:

Code: Select all

L 02/14/2013 - 11:37:06: [FUN] Player out of range (0)L 02/14/2013 - 11:37:06: [AMXX] Displaying debug trace (plugin "VIP.amxx")L 02/14/2013 - 11:37:06: [AMXX] Run time error 10: native error (native "set_user_health")L 02/14/2013 - 11:37:06: [AMXX]    [0] Vip.sma::Hook_Deathmessage (line 59)

Code: Select all

#include <amxmodx>#include <cstrike>#include <hamsandwich>#include <fun> #define PLUGIN "Vip GunGame"#define VERSION "1.0"#define AUTHOR "*Terror*" /*=========== [Defines]===========*/ new cvar_health#define FLAG ADMIN_LEVEL_H new cvar_kill_hpnew cvar_armor /*================== [Init and precache]==================*/ public plugin_init(){    register_plugin(PLUGIN, VERSION, AUTHOR)     cvar_health = register_cvar("vip_health", "100")    cvar_kill_hp = register_cvar("vip_kill_hp", "10")    cvar_armor = register_cvar("vip_armor", "100")     register_event( "DeathMsg", "Hook_Deathmessage", "a" );    RegisterHam(Ham_Spawn, "player", "bacon_spawn", 1)} public bacon_spawn(id){    if(!is_user_alive(id))       return PLUGIN_HANDLED;     if(get_user_flags(id) & FLAG)    {        set_user_health(id, get_pcvar_num(cvar_health))        set_user_armor(id, get_pcvar_num(cvar_armor))        give_item(id, "weapon_hegrenade")        give_item(id, "weapon_flashbang")        give_item(id, "weapon_flashbang")        give_item(id, "weapon_smokegrenade")    }    return PLUGIN_CONTINUE;} public Hook_Deathmessage(){    new killer = read_data(1)     if(get_user_flags(killer) & FLAG)    {        set_user_health(killer, get_user_health(killer) + get_pcvar_num(cvar_kill_hp))        client_print(killer, print_center, "Tu prideta %d gyvybiu uz nuzudima!", get_pcvar_num(cvar_kill_hp))    }}

Re: vip

Posted: 2013 Feb 23 15:32
by alfre
normaliai padaryk kodus..

Re: vip

Posted: 2013 Feb 23 22:43
by SkiD
Sorry, sutvarkiau