Sorry my english is bad.
Title ^^
(Please add a Remove command)
PHP Code:
#include < amxmodx >
#include < fakemeta >
public plugin_precache( )
{
precache_model( "models/hat1.mdl" );
}
public plugin_init( )
{
new const VERSION[ ] = "1.3";
register_plugin( "Santa Hat", VERSION, "xPaw" );
new iEntity,
iMaxPlayers = get_maxplayers( ),
iInfoTarget = engfunc( EngFunc_AllocString, "info_target" );
new const MODEL[ ] = "models/hat1.mdl";
for( new id = 1; id <= iMaxPlayers; id++ )
{
iEntity = engfunc( EngFunc_CreateNamedEntity, iInfoTarget );
if( pev_valid( iEntity ) )
{
engfunc( EngFunc_SetModel, iEntity, MODEL );
set_pev( iEntity, pev_movetype, MOVETYPE_FOLLOW );
set_pev( iEntity, pev_aiment, id );
set_pev( iEntity, pev_owner, id );
}
}
}