Raised This Month: $ Target: $400
 0% 

Help with improving and optimizing code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Xunfop
Member
Join Date: Mar 2012
Location: 97Club
Old 11-19-2014 , 08:03   Re: Help with improving and optimizing code
Reply With Quote #4

PHP Code:
new bool:leftHand;
new 
bool:rightHand
you don't need 2 booleans, not a must b, or here will go wrong
PHP Code:
if (leftHand == true) {
    
menu_additem(menu"\dLeft Hand \r[current hand]"""0);
} else {
    
menu_additem(menu"\wLeft Hand"""0);
}
if (
rightHand == true) {
    
menu_additem(menu"\dRight Hand \r[current hand]"""0);
} else {
    
menu_additem(menu"\wRight Hand"""0);

and you should check player's hand setting instead this boolean.


PHP Code:
new firstJoin[33]; 
use boolean instead this, will more readable.
Xunfop is offline
 



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 17:32.


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