Raised This Month: $ Target: $400
 0% 

Fix Small Code [Easy]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
TechZilla
Member
Join Date: Sep 2010
Location: Localhost/127.0.0.1
Old 11-27-2010 , 09:03   Fix Small Code [Easy]
Reply With Quote #1

Hello, I have modded a plugin for my server, it does not work though. Please can you fix it up for me. Thanks.


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

public plugin_init() {
        
register_plugin("JailBreak Models""1.0""Techzilla")
        
register_event("ResetHUD""resetModel""b")
        
register_event("ResetHUD""resetModelAdmin""b")
        return 
PLUGIN_CONTINUE
}

public 
plugin_precache() {
        
precache_model("models/player/b2kjb/guard.mdl")
        
precache_model("models/player/b2kjb/prisoner.mdl")
        
precache_model("models/player/admin_ct/admin_ct.mdl")
        
precache_model("models/player/admin_te/admin_te.mdl")

        return 
PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
                new 
CsTeams:userTeam cs_get_user_team(id)
                if (
userTeam == CS_TEAM_T) {
                        
cs_set_user_model(id"prisoner")
                }
                else if(
userTeam == CS_TEAM_CT) {
                        
cs_set_user_model(id"guard")
                }
                else {
                if (
get_user_flags(id) & ADMIN_KICK) {
                new 
CsTeams:userTeamAdmin cs_get_user_team(id)
                if (
userTeamAdmin == CS_TEAM_T) {
                        
cs_set_user_model(id"admin_te")
                }
                else if(
userTeamAdmin == CS_TEAM_CT) {
                        
cs_set_user_model(id"admin_ct")
                }
        }

        return 
PLUGIN_CONTINUE
}

TechZilla 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 11:17.


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