vip

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
SkiD
O taip. Jis jau surinko 50 žinučių!
Posts: 68
Joined: 2012 Mar 16 18:45

vip

Post 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))    }}
Last edited by SkiD on 2013 Feb 23 22:43, edited 1 time in total.

alfre
Gana aktyvus vartotojas
Posts: 259
Joined: 2011 May 13 14:01
Skype: alfredasxl996
Contact:

Re: vip

Post by alfre »

normaliai padaryk kodus..

SkiD
O taip. Jis jau surinko 50 žinučių!
Posts: 68
Joined: 2012 Mar 16 18:45

Re: vip

Post by SkiD »

Sorry, sutvarkiau

FrankJScott
Gana aktyvus vartotojas
Posts: 421
Joined: 2024 Apr 04 22:28
Skype: asfasf

Top Product Blog

Post by FrankJScott »

Please try Google before asking about New Product Website c1b6267

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests