PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
new const g_szGrenadeMdl = "models/w_grenade.mdl"
public plugin_init() {
register_forward( FM_SetModel, "hook_SetModel_post", 1 )
}
public hook_SetModel_post( ent, const szMdl[] )
if( equal( szMdl, g_szGrenadeMdl ) )
{
set_pev( ent, pev_renderfx, kRenderFxGlowShell )
set_pev( ent, pev_renderamt, 125.0 )
set_pev( ent, pev_rendermode, kRenderTransAlpha )
set_pev( ent, pev_rendercolor, {0.0, 255.0, 0.0} )
}
}
Compiles with
Code:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
/home/groups/amxmodx/tmp3/phpGNlx58.sma(12) : warning 218: old style prototypes used with optional semicolumns
/home/groups/amxmodx/tmp3/phpGNlx58.sma(14) : error 010: invalid function or declaration
/home/groups/amxmodx/tmp3/phpGNlx58.sma(17) : error 021: symbol already defined: "set_pev"
/home/groups/amxmodx/tmp3/phpGNlx58.sma(23) : warning 203: symbol is never used: "g_szGrenadeMdl"
2 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpGNlx58.amx (compile failed).