Raised This Month: $ Target: $400
 0% 

[REQ] Admin Model Plugin for both teams


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Apocalyman
Member
Join Date: Nov 2022
Old 09-30-2023 , 06:46   Re: [REQ] Admin Model Plugin for both teams
Reply With Quote #3

Quote:
Originally Posted by Mo3taz View Post
this will give the player with acc "admin_kick" a model (for ct and another one for t) when he spawn
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "bugg3r"

#define ADMIN_LEVEL ADMIN_KICK

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""Ham_PlayerSpawn"true)
}

public 
plugin_precache() 

    
precache_model("models/player/your_model_t/your_model_t.mdl")//T Model
    
precache_model("models/player/your_model_ct/your_model_ct.mdl")//CT Model


public 
Ham_PlayerSpawn(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL)
    {
        switch(
get_user_team(id))
        {
            case 
1cs_set_user_model(id"your_model_t")
            case 
2cs_set_user_model(id"your_model_ct")
        }
    }

and this will give the player (with acc admin_kick) a model (1 for ct and another 1 for t) at all time [i suggest you to avoid using playerprethink in too many plugins ]
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "bugg3r"

#define ADMIN_LEVEL ADMIN_KICK

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_PlayerPreThink"PlayerPreThink"0)
}

public 
plugin_precache() 

    
precache_model("models/player/your_model_t/your_model_t.mdl")//T Model
    
precache_model("models/player/your_model_ct/your_model_ct.mdl")//CT Model


public 
PlayerPreThink(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL)
    {
        switch(
get_user_team(id))
        {
            case 
1cs_set_user_model(id"your_model_t")
            case 
2cs_set_user_model(id"your_model_ct")
        }
    }

Hey! thanks for responding! I tried them both and they dont work for some reason... I dont know why
Apocalyman is offline
 



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 10:11.


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