Hi, my English is bad, so I don’t understand everything.
I get errors when compiling the plugin.
Quote:
zp_zclass_assasin.sma(5) : error 041: invalid ellipsis, array size is not known
zp_zclass_assasin.sma(43) : error 017: undefined symbol "register_plugin"
zp_zclass_assasin.sma(44) : error 017: undefined symbol "register_forward"
zp_zclass_assasin.sma(45) : error 017: undefined symbol "register_clcmd"
zp_zclass_assasin.sma(51) : error 017: undefined symbol "zp_register_zombie_class"
zp_zclass_assasin.sma(5 : error 017: undefined symbol "zp_get_user_zombie_class"
zp_zclass_assasin.sma(60) : error 017: undefined symbol "get_user_health"
zp_zclass_assasin.sma(61) : error 017: undefined symbol "set_pev"
zp_zclass_assasin.sma(62) : warning 204: symbol is assigned a value that is never used: "ZM_HP"
zp_zclass_assasin.sma(63) : error 017: undefined symbol "zp_get_user_zombie_class"
zp_zclass_assasin.sma(67) : error 017: undefined symbol "zp_get_user_zombie"
zp_zclass_assasin.sma(71) : error 017: undefined symbol "zp_get_user_nemesis"
zp_zclass_assasin.sma(75) : error 017: undefined symbol "set_pev"
zp_zclass_assasin.sma(76) : error 017: undefined symbol "client_cmd"
zp_zclass_assasin.sma(76) : error 017: undefined symbol "e"
zp_zclass_assasin.sma(76) : error 017: undefined symbol "USE"
zp_zclass_assasin.sma(76) : fatal error 107: too many error messages on one line
|
Код:
new MODEL_NUM[8][0] =
{
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
}
};
new zclass_name[15] =
{
208, 144, 209, 129, 209, 129, 208, 176, 209, 129, 208, 184, 208, 189, 0
};
new zclass_info[21] =
{
208, 161, 208, 186, 209, 128, 209, 139, 209, 130, 208, 189, 208, 190, 209, 129, 209, 130, 209, 140, 0
};
new zclass_clawmodel[26] =
{
122, 111, 109, 98, 105, 101, 115, 47, 104, 97, 110, 100, 115, 95, 97, 115, 115, 97, 115, 105, 110, 46, 109, 100, 108, 0
};
new g_zclass_spy;
public plugin_init()
{
register_plugin("[ZP] Class : Assasin", "1.2.2", "NullWarez");
register_forward(104, "fm_PlayerPreThink", MODEL_NUM);
register_clcmd("zp_drop_gun", "drop_gun", -1, 1108, -1);
return 0;
}
public plugin_precache()
{
g_zclass_spy = zp_register_zombie_class(zclass_name, zclass_info, MODEL_NUM[random(
], zclass_clawmodel, "zp_human_man_1", 300, 1060320051, 1080033280);
return 0;
}
public zp_user_infected_post(player, infector)
{
new var1;
if (g_zclass_spy == zp_get_user_zombie_class(infector) && zp_get_user_zombie(infector))
{
new ZM_HP = get_user_health(infector) - 1500;
set_pev(infector, 41, float(ZM_HP));
}
if (g_zclass_spy != zp_get_user_zombie_class(player))
{
return 0;
}
if (!zp_get_user_zombie(player))
{
return 0;
}
if (zp_get_user_nemesis(player))
{
return 0;
}
set_pev(player, 77, 4);
client_cmd(player, "bind \"e\" \"+USE;zp_drop_gun\"");
new usp_clip = give_item(player, "weapon_usp");
cs_set_weapon_ammo(usp_clip, 3);
set_task(1036831949, "AddHP", player, 1292, MODEL_NUM, 1296, MODEL_NUM);
return 0;
}
public fm_PlayerPreThink(id)
{
if (!is_user_alive(id))
{
return 0;
}
if (g_zclass_spy != zp_get_user_zombie_class(id))
{
return 0;
}
if (!zp_get_user_zombie(id))
{
return 0;
}
if (zp_get_user_nemesis(id))
{
return 0;
}
set_pev(id, 77, 4);
if (pev(id, 84) & 16384)
{
set_pev(id, 40, 0);
return 0;
}
set_pev(id, 40, 1132396544);
return 0;
}
public drop_gun(id)
{
if (!is_user_alive(id))
{
return 0;
}
if (!zp_get_user_zombie(id))
{
return 0;
}
if (!g_zclass_spy == 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;
}
if (zp_get_user_survivor(t))
{
return 0;
}
new P1_origin[3];
new P2_origin[3];
get_user_origin(id, P1_origin, MODEL_NUM);
get_user_origin(t, P2_origin, MODEL_NUM);
new distance = get_distance(P1_origin, P2_origin);
if (distance >= 120)
{
return 0;
}
drop_current_weapon(t);
return 0;
}
drop_current_weapon(id)
{
static ammo;
static clip;
static weapon_id;
weapon_id = get_user_weapon(id, clip, ammo);
new var1;
if (1 << weapon_id & 1509749160 || 1 << weapon_id & 67308546)
{
static weapon_name[32];
get_weaponname(weapon_id, weapon_name, 31);
engclient_cmd(id, "drop", weapon_name, 1460);
}
return 0;
}
public AddHP(id)
{
if (!zp_get_user_zombie(id))
{
return 0;
}
if (!g_zclass_spy == zp_get_user_zombie_class(id))
{
return 0;
}
if (zp_get_user_nemesis(id))
{
return 0;
}
if (!is_user_alive(id))
{
return 0;
}
new HP = get_user_health(id);
new max_HP = zp_get_zombie_maxhealth(id);
if (max_HP > HP +
{
set_user_health(id, HP +
;
}
if (8 > max_HP - HP)
{
set_user_health(id, max_HP);
}
set_task(1065353216, "AddHP", id, 1292, MODEL_NUM, 1296, MODEL_NUM);
return 0;
}