AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Player Costumes (https://forums.alliedmods.net/showthread.php?t=330026)

SaBBa 01-17-2021 08:01

Player Costumes
 
Instead of being on head, head costume is inside chest, visible only on death, what am I doing wrong
P.S. I am using player models on sever, should I consider them too while applying costumes on them ?

PHP Code:

new costumes[][] = {
    
"models/cso/devil_head.mdl",
    
"models/cso/devil_pelvis.mdl"
}

public 
plugin_precache()
{
    for(new 
0sizeof costumesi++) {
        
engfunc(EngFunc_PrecacheModelcostumes[i])
    }
}

public 
client_putinserver(id)
{
    
set_task(0.1"set_costume"id)
}

public 
set_costume(id)
{
    for(new 
0sizeof costumesi++) {
        new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
        
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
        
set_pev(entpev_aimentid)
        
set_pev(entpev_rendermodekRenderNormal)
        
engfunc(EngFunc_SetModelentcostumes[i])
        
set_pev(entpev_body0)
        
set_pev(entpev_sequence0)
        
set_pev(entpev_animtimeget_gametime())
        
set_pev(entpev_framerate1.0)
    }
    return 
PLUGIN_HANDLED



Well, everything is misplaced and acting wrong on left/right rotation and duck, here's how it looks now

https://i.imgur.com/hbhMwIp.jpg
https://i.imgur.com/r2cu9ka.jpg

CrazY. 01-18-2021 08:37

Re: Player Costumes
 
I think it's a problem with the model itself instead of the code. Have you tested that model in the Hats plugin?

lexzor 01-18-2021 10:01

Re: Player Costumes
 
why don't you use cs_set_user_model ?

OciXCrom 01-18-2021 10:05

Re: Player Costumes
 
Quote:

Originally Posted by lexzor (Post 2733116)
why don't you use cs_set_user_model ?

Probably because that will change the player model itself?

SaBBa 01-18-2021 12:30

Re: Player Costumes
 
Quote:

Originally Posted by CrazY. (Post 2733103)
I think it's a problem with the model itself instead of the code. Have you tested that model in the Hats plugin?

not really, all of them where disapproved, so I decided to make it on my own

CrazY. 01-18-2021 12:49

Re: Player Costumes
 
I meant just for testing, to check whether it's working or not.


All times are GMT -4. The time now is 14:10.

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