Raised This Month: $32 Target: $400
 8% 

Hook player model change


Post New Thread Reply   
 
Thread Tools Display Modes
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-12-2022 , 00:01   Re: Hook player model change
Reply With Quote #11

Quote:
Originally Posted by MrPickles View Post
I don't think there is something specific for that, what I wrote was so that every time it respawned, it would take the current model, so it will always check if the model changed, what I could also do is take the change team event, but independently of that, each team has different characters, and if you also only want to change the character and not the team, it would not detect it, so the code I wrote is more secure, there is (I think) no event or message to register that model change
I think I found it.

You can use Orpheu to hook SetNewPlayerModel or SetPlayerModel since there is a signature for it there
https://forums.alliedmods.net/showthread.php?t=230363
__________________
My plugin:
Celena Luna is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 10-12-2022 , 21:59   Re: Hook player model change
Reply With Quote #12

Quote:
Originally Posted by Celena Luna View Post
I think I found it.

You can use Orpheu to hook SetNewPlayerModel or SetPlayerModel since there is a signature for it there
https://forums.alliedmods.net/showthread.php?t=230363
¨

Quote:

Also, *some functions* are never called, means that you can call them, *but you can't hook them*.
hope that change model works, but the functions that u are saying, are for set a model not for hook it
MrPickles is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-14-2022 , 07:16   Re: Hook player model change
Reply With Quote #13

Quote:
Originally Posted by kww View Post
Hi. Does somebody have that player model change hook code snippet?
I just want to store all current models in
PHP Code:
new g_currentMdl[MAX_PLAYERS][]; 
Have you tried client_infochanged?
__________________
DJEarthQuake is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 10-15-2022 , 15:13   Re: Hook player model change
Reply With Quote #14

Quote:
Originally Posted by DJEarthQuake View Post
Have you tried client_infochanged?
lol, I forgot, this function is directly related to client_infochanged

PHP Code:
new szModel[33];
get_user_info(id"model"szModelcharsmax(szModel)); 
MrPickles 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 01:07.


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