Raised This Month: $ Target: $400
 0% 

Solved Get weapon's entity id, from weapon ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GasmoN
Member
Join Date: Jul 2014
Old 12-11-2020 , 16:29   Re: Get weapon's entity id, from weapon ID
Reply With Quote #1

Before I was using one loop, and 2 other loops inside that one loop.
Now, I only loop entities with maximum number of created entities and check some conditions.
Why is that ruined?

fm_strip_user_gun already comes with fakemeta_util, I didn't looked up the stock itself how it's done. https://www.amxmodx.org/api/fakemeta...strip_user_gun
GasmoN is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-11-2020 , 17:43   Re: Get weapon's entity id, from weapon ID
Reply With Quote #2

Quote:
Originally Posted by GasmoN View Post
Before I was using one loop, and 2 other loops inside that one loop.
Now, I only loop entities with maximum number of created entities and check some conditions.
Why is that ruined?

fm_strip_user_gun already comes with fakemeta_util, I didn't looked up the stock itself how it's done. https://www.amxmodx.org/api/fakemeta...strip_user_gun
there's nothing wrong by using two loops inside of each other and also i told you to update the code and use the other way, which its this way, the looping is done in the module which is much faster.

Quote:
Originally Posted by Natsheh
PHP Code:
stock pf_find_weapon_ent_id(idCSW_ID)
{
    static 
szClassname[24];
    
get_weaponname(CSW_IDszClassnamecharsmax(szClassname));
    return 
find_ent_by_owner(-1szClassnameid);

and how's it better by looping all the existed entities ?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 12-11-2020 at 17:50.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 20:26.


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