Raised This Month: $ Target: $400
 0% 

playermodels


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 05-21-2010 , 20:34   playermodels
Reply With Quote #1

Why doesn't this work? ..

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

new cvar_on

public plugin_init()
{
    
register_plugin("Jailbreak Models""1.0""Drekes")
    
    
RegisterHam(Ham_Spawn"player""Event_Playerspawn"1)
}

public 
plugin_precache()
{
    
cvar_on register_cvar("jb_models""1")
    
    if(
get_pcvar_num(cvar_on))
    {
        
precache_model("models/player/guard/guardct1.mdl")
        
precache_model("models/player/prisoner/prisonert1.mdl")
    }
}


public 
Event_Playerspawn(id)
    
set_task(0.5"set_models"id)
    
public 
set_models(id)
{
    if(!
is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return 
PLUGIN_HANDLED
        

    
if(cs_get_user_team(id) == CS_TEAM_CT)
        
cs_set_user_model(id"models/player/guard/guardct1.mdl")
        
    else if(
cs_get_user_team(id) == CS_TEAM_T)
        
cs_set_user_model(id"models/player/prisoner/prisonert1.mdl")
        
    return 
PLUGIN_HANDLED

FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
 


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 03:32.


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