Siemka
Mam problem z plugin spec switch, nie chce mi sie skompilowac
wyskakuja takie bledy:
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team spec_switch.sma(72) : error 029: invalid expression, assumed zero spec_switch.sma(72) : warning 215: expression has no effect spec_switch.sma(72) : error 001: expected token: ";", but found "if" spec_switch.sma(73) : error 029: invalid expression, assumed zero spec_switch.sma(73 -- 75) : warning 215: expression has no effect spec_switch.sma(75) : warning 217: loose indentation spec_switch.sma(75) : error 029: invalid expression, assumed zero spec_switch.sma(75) : error 004: function "client_disconnect" is not implemented spec_switch.sma(75) : fatal error 107: too many error messages on one line Compilation aborted. 6 Errors.
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <ColorChat> #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, "- go to spectator") register_clcmd("say_team /spec", "cmdSpec", ADMIN_ALL, "- go to spectator") register_clcmd("say /back", "cmdBack", ADMIN_ALL, "- go back to your team") register_clcmd("say_team /back", "cmdBack", ADMIN_ALL, "- go back to your team") } 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) ColorChat(id, GREEN, "de_dust2^x01 # Uzyj komendy^x03 /back^x01 aby wrocic do swojej druzyny.") } return } public Back(id) { cs_set_user_team(id, zTeam[id]) cs_set_user_deaths(id, zDeath[id]) } PrintUserNotAdmin(id) { ColorChat(id, GREEN, "de_dust2^x01 # Tylko admini moga uzyc komendy^x03/spec ^x01i^x03 /back") } public client_putinserver(id) { if(!get_pcvar_num(g_cvar)) else if( get_pcvar_num(g_cvar) && (get_user_flags(id) & ADMIN_KICK)) } public client_disconnect(id) type_spec[id] = false public client_connect(id) type_spec[id] = false /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n{\\ colortbl ;\\ red0\\ green0\\ blue0;}\n\\ viewkind4\\ uc1\\ pard\\ cf1\\ lang1033\\ b\\ f0\\ fs16 \n\\ par } */