Raised This Month: $ Target: $400
 0% 

help me to find a better optimization for plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nightfall1
Senior Member
Join Date: Aug 2008
Old 05-08-2011 , 06:49   help me to find a better optimization for plugin
Reply With Quote #1

I have this
PHP Code:
new const custom_base[][] = { "info_target",  "hostage_entity""monster_scientist""player" }
public 
plugin_init()
{
 for (new 
nsizeof custom_basen++)
 
RegisterHam(Ham_Touchcustom_base[n], "touch_item")


PHP Code:
public touch_item(enttouched)
{
if(
<= touched <= 32
// code

i think is will be COMPARE+BRANCH


PHP Code:
public touch_item(enttouched)
{
if(
touched <= 32 && touched 0)
// code

i think is will be COMPARE, COMPARE+BRANCH


or this
PHP Code:
public touch_item(enttouched)
{
if(
<= touched <= get_maxplayers()) 
// code

CALL get_maxplayers() and COMPARE+BRANCH
__________________
SIGNATURE

Last edited by Nightfall1; 05-08-2011 at 06:52.
Nightfall1 is offline
 


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


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