AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Admin model *server doesn't work (https://forums.alliedmods.net/showthread.php?t=190145)

dasha 07-15-2012 10:38

Admin model *server doesn't work
 
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



Napoleon_be 07-15-2012 10:41

Re: Admin model *server doesn't work
 
The only thing i know is, cs_set_user_model() is bad to use.. Also, why are you returning PLUGIN_CONTINUE in plugin_precache?

dasha 07-15-2012 10:51

Re: Admin model *server doesn't work
 
Quote:

Originally Posted by Napoleon_be (Post 1750854)
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

Liverwiz 07-15-2012 10:53

Re: Admin model *server doesn't work
 
Quote:

Originally Posted by dasha (Post 1750867)
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.

guipatinador 07-15-2012 11:00

Re: Admin model *server doesn't work
 
Use this -> http://forums.alliedmods.net/showthread.php?p=958925 and use this models -> http://forums.alliedmods.net/showthread.php?t=11391

dasha 07-15-2012 11:51

Re: Admin model *server doesn't work
 
This one is good because of f (get_user_flags(id) & ADMIN_KICK) {

Pfff, so what ._. why cs_set_user_model() is so bad :(

<VeCo> 07-15-2012 11:53

Re: Admin model *server doesn't work
 
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.

dasha 07-15-2012 11:55

Re: Admin model *server doesn't work
 
Damn I neeed it urgently and I can't find :|

Liverwiz 07-15-2012 12:04

Re: Admin model *server doesn't work
 
search player models by Connor McLeod
IIRC

dasha 07-15-2012 12:35

Re: Admin model *server doesn't work
 
Not working


All times are GMT -4. The time now is 15:20.

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