例如說這段sma(前20秒不能開火)
-----------------------------------------------------------------------------------------------------------
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombieplague>
#define PLUGIN "Round Start No Fire"
#define VERSION "1.0"
#define AUTHOR "roy31317"
new bool:g_NoFire = true;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
register_forward(FM_CmdStart, "fwdCmdStart", 0);
register_forward(FM_UpdateClientData, "UpdateClientData_Post", 1)
}
public fwdCmdStart(plr, ucHandle, seed)
{
if( get_user_weapon(plr) == CSW_HEGRENADE )
{
return FMRES_IGNORED;
}
if( get_user_weapon(plr) == CSW_FLASHBANG )
{
return FMRES_IGNORED;
}
if( get_user_weapon(plr) == CSW_SMOKEGRENADE )
{
return FMRES_IGNORED;
}
if( g_NoFire )
{
new button = get_uc(ucHandle, UC_Buttons);
if( button&IN_ATTACK )
{
button &= ~IN_ATTACK;
}
set_uc(ucHandle, UC_Buttons, button);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
public UpdateClientData_Post( id, sendweapons, cd_handle )
{
if(!is_user_alive(id))
{
return FMRES_IGNORED;
}
if( g_NoFire )
{
set_cd(cd_handle, CD_ID, 1);
}
return FMRES_HANDLED;
}
public event_RoundStart()
{
if(g_NoFire == false)
{
g_NoFire = true;
}
set_task(23.0, "fire");
}
public fire()
{
if( g_NoFire )
{
g_NoFire = false;
}
return PLUGIN_CONTINUE;
}
public zp_round_ended()
{
if( g_NoFire == false )
{
g_NoFire = false;
}
return PLUGIN_CONTINUE;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg950\\ deff0\\ deflang1033\\ deflangfe1028{\\ fonttbl{\\ f0\\ fnil\\ fcharset136 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1028\\ f0\\ fs16 \n\\ par }
*/
-----------------------------------------------------------------------------------------------------------
請問我要設定只對BOT有效要如何加入指令呢?