Raised This Month: $ Target: $400
 0% 

Admin team skins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m0rfin
New Member
Join Date: Sep 2005
Old 04-16-2006 , 23:08   Admin team skins
Reply With Quote #1

What do i write to make that
T gets 1 skin
and CT gets another skin

This is my plugin:
Code:
#include <amxmodx> 
#include <cstrike>

public plugin_init() 
{ 
  register_plugin("m0rfin's Custom Models" , "0.1" , "m0rfin"); 
  register_event("ResetHUD" , "event_ResetHUD" , "f"); 
}

public plugin_precache() 
{ 
  // notice the path structure 
  precache_model("player/gign/slewme.mdl"); 
}

public event_ResetHUD(id) 
  set_task(1.0 , "set_model" , id);

public set_model(id) 
{ 
  if(is_user_alive(id)) // check if the player is alive 
  { 
    // get the player's auth id 
    new authid[33]; 
    get_user_authid(id , authid , 32); 

    // check the player's authid for a match 
    if(equal(authid , "STEAM_0:1:3611893")) 
    { 
      // and finally set the model 
      cs_set_user_model(id , "slewme"); 
    } 
  } 
}
m0rfin is offline
FrontLine
Member
Join Date: Apr 2006
Old 04-16-2006 , 23:13  
Reply With Quote #2

take my old version of halo skins for example...

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {     register_plugin("Halo Skins", "0.2", "Front Line")     register_event("ResetHUD", "resetModel", "b")     return PLUGIN_CONTINUE } public plugin_precache() {    precache_model "models/player/halo_t/halo_t.mdl"    precache_model "models/player/halo_ct/halo_ct.mdl"       return PLUGIN_CONTINUE } public resetModel(id) {      if (cs_get_user_team(id) == 1) {         cs_set_user_model(id, "halo_t")     }     else if(cs_get_user_team(id) == 2) {         cs_set_user_model(id, "halo_ct")     }     return PLUGIN_CONTINUE }

Althought i was told that doesn't work anymore...
So try this way...

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/halo_t/halo_t.mdl")       precache_model("models/player/halo_ct/halo_ct.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,"halo_t")       }       else if(userTeam == CS_TEAM_CT) {           cs_set_user_model(id,"halo_ct")               }       else {           cs_reset_user_model(id)                     }       return PLUGIN_CONTINUE   }

FL.
__________________
FrontLine is offline
Send a message via MSN to FrontLine
m0rfin
New Member
Join Date: Sep 2005
Old 04-16-2006 , 23:26  
Reply With Quote #3

Quote:
Originally Posted by FrontLine
take my old version of halo skins for example...

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {     register_plugin("Halo Skins", "0.2", "Front Line")     register_event("ResetHUD", "resetModel", "b")     return PLUGIN_CONTINUE } public plugin_precache() {    precache_model "models/player/halo_t/halo_t.mdl"    precache_model "models/player/halo_ct/halo_ct.mdl"       return PLUGIN_CONTINUE } public resetModel(id) {      if (cs_get_user_team(id) == 1) {         cs_set_user_model(id, "halo_t")     }     else if(cs_get_user_team(id) == 2) {         cs_set_user_model(id, "halo_ct")     }     return PLUGIN_CONTINUE }

Althought i was told that doesn't work anymore...
So try this way...

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/halo_t/halo_t.mdl")       precache_model("models/player/halo_ct/halo_ct.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,"halo_t")       }       else if(userTeam == CS_TEAM_CT) {           cs_set_user_model(id,"halo_ct")               }       else {           cs_reset_user_model(id)                     }       return PLUGIN_CONTINUE   }

FL.
ya but i want the Admins to have custom model. not everyone
m0rfin is offline
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 04-18-2006 , 15:42  
Reply With Quote #4

use this plugin..

http://forums.alliedmods.net/showthr...t=11391+models
spunko is offline
Send a message via MSN to spunko
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-18-2006 , 16:03  
Reply With Quote #5

Just so you know the player model must be in.

models/<model_name>/<model_name>.mdl

ie: models/admin_ct/admin_ct.mdl

not: models/gign/slewme.mdl
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Reply


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 05:01.


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