Raised This Month: $ Target: $400
 0% 

Help on Team Models plugin [CS 1.6]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
chaotix911
Junior Member
Join Date: Jun 2010
Old 06-11-2011 , 03:43   Help on Team Models plugin [CS 1.6]
Reply With Quote #1

I recently downloaded Front Line's Halo Skins plugin that would change the models of each team to a certain player model. I thought that it would be good for my HNS server so I edited it to my own models.

The problem is, when the players connect, the players have to die first before switching to the new models. Example of the problem is: Player joins T, picks leet class, he is using leet model not new model then he dies, next round he's using new model. Can someone fix this code to not make them need to die first?

I want it in a way that when players connect and join a team, they already have the new model.

PHP Code:
#include <amxmodx>
#include <cstrike>

public plugin_init() {   
    
register_plugin("Halo Skins""0.5""Front Line")   
    
register_event("ResetHUD""resetModel""b")   

    return 
PLUGIN_CONTINUE   
}   

public 
plugin_precache() {   
    
precache_model("models/player/hns_t_mm1/hns_t_mm1.mdl")  
    
precache_model("models/player/vip/vip.mdl")    

     
     
    return 
PLUGIN_CONTINUE   
}   

public 
resetModel(id)   
    {  
     
    new 
CsTeams:userTeam cs_get_user_team(id)  
    if (
userTeam == CS_TEAM_T) {  
        
cs_set_user_model(id,"hns_t_mm1")  

    }  
    else if(
userTeam == CS_TEAM_CT) {  
        
cs_set_user_model(id,"vip"
         
    }  
    else {  
        
cs_reset_user_model(id)  
              
    }  
    return 
PLUGIN_CONTINUE   


Last edited by chaotix911; 06-11-2011 at 03:56.
chaotix911 is offline
 


Thread Tools
Display Modes

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 23:26.


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