PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define PLUGIN "Invisible spectator"
#define VERSION "1.0"
#define AUTHOR "Bilal"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /spec", "CmdSpec")
}
public CmdSpec(id)
{
if (!(is_user_alive(id)))
{
client_print(id, print_chat, "You have to be alive to use this command!")
return PLUGIN_HANDLED
}
if (get_user_team(id) == 3)
{
client_print(id, print_chat, "You are already a spectator!")
return PLUGIN_HANDLED
}
// switch team
cs_set_user_team(id, CS_TEAM_SPECTATOR)
// respawn
ExecuteHam(Ham_CS_RoundRespawn, id)
// rendering
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
// effetcs
strip_user_weapons(id)
set_user_footsteps(id, 1)
set_user_godmode(id, 1)
// message
client_print(id, print_chat, "You are a spectator now!")
return PLUGIN_HANDLED
}
This would do it?
EDIT: Next time post this at suggestions/requests
__________________