AFK System By Cover Aka Enkore
--
Read The Notes, Have Fun !
Code:
AFK System - Version - 1.0
/afk = Go into the AFK Mod
/back = Go Out of the AFK Mod
Code:
If User Entering the AFK Mod, he became in spector team, and it's print to chat a message that's he is afk.
If User Lefts The afk mod, client cmd's print to cmd the command jointeam, and he allowed to join any team he wants.
The Mod Built for a public mod.
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
new caeCvar;
new szName[64];
public plugin_init() {
register_plugin("AFK System", "1.0", "Cover Aka Enkore")
register_clcmd("say /afk", "goafk")
register_clcmd("say /back", "back")
caeCvar = register_cvar("afk_system", "1")
}
public goafk(id)
{
if(get_pcvar_num( caeCvar ))
get_user_name(id, szName, sizeof(szName)-1)
cs_set_user_team(id, CsTeams:6)
client_print(id, print_chat, "You Are Now In The AFK Mod")
client_print(0, print_chat, "%s Is Now AFK", szName)
}
public back(id)
{
if(get_pcvar_num( caeCvar ))
get_user_name(id, szName, sizeof(szName)-1)
if(get_user_team(id) == 6)
client_cmd(id, "jointeam")
client_print(id, print_chat, "You Are Now Left The AFK Mod")
client_print(0, print_chat, "%s Is Not AFK Anymore.", szName)
}