Raised This Month: $ Target: $400
 0% 

get_user_weapon2()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 05-16-2009 , 10:03   Re: get_user_weapon2()
Reply With Quote #11

Quote:
Originally Posted by Lee View Post
Calling a native such as format eliminates the purpose of using string slicing instead of replace().
Replace searches, format don't. So it would be less expensive.

In this case the best way would be:

PHP Code:
public get_user_weapon2id 
{
    new 
szWeapon[20];
    
get_weaponname(get_user_weapon(id), szWeaponcharsmax(szWeapon));
    return 
szWeapon[7];

But i didn't know that
PHP Code:
return szWeapon[7]; 
was possible
__________________
joaquimandrade 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 23:13.


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