Raised This Month: $ Target: $400
 0% 

Solved cs_set_user_model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-17-2021 , 07:57   Re: cs_set_user_model
Reply With Quote #8

Why "sizeof - 1"? There's your problem. The last skin isn't registered because of the "-1".
Also, I'd suggest using a better function to handle this:

Code:
precache_player_model(const szModel[], &id = 0) {     new model[128]     formatex(model, charsmax(model), "models/player/%s/%sT.mdl", szModel, szModel)     if(file_exists(model))         id = precache_generic(model)     static const extension[] = "T.mdl"     #pragma unused extension     copy(model[strlen(model) - charsmax(extension)], charsmax(model), ".mdl")     return precache_model(model) }

Some models have an additional T.mdl file. This one takes it in mind, plus it only requires the model name as an argument, same as "cs_set_user_model".
__________________

Last edited by OciXCrom; 01-17-2021 at 07:58.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
 



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:07.


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