Raised This Month: $ Target: $400
 0% 

admin model does not work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yagami
Senior Member
Join Date: Jan 2021
Old 08-29-2022 , 19:45   admin model does not work
Reply With Quote #1

Someone here from allied made this plugin for me but it is not working does anyone know why and how to place a command to choose a skin?

PHP Code:
#pragma compress 1

#include <amxmodx>
#include <cromchat>
#include <cstrike>
#include <hamsandwich>

enum _:ModelInfo
{
    
szModelName[64],
    
CsTeams:szTeam,
    
iGender,
    
szModelPath[64]
}

enum {
    
Male 1,
    
Female 2


new const 
g_eModels[][ModelInfo] =
{
    
// CT Male
    
"Special_CT",  CS_TEAM_CTMale"models/player/Special_CT/Special_CT.mdl" },
    { 
"Special_CT2"CS_TEAM_CTMale"models/player/Special_CT2/Special_CT2.mdl" },

    
// CT Female
    
"Perfect"CS_TEAM_CTFemale"models/player/perfectg/perfectg.mdl" },
    { 
"Pirate"CS_TEAM_CTFemale"models/player/pirate/pirate.mdl" },


    
// TR Male
    
"Trey"CS_TEAM_TMale"models/player/trey/trey.mdl" },
    { 
"Fast"CS_TEAM_TMale"models/player/fast/fast.mdl" },

    
// TR Female
    
"Ashley"CS_TEAM_TFemale"models/player/ashley/ashley.mdl" },
    { 
"Nyjon"CS_TEAM_TFemale"models/player/Nyjon/Nyjon.mdl" },
}

new 
g_iUserGender[MAX_PLAYERS 1];

public 
plugin_precache()
{
    for(new 
isizeof(g_eModels); i++)
    {
        if(
file_exists(g_eModels[i][szModelPath]))
        {
            
precache_model(g_eModels[i][szModelPath]);
        } else 
log_amx("Error! Model ^"%s^" does not exists!"g_eModels[i][szModelPath]);
    }
}

public 
client_putinserver(id)
{
    
g_iUserGender[id] = Male



public 
set_model(id)
{
    for(new 
ii<sizeof(g_eModels); i++)
    {
        if(
g_eModels[id][szTeam] == cs_get_user_team(id) && g_eModels[id][iGender] == g_iUserGender[id])
        {
            
cs_set_user_model(idg_eModels[id][szModelPath]);
            
client_print(idprint_chat"Your %s model has been set"g_eModels[id][szModelName]);
            break;
        }
    }

yagami is offline
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 15:39.


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