Raised This Month: $ Target: $400
 0% 

Model Changing in DoD


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 12-17-2005 , 15:01  
Reply With Quote #2

Code:
/* The actual return value of the function, use these instead of PLUGIN_HANDLED etc when
 * returning from registered forwards.
 */
#define FMRES_HANDLED	2
#define FMRES_SUPERCEDE	4
#define FMRES_IGNORED	1
#define FMRES_OVERRIDE	3
Code:
register_forward(FM_SetModel, "handle_model") public handle_model(id, const mdl[]) {    if(!is_valid_ent(id) || !get_cvar_num("dod_am_enabled"))       return FMRES_IGNORED        new team = entity_get_int(id, EV_INT_team)        if(contain(mdl, "models/player.mdl") && team > 0)    {       entity_set_string(id, EV_SZ_model, models[team - 1])       return FMRES_SUPERCEDE    }        new temp[128]    entity_get_string(id, EV_SZ_model, temp, 127)    log_amx("entid: %d model: %s", id, temp)            return FMRES_IGNORED }
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode