You are in scripting help, assuming you already know few things.
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#define VERSION "0.0.1"
#define XO_PLAYER 5
#define m_iRadiosLeft 192
#define OFFSET_DEFUSE_PLANT_LoL 193
#define m_iMenuCode 205
const SILENT_RADIO = (1<<0)
#define Team_Select 1
public plugin_init()
{
register_plugin("Misc Blocks", VERSION, "ConnorMcLeod")
register_clcmd("radio1", "ClCmd_MiscCmdBlock")
register_clcmd("radio2", "ClCmd_MiscCmdBlock")
register_clcmd("radio3", "ClCmd_MiscCmdBlock")
register_clcmd("chooseteam", "ClCmd_MiscCmdBlock")
register_clcmd("drop", "ClCmd_MiscCmdBlock")
register_clcmd("jointeam", "ClCmd_JoinTeam")
register_clcmd("ignorerad", "ClCmd_MiscCmdBlock")
register_clcmd("menuselect", "ClCmd_MenuSelect")
RegisterHam(Ham_Spawn, "player", "CBasePlayer_Spawn_Post", true)
}
public CBasePlayer_Spawn_Post( id )
{
if( is_user_alive(id) )
{
set_pdata_int(id, m_iRadiosLeft, 0, XO_PLAYER)
set_pdata_int(id, OFFSET_DEFUSE_PLANT_LoL, get_pdata_int(id, OFFSET_DEFUSE_PLANT_LoL, XO_PLAYER) | SILENT_RADIO, XO_PLAYER)
}
}
public ClCmd_MiscCmdBlock(id)
{
return PLUGIN_HANDLED
}
public ClCmd_JoinTeam( id )
{
return ( CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT )
}
public ClCmd_MenuSelect( id )
{
if( get_pdata_int(id, m_iMenuCode, XO_PLAYER) == Team_Select )
{
new szArg[3]
if( read_argv(1, szArg, charsmax(szArg)) == 1 )
{
return (( 1 <= str_to_num(szArg) <= 5 ) && ( CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT ))
}
}
return PLUGIN_CONTINUE
}
__________________