Raised This Month: $ Target: $400
 0% 

The better option for creating entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 12-14-2014 , 11:34   The better option for creating entity
Reply With Quote #1

Who is the batter option?
PHP Code:
new ent create_entity("info_target");
// or
static ent;
ent create_entity("info_target"); 

Last edited by KiLLeR.; 12-14-2014 at 12:50.
KiLLeR. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-14-2014 , 12:26   Re: The better option for creating entity
Reply With Quote #2

The differences between the two snippets of code have nothing to do with creating an entity. And, clearly, you haven't tried both of them yet because one of them shouldn't even compile. Take a little time to search for information about the actual differences between the two pieces of code that you have posted.
__________________

Last edited by fysiks; 12-14-2014 at 13:15.
fysiks is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 12-14-2014 , 12:53   Re: The better option for creating entity
Reply With Quote #3

I tried both ways, but not found a difference.
KiLLeR. is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-14-2014 , 13:06   Re: The better option for creating entity
Reply With Quote #4

That is because there is no difference. Both options are calling the same function with the same parameters.

If your question is about static vs new (which is unrelated to createing entities), then search as there have been discussions about it before
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 12-14-2014 at 13:07.
YamiKaitou is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 12-14-2014 , 14:02   Re: The better option for creating entity
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
If your question is about static vs new (which is unrelated to createing entities), then search as there have been discussions about it before
Yes, my questions is about that.
KiLLeR. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-14-2014 , 14:20   Re: The better option for creating entity
Reply With Quote #6

Quote:
Originally Posted by YamiKaitou View Post
then search as there have been discussions about it before
__________________
fysiks is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-15-2014 , 09:16   Re: The better option for creating entity
Reply With Quote #7

Also we have a tutorial somewhere on this forums.
__________________
HamletEagle 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 15:32.


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