Siemka,
Mam problem z pluginem Spec_Switch.amxx - usunąłem informację jak działa plugin bo dodałem to sobie w pluginie reklam ale teraz mam takie błędy w logach:
L 02/05/2015 - 14:58:38: Start of error session. L 02/05/2015 - 14:58:38: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20150205.log") L 02/05/2015 - 14:58:38: Function is not present (function "PrintRule") (plugin "Spec_Switch.amxx") L 02/05/2015 - 14:58:38: [AMXX] Run time error 10 (plugin "Spec_Switch.amxx") (native "set_task") - debug not enabled! L 02/05/2015 - 14:58:38: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 02/05/2015 - 14:58:56: Function is not present (function "PrintRule") (plugin "Spec_Switch.amxx") L 02/05/2015 - 14:58:56: [AMXX] Run time error 10 (plugin "Spec_Switch.amxx") (native "set_task") - debug not enabled! L 02/05/2015 - 14:58:56: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 02/05/2015 - 14:59:03: Function is not present (function "PrintRule") (plugin "Spec_Switch.amxx") L 02/05/2015 - 14:59:03: [AMXX] Run time error 10 (plugin "Spec_Switch.amxx") (native "set_task") - debug not enabled! L 02/05/2015 - 14:59:03: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 02/05/2015 - 15:03:56: Function is not present (function "PrintRule") (plugin "Spec_Switch.amxx") L 02/05/2015 - 15:03:56: [AMXX] Run time error 10 (plugin "Spec_Switch.amxx") (native "set_task") - debug not enabled! L 02/05/2015 - 15:03:56: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Ogólnie plugin sobie fajnie działa ale drażnią mnie te błędy ![]()
Mój SMA:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "Spec Switch"
#define VERSION "0.1.3"
#define AUTHOR "many"
new CsTeams:zTeam[33]
new zDeath[33]
new bool:type_spec[33] = false
new g_cvar
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
/* Cvar */
g_cvar = register_cvar("amx_specmode", "0") // 0 - enable use to all, 1 - enable use only ADMINs
/* Client Commands */
register_clcmd("say /spec", "cmdSpec", ADMIN_ALL, "- idzie na specta")
register_clcmd("say_team /spec", "cmdSpec", ADMIN_ALL, "- idzie na specta")
register_clcmd("say /wroc", "cmdBack", ADMIN_ALL, "- wraca do druzyny")
register_clcmd("say_team /wroc", "cmdBack", ADMIN_ALL, "- wraca do druzyny")
}
public cmdSpec(id)
{
if(!get_pcvar_num(g_cvar)) Spec(id)
else if( get_pcvar_num(g_cvar) && (get_user_flags(id) & ADMIN_KICK)) Spec(id)
else if( get_pcvar_num(g_cvar) && !(get_user_flags(id) & ADMIN_KICK)) PrintUserNotAdmin(id)
}
public cmdBack(id)
{
if (type_spec[id] && cs_get_user_team(id) == CS_TEAM_SPECTATOR && zTeam[id] != CS_TEAM_SPECTATOR ) Back(id)
else if( get_pcvar_num(g_cvar) && !(get_user_flags(id) & ADMIN_KICK) ) PrintUserNotAdmin(id)
}
public Spec(id)
{
zDeath[id] = cs_get_user_deaths(id)
if (cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return
else{
type_spec[id] = true
zTeam[id] = cs_get_user_team(id)
cs_set_user_team(id, CS_TEAM_SPECTATOR)
user_silentkill(id)
client_print(id,print_chat,"Wpisz /wroc by powrocic z specta")
}
return
}
public Back(id)
{
cs_set_user_team(id, zTeam[id])
cs_set_user_deaths(id, zDeath[id])
set_task(0.5,"FirstRespawn",id)
set_task(0.8,"SecondRespawn",id)
}
public FirstRespawn(id)
{
cs_user_spawn(id)
}
public SecondRespawn(id)
{
cs_user_spawn(id)
if (cs_get_user_team(id) == CS_TEAM_T){
give_item(id,"weapon_knife")
give_item(id,"weapon_glock18")
give_item(id,"ammo_9mm")
}
if (cs_get_user_team(id) == CS_TEAM_CT){
give_item(id,"weapon_knife")
give_item(id,"weapon_usp")
give_item(id,"ammo_45acp")
give_item(id,"ammo_45acp")
}
}
PrintUserNotAdmin(id)
{
client_print(id,print_chat,"Tylko admin moze uzyc komend /spec, /wroc ")
}
public client_putinserver(id)
{
if(!get_pcvar_num(g_cvar)) Rule(id)
else if( get_pcvar_num(g_cvar) && (get_user_flags(id) & ADMIN_KICK)) Rule(id)
}
public client_disconnect(id) type_spec[id] = false
public client_connect(id) type_spec[id] = false
public Rule(id) set_task(20.0, "PrintRule", id)
Proszę o pomoc, dzięki!


Dodatki SourceMod













