Raised This Month: $ Target: $400
 0% 

Hook player model change


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 10-11-2022 , 20:52   Re: Hook player model change
Reply With Quote #8

Quote:
Originally Posted by kww View Post
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)); 
You can hook player spawn or round start, then u can save the string with that function, but with the global variable

PHP Code:
new __str_Model[33][33]; // global


public plugin_init() {
        
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}
public 
fwHamPlayerSpawnPost(id) {
        
get_user_info(id"model"__str_Model[id], 32 );


Last edited by MrPickles; 10-11-2022 at 20:52.
MrPickles 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