View Single Post
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-01-2009 , 05:03   Re: ESF Mr. Satan
Reply With Quote #10

You could get rid of ESF Models module by writing this in your code because that module does the same.
Code:
#define MDL_SATAN "models/player/satan/satan.mdl"   new g_iMaxPlayers;   public plugin_precache()         precache_model(MDL_SATAN);   public plugin_init() {         register_forward(FM_StartFrame, "fwServerFrame");           g_iMaxPlayers = get_maxplayers(); }   public fwServerFrame() {         static iCl;           for (iCl = 1; iCl <= g_iMaxPlayers; iCl++)         {                 if (!is_user_alive(iCl) || !is_user_satan[iCl])                         continue;                   fm_esf_setmodel(iCl, MDL_SATAN);         } }   stock fm_esf_setmodel(iCl, const szMdl[])         engfunc(EngFunc_SetModel, iCl, szMdl);
P.S. I'm afraid there's no better way of changing model than doing it on each frame. And it sucks. I hope things will change in ESF 1.3.

Oh and... Shouldn't is_user_satan[] be a boolean?
Code:
new is_user_satan[33];
change to
Code:
new bool:is_user_satan[33];
__________________

Last edited by hleV; 02-01-2009 at 05:08.
hleV is offline