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

request adminmodel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cosminvl
Member
Join Date: Mar 2013
Location: Romania
Old 03-07-2019 , 16:02   request adminmodel
Reply With Quote #1

i looking for a admin model by flag. if anyone can help me?
Thanks
__________________


cosminvl is offline
Send a message via Yahoo to cosminvl
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 03-07-2019 , 16:37   Re: request adminmodel
Reply With Quote #2

Quote:
Originally Posted by XxAvalanchexX View Post
Sorry I didn't notice this one before.

Tsk, tsk, qwerty...

Code:
#include <amxmodx> #include <cstrike> #define MODEL_ACCESS ADMIN_KICK public plugin_init() {     register_plugin("Model Changer","1.0","Qwerty Access")     register_event("ResetHUD", "ReseHud", "b") } public ReseHud(id) {     // firstly, fix those stupid indentation warnings     if (!(get_user_flags(id)&MODEL_ACCESS)) {         return PLUGIN_HANDLED     }     // previously: cs_set_user_model(id,"models/admin/admin.mdl")     // cs_set_user_model doesn't take a full model path, just the name     cs_set_user_model(id,"admin");     return PLUGIN_CONTINUE } public plugin_precache()   {        // previously: precache_model("models/admin/admin.mdl")     // that isn't the correct path! it has to be in the players directory     precache_model("models/player/admin/admin.mdl"); }

Of course you may have figured this out by now.

Last edited by Moody92; 03-07-2019 at 16:40.
Moody92 is offline
cosminvl
Member
Join Date: Mar 2013
Location: Romania
Old 03-07-2019 , 17:59   Re: request adminmodel
Reply With Quote #3

