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

Solved Can I store information in player entity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 07-16-2022 , 14:14   Can I store information in player entity?
Reply With Quote #1

Let's say I have plugin A which gives a weapon to a player. In plugin B I want to block plugin A from giving a weapon to a player in the first round. I wonder if there is some unused value in a player entity to store set of bits in? Perhaps something that is HL specific? The idea is to make set of plugins that works out of the box and the one that manages flags to enable/disable some features. I really do not want to use callfunc_* family functions or write plugin as a module. All I need is an unused integer or string value.

Last edited by damage220; 07-16-2022 at 15:25.
damage220 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-16-2022 , 14:39   Re: Can I store information in player entity?
Reply With Quote #2

pev_*user* fields
jimaway is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-16-2022 , 14:45   Re: Can I store information in player entity?
Reply With Quote #3

In my Realistic Bullet Physics there are a lot of examples and a LOT informations using what Jimaway said. Not only pev_iuser*, but pev_euser*, and also pev_fuser* (for floats). They are so helpful, definitely will help you.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 07-16-2022 , 15:05   Re: Can I store information in player entity?
Reply With Quote #4

Perfect. That is definitely what I need. Thank you, guys.

Last edited by damage220; 07-17-2022 at 10:49.
damage220 is offline
XSlayer
Member
Join Date: Dec 2021
Old 07-25-2022 , 00:01   Re: Can I store information in player entity?
Reply With Quote #5

Quote:
Originally Posted by damage220 View Post
Perfect. That is definitely what I need. Thank you, guys.
better use engine than fakemeta

PHP Code:
entity_set_intClientEV_INT_
                                 EV_INT_iuser1
,
                            
EV_INT_iuser2,
                            
EV_INT_iuser3,
                            
EV_INT_iuser4,
entity_set_floatClientEV_FL_
                                   EV_FL_fuser1
,
                            
EV_FL_fuser2,
                            
EV_FL_fuser3,
                            
EV_FL_fuser4,
entity_set_vectorClientEV_FL_
                                     EV_VEC_vuser1
,
                                     
EV_VEC_vuser2,
                                 
EV_VEC_vuser3,
                                 
EV_VEC_vuser4

Last edited by XSlayer; 07-25-2022 at 00:01.
XSlayer is offline
XSlayer
Member
Join Date: Dec 2021
Old 07-25-2022 , 00:55   Re: Can I store information in player entity?
Reply With Quote #6

Quote:
Originally Posted by XSlayer View Post
better use engine than fakemeta

PHP Code:
entity_set_intClientEV_INT_
                                 EV_INT_iuser1
,
                            
EV_INT_iuser2,
                            
EV_INT_iuser3,
                            
EV_INT_iuser4,
entity_set_floatClientEV_FL_
                                   EV_FL_fuser1
,
                            
EV_FL_fuser2,
                            
EV_FL_fuser3,
                            
EV_FL_fuser4,
entity_set_vectorClientEV_VEC_
                                     EV_VEC_vuser1
,
                                     
EV_VEC_vuser2,
                                 
EV_VEC_vuser3,
                                 
EV_VEC_vuser4
XSlayer is offline
wilian159
Member
Join Date: Dec 2013
Old 07-25-2022 , 14:34   Re: Can I store information in player entity?
Reply With Quote #7

none is better than the other
__________________
wilian159 is offline
XSlayer
Member
Join Date: Dec 2021
Old 07-25-2022 , 20:51   Re: Can I store information in player entity?
Reply With Quote #8

Quote:
Originally Posted by wilian159 View Post
none is better than the other
nope, engine>>>>>fakemeta
XSlayer is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 07-25-2022 , 21:09   Re: Can I store information in player entity?
Reply With Quote #9

Quote:
Originally Posted by XSlayer View Post
nope, engine>>>>>fakemeta
It is good to explain why you think so.
damage220 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-25-2022 , 22:08   Re: Can I store information in player entity?
Reply With Quote #10

pev() is not better or worse than entity_get_int().

If my plugin primarily uses engine natives then I'll use the engine variant, similar logic if my plugin is heavy on fakemeta natives.
__________________
Bugsy 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 22:23.


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