Raised This Month: $52 Target: $400
 13% 

Help / Support CStrike Module instead of CS Player Models API


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
happy_2012
Senior Member
Join Date: Sep 2012
Old 02-10-2019 , 02:12   CStrike Module instead of CS Player Models API
Reply With Quote #1

Hello,

So I tried replacing CS Player Models API natives by CStrike module natives to set player models for zombies, humans, nemesis, survivors and so on. I apparently realised that models are bugged and do not change as frequently as they are supposed to, and they do not change correctly.

I literally changed natives this way
- cs_set_player_model( ) to cs_set_user_model( )
- cs_reset_player_model( ) to cs_reset_user_model( )

I am using AMX Mod X 1.9.0

Last edited by happy_2012; 02-10-2019 at 02:30. Reason: Grammatic and BBC edits.
happy_2012 is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-15-2019 , 21:15   Re: CStrike Module instead of CS Player Models API
Reply With Quote #2

You get the point.
PHP Code:
public fwTaskModelCheckChange(iID)
{
    
iID -= g_iIDTaskModelCheckChange;
    
    static 
szModel[64];// + 19
    //zpnm_get_user_model(iID, szModel, charsmax(szModel))
    //pev(iID, pev_model, szModel, charsmax(szModel))
    
get_user_info(iID"model"szModelcharsmax(szModel))
    
/*
    new i, iPosLastSlash;
    
    while ((i = containi(szModel, "/")) != -1)
    {
        iPosLastSlash = i;
    }
    
    format(szModel, charsmax(szModel), szModel[iPosLastSlash + 1])
    
    szModel[iFtExtPosReturn(szModel)] = EOS;*/
    
    //ftD7Log(_, _, "[fwTaskModelCheckChange] iID: %d. Current model: ^"%s^". Admin model: ^"%s^".", iID, szModel, g_szModels[g_iIDModel[iID]])
    
    
if (equali(szModelg_szModels[g_iIDModel[iID]]))
    {
        
//ftD7Log(_, _, "[fwTaskModelCheckChange] iID: %d. Waiting for the player model to change so we can change it back to our admin model.", iID)
        
        
return;
    }
    
    
//ftD7Log(_, _, "[fwTaskModelCheckChange] iID: %d. Changing to our admin model.", iID)
    
    
zp_override_user_model(iIDg_szModels[g_iIDModel[iID]])
    
    
remove_task(iID g_iIDTaskModelCheckChange)

__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old Yesterday , 11:42   Re: CStrike Module instead of CS Player Models API
Reply With Quote #3

It's a bug and should be reported, although I read somewhere that cs_set_user_model native was fixed.
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Aliens vs. Predator Server: OFFLINE

Website | Channel | AvP on Discord

CrazY. is offline
happy_2012
Senior Member
Join Date: Sep 2012
Old Today , 09:28   Re: CStrike Module instead of CS Player Models API
Reply With Quote #4

Turns out it is really not a bug!

I realised that cs_set_user_team( i_Client, CS_TEAM_(C)T, CS_DONTCHANGE ), and apparently that CS_DONTCHANGE, which is set by default on that native, resets player models which occasionally bugs custom models set by cs_set_user_model( ), and to fix it I just did this change:

cs_set_user_team( i_Client, CS_TEAM_(C)T, CS_DONTCHANGE ) -> cs_set_user_team( i_Client, CS_TEAM_(C)T, CS_NORESET )

Thanks for the replies though!

Last edited by happy_2012; Today at 09:30. Reason: Grammar and punctuation error fixes
happy_2012 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 14:08.


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