where can add flag expmple: T U ?
because i want diferend models for each Group
i don`t want same for all
[1]-- FONDATOR --", Here one model
"[2]-- OwneR --",
"[3]-- Co-OwneR --",
"[4]-- God --",
"[5]-- Semi-God --",
"[6]-- Prince --",
"[7]-- Administrator --",
"[8]-- Moderator --",
"[9]-- Helper --",
"[10]-- Medic --",
"[11]-- Slot--" Thanks
__________________



Last edited by cosminvl; 03-07-2019 at 18:01.
cosminvl is offline
Send a message via Yahoo to cosminvl
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 03-07-2019 , 21:32   Re: request adminmodel
Reply With Quote #4

You can do something like this
Spoiler

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


public plugin_init() {
    
register_plugin("Model Changer","1.0","Qwerty Access")
    
register_event("ResetHUD""ReseHud""b"
    return 
PLUGIN_CONTINUE
}

public 
ReseHud(id) { 
    if (
get_user_flags(id)&ADMIN_KICK) {
        
cs_set_user_model(id,"admin")
        return 
PLUGIN_CONTINUE
    
}
    else if (
get_user_flags(id)&ADMIN_RESERVATION) {
        
cs_set_user_model(id,"donator")
        return 
PLUGIN_CONTINUE
    
}
    else if (
get_user_flags(id)&ADMIN_BAN) {
        
cs_set_user_model(id,"prince")
        return 
PLUGIN_CONTINUE
    
}
    else { 
// For people without any of the flags above ^^
          
return PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE


public 
plugin_precache()   {  
    
precache_model("models/admin/admin.mdl"
    
precache_model("models/donator/donator.mdl"
    
precache_model("models/prince/prince.mdl"

You can keep adding else ifs for all the flags you want, and then precache all the models.

Or you could simply use Player Models by ConnorMcLeod and specify a model for every admin/donator/prince/etc.

Last edited by Moody92; 03-07-2019 at 21:33.
Moody92 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 03-07-2019 , 22:31   Re: request adminmodel
Reply With Quote #5

Or you can search the forum next time \ o /

Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

enum _:ModelsInfo
{
    Flag,
    CTModel[32],
    TModel[32]
}

new bool:bMatch[33]

new const g_eModels[][ModelsInfo] =
{
   	{ ADMIN_IMMUNITY, "owner_ct", "owner_t" }
   	{ ADMIN_LEVEL_B, "admin_ct", "admin_t" }
}

new bool:g_bHasCustomSkin[33]

public plugin_init()
{
    register_plugin("Multiple Player Models", "1.0", "OciXCrom")
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
}

public plugin_precache()
{
    for(new i; i < sizeof(g_eModels); i++)
    {
        precache_player_model(g_eModels[i][CTModel])
        precache_player_model(g_eModels[i][TModel])
    }
}

public client_putinserver(id)
    g_bHasCustomSkin[id] = false

public OnPlayerSpawn(id)
{
    if(is_user_alive(id))
    {    
        for(new iFlags = get_user_flags(id), i; i < sizeof(g_eModels); i++)
        {
            if(iFlags & g_eModels[i][Flag])
            {
                switch(cs_get_user_team(id))
                {
                    case CS_TEAM_CT: set_model(id, g_eModels[i][CTModel])
                    case CS_TEAM_T: set_model(id, g_eModels[i][TModel])
                }
                
                bMatch[id] = true
                break
            }
        }
        
        if(!bMatch[id] && g_bHasCustomSkin[id])
        {
            g_bHasCustomSkin[id] = false
            cs_reset_user_model(id)
        }
    }
}

set_model(const id, const szModel[])
{
    cs_set_user_model(id, szModel)
    g_bHasCustomSkin[id] = true
}
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 03-07-2019 at 22:32.
iceeedr is offline
Send a message via Skype™ to iceeedr
TCB_WyattEarp
Member
Join Date: Sep 2013
Old 03-21-2019 , 07:01   Re: request adminmodel
Reply With Quote #6

You may wanna try this:

https://forums.alliedmods.net/showthread.php?p=958925

Sets model via SteamID, I have this running on my server and each member of our group has a differnt model, each player that comes in has a non-standard model. Seems to work very well.
I have seen no crashes or lag from have this on my server.
If you would like to see this plugin in action please visit
74.91.120.42:27015 TCB(+)CS without the BS

Hope that helps
TCB_WyattEarp is offline
HiDeath
Senior Member
Join Date: Aug 2018
Location: Tunisia
Old 03-21-2019 , 08:25   Re: request adminmodel
Reply With Quote #7

i was searching myself a time ago , use this https://goldsrc.ru/threads/75/

using it you can set different models for different flags ( VIP / admin / ... ) , or by name / SteamID / IP

and manage them in .ini file ( no need for recompile in every change )

translate the page to english
HiDeath is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 03-21-2019 , 09:17   Re: request adminmodel
Reply With Quote #8

This Is Plugin You Should Use This Plugin.

PHP Code:
#include <amxmodx>

#include <amxmisc>

#include <cstrike>



public plugin_init() {

        
register_plugin("Admin Model""1.0""DON KHAN")

        
register_event("ResetHUD""resetModel""b")

        return 
PLUGIN_CONTINUE

}



public 
plugin_precache() {

        
precache_model("models/player/admin/admin_t.mdl")

        
precache_model("models/player/admin/admin_ct.mdl")



        return 
PLUGIN_CONTINUE

}



public 
resetModel(idlevelcid) {

        if (
get_user_flags(id) & ADMIN_RESERVATION) {

                new 
CsTeams:userTeam cs_get_user_team(id)

                if (
userTeam == CS_TEAM_T) {

                        
cs_set_user_model(id"admin_t")

                }

                else if(
userTeam == CS_TEAM_CT) {

                        
cs_set_user_model(id"admin_ct")

                }

                else {

                        
cs_reset_user_model(id)

                }

        }



        return 
PLUGIN_CONTINUE



You Can Change The Access Flags For Admin if (get_user_flags(id) & ADMIN_RESERVATION) {

From Changing Here Just Change The ADMIN_RESERVATION And Simply Put Other Admin Level Like

Moody92 Pasted This.

Code:
#define ADMIN_ALL 0 /* everyone */
#define ADMIN_IMMUNITY (1<<0) /* flag "a" */
#define ADMIN_RESERVATION (1<<1) /* flag "b" */
#define ADMIN_KICK (1<<2) /* flag "c" */
#define ADMIN_BAN (1<<3) /* flag "d" */
#define ADMIN_SLAY (1<<4) /* flag "e" */
#define ADMIN_MAP (1<<5) /* flag "f" */
#define ADMIN_CVAR (1<<6) /* flag "g" */
#define ADMIN_CFG (1<<7) /* flag "h" */
#define ADMIN_CHAT (1<<	/* flag "i" */
#define ADMIN_VOTE (1<<9) /* flag "j" */
#define ADMIN_PASSWORD (1<<10) /* flag "k" */
#define ADMIN_RCON (1<<11) /* flag "l" */
#define ADMIN_LEVEL_A (1<<12) /* flag "m" */
#define ADMIN_LEVEL_B (1<<13) /* flag "n" */
#define ADMIN_LEVEL_C (1<<14) /* flag "o" */
#define ADMIN_LEVEL_D (1<<15) /* flag "p" */
#define ADMIN_LEVEL_E (1<<16) /* flag "q" */
#define ADMIN_LEVEL_F (1<<17) /* flag "r" */
#define ADMIN_LEVEL_G (1<<1	/* flag "s" */
#define ADMIN_LEVEL_H (1<<19) /* flag "t" */
#define ADMIN_MENU (1<<20) /* flag "u" */
#define ADMIN_ADMIN (1<<24) /* flag "y" */
#define ADMIN_USER (1<<25) /* flag "z" */
Attached Files
File Type: sma Get Plugin or Get Source (admin_model.sma - 126 views - 1.0 KB)

Last edited by DON KHAN 1; 03-21-2019 at 11:49.
DON KHAN 1 is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-21-2019 , 10:57   Re: request adminmodel
Reply With Quote #9

Quote:
Originally Posted by DON KHAN 1 View Post
This Is Plugin You Should Use This Plugin.

PHP Code:
#include <amxmodx>

#include <amxmisc>

#include <cstrike>



public plugin_init() {

        
register_plugin("Admin Model""1.0""DON KHAN")

        
register_event("ResetHUD""resetModel""b")

        return 
PLUGIN_CONTINUE

}



public 
plugin_precache() {

        
precache_model("models/player/admin/admin_t.mdl")

        
precache_model("models/player/admin/admin_ct.mdl")



        return 
PLUGIN_CONTINUE

}



public 
resetModel(idlevelcid) {

        if (
get_user_flags(id) & ADMIN_RESERVATION) {

                new 
CsTeams:userTeam cs_get_user_team(id)

                if (
userTeam == CS_TEAM_T) {

                        
cs_set_user_model(id"admin_t")

                }

                else if(
userTeam == CS_TEAM_CT) {

                        
cs_set_user_model(id"admin_ct")

                }

                else {

                        
cs_reset_user_model(id)

                }

        }



        return 
PLUGIN_CONTINUE



You Can Change The Access Flags For Admin if (get_user_flags(id) & ADMIN_RESERVATION) {

From Changing Here Just Change The ADMIN_RESERVATION And Simply Put Other Admin Level Like

Moody92 Pasted This.

Code:
#define ADMIN_ALL 0 /* everyone */
#define ADMIN_IMMUNITY (1<<0) /* flag "a" */
#define ADMIN_RESERVATION (1<<1) /* flag "b" */
#define ADMIN_KICK (1<<2) /* flag "c" */
#define ADMIN_BAN (1<<3) /* flag "d" */
#define ADMIN_SLAY (1<<4) /* flag "e" */
#define ADMIN_MAP (1<<5) /* flag "f" */
#define ADMIN_CVAR (1<<6) /* flag "g" */
#define ADMIN_CFG (1<<7) /* flag "h" */
#define ADMIN_CHAT (1<<	/* flag "i" */
#define ADMIN_VOTE (1<<9) /* flag "j" */
#define ADMIN_PASSWORD (1<<10) /* flag "k" */
#define ADMIN_RCON (1<<11) /* flag "l" */
#define ADMIN_LEVEL_A (1<<12) /* flag "m" */
#define ADMIN_LEVEL_B (1<<13) /* flag "n" */
#define ADMIN_LEVEL_C (1<<14) /* flag "o" */
#define ADMIN_LEVEL_D (1<<15) /* flag "p" */
#define ADMIN_LEVEL_E (1<<16) /* flag "q" */
#define ADMIN_LEVEL_F (1<<17) /* flag "r" */
#define ADMIN_LEVEL_G (1<<1	/* flag "s" */
#define ADMIN_LEVEL_H (1<<19) /* flag "t" */
#define ADMIN_MENU (1<<20) /* flag "u" */
#define ADMIN_ADMIN (1<<24) /* flag "y" */
#define ADMIN_USER (1<<25) /* flag "z" */


Don remove .amxx , only source code allowed (.sma)
__________________
SED LYF !!!
SHIELD755 is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 03-21-2019 , 11:15   Re: request adminmodel
Reply With Quote #10

Quote:
Originally Posted by SHIELD755 View Post
Don remove .amxx , only source code allowed (.sma)
i cant remove it i tried but i couldn't
DON KHAN 1 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 20:07.


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