Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- #include <hamsandwich>
- #include <fun>
- #define PLUGIN "Spec"
- #define AUTHOR "kramesa"
- #define VERSION "v1.0"
- new bool:TerroristTeam[33];
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- register_clcmd("/spec", "Spec");
- register_clcmd("/back", "Back");
- register_clcmd("say /spec", "Spec");
- register_clcmd("say /back", "Back");
- }
- public Spec(id)
- {
- if(get_user_flags(id) & ADMIN_KICK)
- {
- if(cs_get_user_team(id) == CS_TEAM_T)
- {
- TerroristTeam[id] = true;
- }
- else
- {
- TerroristTeam[id] = false;
- }
- if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
- {
- client_print(id, print_chat, "You already in SPEC.");
- return PLUGIN_HANDLED;
- }
- else
- {
- cs_set_user_team(id, CS_TEAM_SPECTATOR)
- user_kill(id, 1);
- client_print(id, print_chat, "You going to SPEC.");
- return PLUGIN_HANDLED;
- }
- }
- return PLUGIN_HANDLED;
- }
- public Back(id)
- {
- if(get_user_flags(id) & ADMIN_KICK)
- {
- if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
- {
- if(cs_get_user_team(id) == CS_TEAM_CT && CS_TEAM_T)
- {
- client_print(id, print_chat, "You already in CT/T.");
- return PLUGIN_HANDLED;
- }
- if(TerroristTeam[id] == true)
- {
- cs_set_user_team(id, CS_TEAM_T);
- client_print(id, print_chat, "You going to T.");
- return PLUGIN_HANDLED;
- }
- if(TerroristTeam[id] == false)
- {
- cs_set_user_team(id, CS_TEAM_CT);
- client_print(id, print_chat, "You going to CT.");
- return PLUGIN_HANDLED;
- }
- }
- }
- return PLUGIN_HANDLED;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement