- Ошибка
-
ssssss.sma(20) : error 088: number of arguments does not match definition
ssssss.sma(45) : error 001: expected token: ",", but found "-identifier-"
ssssss.sma(45) : error 017: undefined symbol "e"
ssssss.sma(45) : warning 215: expression has no effect
ssssss.sma(45) : error 001: expected token: ";", but found "-identifier-"
ssssss.sma(45) : fatal error 107: too many error messages on one line
- Исходный код
-
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <zombieplague>
new g_Line;
new g_mot[33];
new g_healtarget[33];
new g_ap_fot_heal[33];
new const ZC_NAME[] = "medic";
new const ZC_INFO[] = "heal";
new const ZC_MODEL[] = "zombie_source";
new const ZC_CLAW_MODEL[] = "v_knife_zombie.mdl";
new g_zclass_medic;
public plugin_precache() {
g_zclass_medic = zp_register_zombie_class(ZC_NAME, ZC_INFO, ZC_MODEL, ZC_CLAW_MODEL);
g_Line = precache_model("sprites/zbeam4.spr");
}
public plugin_init()
{
register_plugin("[ZP] Class Medic", "1.0", "Skino");
register_clcmd("zp_skill_heal", "heal_start");
return 0;
}
public zp_user_infected_post(id, infector)
{
if (!zp_get_user_zombie(id))
{
return 0;
}
if (g_zclass_medic != zp_get_user_zombie_class(id))
{
return 0;
}
if (zp_get_user_nemesis(id))
{
return 0;
}
client_cmd(id, "bind \"e\" \"+USE;zp_skill_heal);
return 0;
}
public zp_user_humanized_post(id)
{
if (g_zclass_medic != zp_get_user_zombie_class(id))
{
return 0;
}
client_cmd(id, "bind \"e\" \"+USE\"");
return 0;
}
public heal_start(id)
{
if (g_healtarget[id])
{
heal_end(id);
}
if (!zp_get_user_zombie(id))
{
return 0;
}
if (!g_zclass_medic == zp_get_user_zombie_class(id))
{
return 0;
}
if (zp_get_user_nemesis(id))
{
return 0;
}
new body;
new t;
get_user_aiming(id, t, body, 9999);
if (!is_user_alive(t))
{
return 0;
}
if (!zp_get_user_zombie(t))
{
return 0;
}
new P1_origin[3];
new P2_origin[3];
get_user_origin(id, P1_origin, g_zclass_medic);
get_user_origin(t, P2_origin, g_zclass_medic);
new distance = get_distance(P1_origin, P2_origin);
if (distance >= 400)
{
return 0;
}
if (2 <= g_mot[t])
{
return 0;
}
g_healtarget[id] = t;
g_mot[g_healtarget[id]]++;
glow_target(g_healtarget[id], g_mot[g_healtarget[id]]);
set_task(1036831949, "medic_heal", id, 1220, g_zclass_medic, 1212, g_zclass_medic);
harpoon_target(id);
return 0;
}
public medic_heal(id)
{
new var1;
if (!is_user_alive(id) || !is_user_alive(g_healtarget[id]))
{
heal_end(id);
return 0;
}
if (!zp_get_user_zombie(id))
{
heal_end(id);
return 0;
}
if (!zp_get_user_zombie(g_healtarget[id]))
{
zp_infect_user(g_healtarget[id], id, g_zclass_medic, 1);
}
if (1600 <= g_ap_fot_heal[id])
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 1);
g_ap_fot_heal[id] = 0;
}
new P1_origin[3];
new P2_origin[3];
get_user_origin(id, P1_origin, g_zclass_medic);
get_user_origin(g_healtarget[id], P2_origin, g_zclass_medic);
new distance = get_distance(P1_origin, P2_origin);
if (distance > 400)
{
heal_end(id);
return 0;
}
new HP = get_pdata_int(g_healtarget[id], 359, 5);
new max_HP = zp_get_zombie_maxhealth(g_healtarget[id]);
new max_HP_WB = max_HP * 25 / 100 + max_HP;
new Float:p_HP = floatdiv(float(HP), float(max_HP_WB / 100));
new text[16];
get_user_name(g_healtarget[id], text, 16);
set_hudmessage(255, g_zclass_medic, g_zclass_medic, 1017370378, 1063222510, g_zclass_medic, g_zclass_medic, 1036831949, 1036831949, 1045220557, g_Line);
show_hudmessage(id, "Пациент: %s Здоровье: %f%", text, p_HP);
set_hudmessage(255, g_zclass_medic, g_zclass_medic, 1017370378, 1047904911, g_zclass_medic, g_zclass_medic, 1036831949, 1036831949, 1045220557, g_Line);
show_hudmessage(g_healtarget[id], "Лечущих медиков: %i", g_mot[g_healtarget[id]]);
if (HP >= max_HP_WB)
{
return 0;
}
if (max_HP_WB >= HP + 10)
{
set_pev(g_healtarget[id], 41, float(HP + 10));
g_ap_fot_heal[id] += 10;
}
if (10 > max_HP_WB - HP)
{
set_pev(g_healtarget[id], 41, float(max_HP_WB));
}
return 0;
}
public heal_end(id)
{
if (g_healtarget[id])
{
g_mot[g_healtarget[id]]--;
glow_target(g_healtarget[id], g_mot[g_healtarget[id]]);
remove_task(id, g_zclass_medic);
message_begin(g_zclass_medic, 23, 1528, g_zclass_medic);
write_byte(99);
write_short(id);
message_end();
g_healtarget[id] = 0;
return 0;
}
return 0;
}
harpoon_target(id)
{
message_begin(g_zclass_medic, 23, 1528, g_zclass_medic);
write_byte(g_mot);
write_short(id);
write_short(g_healtarget[id]);
write_short(g_Line);
write_byte(g_zclass_medic);
write_byte(g_zclass_medic);
write_byte(g_zclass_medic);
write_byte(16);
write_byte(1);
write_byte(200);
write_byte(15);
write_byte(15);
write_byte(90);
write_byte(10);
message_end();
return 0;
}
glow_target(id, mot)
{
if (mot)
{
new Float:color[3] = 0.0;
color[1] = float(mot * 100);
set_pev(id, 78, 19);
set_pev(id, 134, color);
set_pev(id, 40, 1098907648);
return 0;
}
set_pev(id, 78, 0);
return 0;
}
Помогите убрать ошибки
Последнее редактирование модератором: