Raised This Month: $ Target: $400
 0% 

Fix Small Code [Easy]


Post New Thread Reply   
 
Thread Tools Display Modes
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
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-27-2010 , 09:19   Re: Fix Small Code [Easy]
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?p=958925
__________________
xPaw is offline
TechZilla
Member
Join Date: Sep 2010
Location: Localhost/127.0.0.1
Old 11-27-2010 , 09:26   Re: Fix Small Code [Easy]
Reply With Quote #3

Please can you fix this code for me thanks. I have seen that other plugin I can't specify directorys..
TechZilla is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-27-2010 , 09:38   Re: Fix Small Code [Easy]
Reply With Quote #4

Your folder layout is not valid. The model name must be identical to the folder it is in.
models/player/<name>/<name>.mdl

EDIT: Moved
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply



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