Raised This Month: $ Target: $400
 0% 

Hook player model change


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 10-09-2022 , 11:04   Re: Hook player model change
Reply With Quote #7

Quote:
Originally Posted by Celena Luna View Post
usually you can just get model from cs_get_user_model

But if you need to hook when the model change, I think you might need to work with Ham_Keyvalue but I am not sure since there ain't any document or thread about this
I just do something depending on current player model and every time I do this, I retrieve player model with natives. I thought that I could minimize unnecessary calls by getting model name only when it was set or changed and read it from array.
PHP Code:
new szModel[33];
get_user_info(id"model"szModelcharsmax(szModel)); 
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 10-09-2022 at 11:09.
kww is offline
 



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 15:33.


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