AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [DELETED] (https://forums.alliedmods.net/showthread.php?t=313813)

Shadowless 01-23-2019 14:59

[DELETED]
 
---

Nutu_ 01-23-2019 16:20

Re: VIP ADMIN OWNER models
 
well, what do you understand from 'not found'?
put the models in right place

iceeedr 01-23-2019 17:06

Re: VIP ADMIN OWNER models
 
Is this screen of your pc or server?

Napoleon_be 01-23-2019 18:31

Re: VIP ADMIN OWNER models
 
as far as i know, that's not the way you set models using cs_set_user_model().

just have a look at this, i had troubles with it aswel years ago.

https://forums.alliedmods.net/showthread.php?t=191320

iceeedr 01-23-2019 19:27

Re: VIP ADMIN OWNER models
 
PHP Code:

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

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

new 
bool:bMatch[33]

new const 
g_eModels[][ModelsInfo] =
{
    { 
ADMIN_LEVEL_G"ADMINISTRADOR_CT""ADMINISTRADOR_TR" },
    { 
ADMIN_LEVEL_F"Girl_CT""Girl_TR" },
    { 
ADMIN_LEVEL_H"Vip_CT""Vip_TR" },
}

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 
isizeof(g_eModels); i++)
    {
        
precache_player_model(g_eModels[i][CTModel])
        
precache_player_model(g_eModels[i][TModel])
    }
}


public 
OnPlayerSpawn(id)
{
    if(
is_user_alive(id))
    {
        for(new 
iFlags get_user_flags(id), isizeof(g_eModels); i++)
        {
            if(
iFlags g_eModels[i][Flag])
            {
                switch(
cs_get_user_team(id))
                {
                    case 
CS_TEAM_CTset_model(idg_eModels[i][CTModel])
                    case 
CS_TEAM_Tset_model(idg_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(idszModel)
    
g_bHasCustomSkin[id] = true
}

precache_player_model(szModel[])
{
    new 
szFile[128]
    
formatex(szFilecharsmax(szFile), "models/player/%s/%s.mdl"szModelszModel)
    
precache_model(szFile)
    
replace(szFilecharsmax(szFile), ".mdl""T.mdl")

    if(
file_exists(szFile))
        
precache_model(szFile)



OciXCrom 01-24-2019 08:13

Re: VIP ADMIN OWNER models
 
@iceeedr removing the original author name isn't a very moral thing to do.

iceeedr 01-24-2019 08:20

Re: VIP ADMIN OWNER models
 
Quote:

Originally Posted by OciXCrom (Post 2636368)
@iceeedr removing the original author name isn't a very moral thing to do.

I know it's yours, incidentally I got it from our private conversation, but at the time of copying everything did not come, I was too lazy to get your name so I put alliedmodders and any name in the plug. No intention of doing otherwise, relaxes.


All times are GMT -4. The time now is 07:34.

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