Raised This Month: $32 Target: $400
 8% 

Admin Models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HiDeath
Senior Member
Join Date: Aug 2018
Location: Tunisia
Old 02-10-2019 , 15:35   Admin Models
Reply With Quote #1

Hi there , i really did tried many different plugins for admin models , but most of them makes the server crash , i want a really simple one if it is possible , like models/player/admin_ct/admin_ct.dml and models/player/admin_tr/admin_tr.mdl
it would be nice if the plugin sets the model when a player spawn , not at round start
thanks in advance <3

Last edited by HiDeath; 02-10-2019 at 15:36.
HiDeath is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 02-10-2019 , 15:54   Re: Admin Models
Reply With Quote #2

Use Custom Models by neygomon (neugomon).
__________________
eat1k is offline
HiDeath
Senior Member
Join Date: Aug 2018
Location: Tunisia
Old 02-10-2019 , 16:08   Re: Admin Models
Reply With Quote #3

Quote:
Originally Posted by eat1k View Post
Use Custom Models by neygomon (neugomon).
can you give me the link please
HiDeath is offline
HiDeath
Senior Member
Join Date: Aug 2018
Location: Tunisia
Old 02-10-2019 , 16:10   Re: Admin Models
Reply With Quote #4

Quote:
Originally Posted by eat1k View Post
Use Custom Models by neygomon (neugomon).
Thanks very much , i was about to add by steamid too , but that 2 in one , <3

Last edited by HiDeath; 02-10-2019 at 16:12.
HiDeath is offline
THEHEXAGON
Member
Join Date: Jan 2022
Location: USA
Old 12-04-2022 , 18:44   Re: Admin Models
Reply With Quote #5

Quote:
Originally Posted by eat1k View Post
Use Custom Models by neygomon (neugomon).
I see you have said this many times, but never post a link?

We have searched the whole www and can't find anyone by that name.
__________________
THE HEXAGON
74.91.123.28:27015
THEHEXAGON is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 12-04-2022 , 21:31   Re: Admin Models
Reply With Quote #6

dev-cs resource

there it is
__________________
deprale is offline
shayan123
BANNED
Join Date: Oct 2020
Location: GB
Old 01-13-2023 , 12:03   Re: Admin Models
Reply With Quote #7

There are a few different ways you could go about creating a plugin to set admin models in CS 1.6. Here's one simple method you could use:

1: Create a new .cfg file in your amxmodx/configs directory, named "admin_models.cfg"
2: In this file, you will list the steam IDs or names of your admins, along with the model names you want to use for each team. For example:

HTML Code:
"STEAM_0:1:12345678" "models/player/admin_ct/admin_ct.mdl" "models/player/admin_tr/admin_tr.mdl"
"Player1" "models/player/admin_ct/admin_ct.mdl" "models/player/admin_tr/admin_tr.mdl"
3: Create a new .sma file in your amxmodx/scripting directory, and name it something like "admin_models.sma"
4: In this file, you will create a new plugin that reads the "admin_models.cfg" file and sets the appropriate models for each admin when they spawn. Here's an example of what the code could look like:
PHP Code:
#include <amxmodx>

new g_admin_models[32][2];

public 
plugin_init() {
    
register_plugin("Admin Models""1.0""YourName");

    
register_event("Spawn""Event_Spawn""a""1=0""2=0");

    new 
i0;
    new 
szLine[256];
    new 
szAdmin[32];
    new 
szCTModel[64], szTRModel[64];
    new 
file fopen("configs/admin_models.cfg""rt");

    if(
file) {
        while(!
feof(file)) {
            
fgets(fileszLinesizeof(szLine));
            if(
sscanf(szLine"\"%s\" \"%s\" \"%s\""szAdminszCTModelszTRModel) == 3) {
                
get_user_index(szAdmin);
                if(
&& <= 32) {
                    
copy(g_admin_models[i][0], sizeof(g_admin_models[i][0]), szCTModel);
                    
copy(g_admin_models[i][1], sizeof(g_admin_models[i][1]), szTRModel);
                }
            }
        }
        
fclose(file);
    }
}

public 
Event_Spawn(id) {
    if(
g_admin_models[id][0]) {
        if(
get_user_team(id) == 1) {
            
set_pev(idpev_viewmodel2g_admin_models[id][0]);
        } else {
            
set_pev(idpev_viewmodel2g_admin_models[id][1]);
        }
    }

5: Compile your plugin using amxxpc or amxxcompiler, and add it to your plugins.ini file.
6: Restart your server and test it out. Any admins listed in your "admin_models.cfg" file should now have the specified models when they spawn.
shayan123 is offline
Send a message via ICQ to shayan123 Send a message via AIM to shayan123 Send a message via Yahoo to shayan123 Send a message via Skype™ to shayan123
Reply


Thread Tools
Display Modes

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 13:09.


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