Raised This Month: $51 Target: $400
 12% 

Request: Only admins when CT have the following model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.:cs.stambeto:.
Senior Member
Join Date: Feb 2010
Location: Bulgaria
Old 09-02-2011 , 05:35   Request: Only admins when CT have the following model
Reply With Quote #1

Can I make a plugin for admins only when CT have the following model that I placed them a when T have their usual models.
.:cs.stambeto:. is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-02-2011 , 08:36   Re: Request: Only admins when CT have the following model
Reply With Quote #2

Yes, Search.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
iTouch
Member
Join Date: Feb 2011
Old 09-02-2011 , 14:45   Re: Request: Only admins when CT have the following model
Reply With Quote #3

Here you have it just replace the directory and the model name by the name you want it.

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

public plugin_init() {
        
register_plugin("CT Model""1.0.0""iTouch")
        
register_event("ResetHUD""resetModel""b")
        return 
PLUGIN_CONTINUE
}

public 
plugin_precache() {
        
precache_model("models/player/admin_ct/The model.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_CT) {
                        
cs_set_user_model(id"The model")
                }
                else {
                        
cs_reset_user_model(id)
                }
        }

        return 
PLUGIN_CONTINUE


Last edited by iTouch; 09-02-2011 at 17:05.
iTouch is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 09-02-2011 , 22:11   Re: Request: Only admins when CT have the following model
Reply With Quote #4

search the word dad in my posts, you will find a good tutorial.

edit: will not work for zp.
__________________

Last edited by ANTICHRISTUS; 09-02-2011 at 22:39.
ANTICHRISTUS is offline
.:cs.stambeto:.
Senior Member
Join Date: Feb 2010
Location: Bulgaria
Old 09-03-2011 , 08:31   Re: Request: Only admins when CT have the following model
Reply With Quote #5

Quote:
Originally Posted by ANTICHRISTUS View Post
search the word dad in my posts, you will find a good tutorial.

edit: will not work for zp.
I'm looking for zp
.:cs.stambeto:. is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 09-03-2011 , 08:40   Re: Request: Only admins when CT have the following model
Reply With Quote #6

precache_model("models/player/admin_ct/The model.mdl")

this is wrong !

it should be:

precache_model("models/player/The model/The model.mdl")

and then

cs_set_user_model(id, "The model")
reinert is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 09-03-2011 , 12:23   Re: Request: Only admins when CT have the following model
Reply With Quote #7

Code:
precache_model("models/player/The_model/The_model.mdl")
__________________
ANTICHRISTUS 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 02:43.


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