917 80 03.12.2017

Настройки: amx_santahat 0/1 Включает/выключает шапочку [pawn] #include #include #include new g_Enable; new g_bwEnt[33]; new g_CachedStringInfoTarget; public plugin_init() { register_plugin( «Santa Hat», «1.2», «xPaw» ); register_cvar(«santa_hat», «1.2», FCVAR_SERVER); g_Enable = register_cvar(«amx_santahat», «1»); RegisterHam(Ham_Spawn, «player», «fwHamPlayerSpawnPost», 1); g_CachedStringInfoTarget = engfunc( EngFunc_AllocString, «info_target» ); } public plugin_precache() precache_model(«models/santa_hat.mdl»); public fwHamPlayerSpawnPost( const player ) { if ( get_pcvar_num( g_Enable ) && is_user_alive( player ) ) { new iEnt = g_bwEnt[ player ]; if( !pev_valid( iEnt ) ) { g_bwEnt[ player ] = iEnt = engfunc ( EngFunc_CreateNamedEntity, g_CachedStringInfoTarget ); set_pev( iEnt, pev_movetype, MOVETYPE_FOLLOW ); set_pev( iEnt, pev_aiment, player ); engfunc( EngFunc_SetModel, iEnt, «models/santa_hat.mdl» ); } }
}[/pawn]
Размер: 60.9 Kb
Загрузок: 80
Файл: 2177_addons.rar
