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

Solved EntRefToEntIndex and EntIndexToEntRef


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AK978
Senior Member
Join Date: Jun 2018
Old 05-30-2020 , 23:25   EntRefToEntIndex and EntIndexToEntRef
Reply With Quote #1

Do entity indexes that are not used immediately need to be converted to entity references?

Entity references, do you need to switch back to the entity index when using entities?

thank you.

Last edited by AK978; 05-31-2020 at 00:47.
AK978 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 05-30-2020 , 23:32   Re: EntRefToEntIndex and EntIndexToEntRef
Reply With Quote #2

It is a good practice because an entity index can be taken over by another entity after a while, especially the ones created by plugins. If you are using the index in the same frame you probably won't have any issue but otherwise yes.

Here has some nice tips for coding: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Search for: Storing client and entity indexes or passing them to Timers
__________________
Marttt is offline
AK978
Senior Member
Join Date: Jun 2018
Old 05-31-2020 , 00:47   Re: EntRefToEntIndex and EntIndexToEntRef
Reply With Quote #3

thank you.
AK978 is offline
MarkV
New Member
Join Date: Apr 2020
Old 05-31-2020 , 06:34   Re: EntRefToEntIndex and EntIndexToEntRef
Reply With Quote #4

Quote:
Originally Posted by Marttt View Post
It is a good practice because an entity index can be taken over by another entity after a while, especially the ones created by plugins. If you are using the index in the same frame you probably won't have any issue but otherwise yes.

Here has some nice tips for coding: [TUT] SourcePawn Scripting - Tips, Basics to Advanced

Search for: Storing client and entity indexes or passing them to Timers
Thanks a lot!

Last edited by MarkV; 06-06-2020 at 08:36.
MarkV 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 21:38.


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