Del 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

Del 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>&nbsp;#define PLUGIN "Vip GunGame"#define VERSION "1.0"#define AUTHOR "*Terror*"&nbsp;/*===========&nbsp;[Defines]===========*/&nbsp;new cvar_health#define FLAG ADMIN_LEVEL_H&nbsp;new cvar_kill_hpnew cvar_armor&nbsp;/*==================&nbsp;[Init and precache]==================*/&nbsp;public plugin_init&#40;&#41;&#123;&nbsp; &nbsp; register_plugin&#40;PLUGIN, VERSION, AUTHOR&#41;&nbsp;&nbsp; &nbsp; cvar_health = register_cvar&#40;"vip_health", "100"&#41;&nbsp; &nbsp; cvar_kill_hp = register_cvar&#40;"vip_kill_hp", "10"&#41;&nbsp; &nbsp; cvar_armor = register_cvar&#40;"vip_armor", "100"&#41;&nbsp;&nbsp; &nbsp; register_event&#40; "DeathMsg", "Hook_Deathmessage", "a" &#41;;&nbsp; &nbsp; RegisterHam&#40;Ham_Spawn, "player", "bacon_spawn", 1&#41;&#125;&nbsp;public bacon_spawn&#40;id&#41;&#123;&nbsp; &nbsp; if&#40;!is_user_alive&#40;id&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp;return PLUGIN_HANDLED;&nbsp;&nbsp; &nbsp; if&#40;get_user_flags&#40;id&#41; & FLAG&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; set_user_health&#40;id, get_pcvar_num&#40;cvar_health&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; set_user_armor&#40;id, get_pcvar_num&#40;cvar_armor&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; give_item&#40;id, "weapon_hegrenade"&#41;&nbsp; &nbsp; &nbsp; &nbsp; give_item&#40;id, "weapon_flashbang"&#41;&nbsp; &nbsp; &nbsp; &nbsp; give_item&#40;id, "weapon_flashbang"&#41;&nbsp; &nbsp; &nbsp; &nbsp; give_item&#40;id, "weapon_smokegrenade"&#41;&nbsp; &nbsp; &#125;&nbsp; &nbsp; return PLUGIN_CONTINUE;&#125;&nbsp;public Hook_Deathmessage&#40;&#41;&#123;&nbsp; &nbsp; new killer = read_data&#40;1&#41;&nbsp;&nbsp; &nbsp; if&#40;get_user_flags&#40;killer&#41; & FLAG&#41;&nbsp; &nbsp; &#123;&nbsp; &nbsp; &nbsp; &nbsp; set_user_health&#40;killer, get_user_health&#40;killer&#41; + get_pcvar_num&#40;cvar_kill_hp&#41;&#41;&nbsp; &nbsp; &nbsp; &nbsp; client_print&#40;killer, print_center, "Tu prideta %d gyvybiu uz nuzudima!", get_pcvar_num&#40;cvar_kill_hp&#41;&#41;&nbsp; &nbsp; &#125;&#125;
-- 2013 Vas 15 13:39 --

UPAA

-- 2013 Vas 16 22:36 --

UP

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests