AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   admin model does not work (https://forums.alliedmods.net/showthread.php?t=339278)

yagami 08-29-2022 19:45

admin model does not work
 
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;
        }
    }




All times are GMT -4. The time now is 15:39.

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