Raised This Month: $51 Target: $400
 12% 

Hook get_user_info()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rtxa
Senior Member
Join Date: Mar 2018
Location: Argentina
Old 02-23-2019 , 01:40   Hook get_user_info()
Reply With Quote #1

Hello, I need to hook "model" key and change original value to a one of my choice.
For example, when someone use this code:
PHP Code:
...
new 
model[16];
get_user_info(id"model"modelcharsmax(model));
server_print("Model %s"model);
... 
It player current model is "recon", it will print this value I choice for example
Code:
Model hgrunt
This will help me to let me use different models in HL1 in teamplay without breaking anything.

Last edited by rtxa; 02-23-2019 at 01:47.
rtxa is offline
thEsp
BANNED
Join Date: Aug 2017
Old 02-23-2019 , 09:04   Re: Hook get_user_info()
Reply With Quote #2

Check whatever you want using equal/equali.
PHP Code:
entity_get_string(id,EV_SZ_model,modelstring,sizeof(modelstring) - 1
And then change the model with
PHP Code:
entity_set_string(id,EV_SZ_model,newmodelstring
Remember to include the engine.

Last edited by thEsp; 02-23-2019 at 09:06.
thEsp is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 02-23-2019 , 14:43   Re: Hook get_user_info()
Reply With Quote #3

client_infochanged forward
__________________
<VeCo> is offline
Reply



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 18:06.


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