Hi i need this plugin switch to reapi
Код:
#include <amxmodx>
#include <hamsandwich>
new const g_szGrenadeNames[][] =
{
"weapon_hegrenade"
};
new Float:g_fStartTime
public plugin_init() {
register_plugin("Blokada Granatow", "v1.0", "Webster")
register_logevent("Round_Start", 2, "1=Round_Start")
register_message(get_user_msgid("TextMsg"),"msgTextMsg");
for(new i=0; i<sizeof(g_szGrenadeNames); i++) {
register_clcmd(g_szGrenadeNames, "BlockGrenade")
RegisterHam(Ham_Weapon_PrimaryAttack, g_szGrenadeNames, "fwd_PrimaryAttack")
}
}
public Round_Start()
g_fStartTime = get_gametime()
public fwd_PrimaryAttack(this)
{
if(get_gametime() - g_fStartTime > 10.0)
return HAM_IGNORED
return HAM_SUPERCEDE
}
public BlockGrenade(id)
{
if(get_gametime() - g_fStartTime > 10.0)
return PLUGIN_CONTINUE
else client_print(id, print_center, "Wait 10 seconde");
return PLUGIN_HANDLED
}
Последнее редактирование модератором: