Raised This Month: $ Target: $400
 0% 

Admin model *server doesn't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-15-2012 , 10:38   Admin model *server doesn't work
Reply With Quote #1

Well, when I activate this plugin, the server won't start
Any ideas why?

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

public plugin_init(){
        
register_event("ResetHUD""resetModel""b")
        return 
PLUGIN_CONTINUE
}

public 
plugin_precache(){
        
precache_model("models/player/admin_ct/admin_ct.mdl")
        
precache_model("models/player/admin_te/admin_te.mdl")
        return 
PLUGIN_CONTINUE
}

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

        return 
PLUGIN_CONTINUE


Last edited by dasha; 07-15-2012 at 10:39. Reason: -_-
dasha is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-15-2012 , 10:41   Re: Admin model *server doesn't work
Reply With Quote #2

The only thing i know is, cs_set_user_model() is bad to use.. Also, why are you returning PLUGIN_CONTINUE in plugin_precache?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-15-2012 , 10:51   Re: Admin model *server doesn't work
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
The only thing i know is, cs_set_user_model() is bad to use.. Also, why are you returning PLUGIN_CONTINUE in plugin_precache?
So what is the best to use? =S
Also server is linux
dasha is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-15-2012 , 10:53   Re: Admin model *server doesn't work
Reply With Quote #4

Quote:
Originally Posted by dasha View Post
So what is the best to use? =S
Also server is linux
I told you that a while back, couldn't find the thread.

Also make sure that your models aren't the ones crashing the server. Because i've had that problem quite often.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 07-15-2012 , 11:00   Re: Admin model *server doesn't work
Reply With Quote #5

Use this -> http://forums.alliedmods.net/showthread.php?p=958925 and use this models -> http://forums.alliedmods.net/showthread.php?t=11391

Last edited by guipatinador; 07-15-2012 at 11:00.
guipatinador is offline
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-15-2012 , 11:51   Re: Admin model *server doesn't work
Reply With Quote #6

This one is good because of f (get_user_flags(id) & ADMIN_KICK) {

Pfff, so what ._. why cs_set_user_model() is so bad
dasha is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-15-2012 , 11:53   Re: Admin model *server doesn't work
Reply With Quote #7

This one is old.
Using ResetHUD for that is very bad. You can search, there a lot of other better written plugins in the forum that do the same.
__________________
<VeCo> is offline
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-15-2012 , 11:55   Re: Admin model *server doesn't work
Reply With Quote #8

Damn I neeed it urgently and I can't find
dasha is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 07-15-2012 , 12:04   Re: Admin model *server doesn't work
Reply With Quote #9

search player models by Connor McLeod
IIRC
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-15-2012 , 12:35   Re: Admin model *server doesn't work
Reply With Quote #10

Not working
dasha 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 15:20.


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