Raised This Month: $ Target: $400
 0% 

Weapon name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DWIGHTpN
Senior Member
Join Date: Jan 2013
Location: Romania.
Old 08-03-2013 , 14:40   Re: Weapon name
Reply With Quote #4

Example:
PHP Code:
public client_PreThink(id) {
           new 
weaponID,ammo,clip;
           
weaponID get_user_weapon(idclip,ammo);
           
// get_user_weapon return CSW_ + weapon ID.

          // Now get weapon name from id.
          
new szWeapon[50];
          
get_weaponname(weaponIDszWeaponcharsmax(szWeapon));
          
// Now we have weapon name (weapon_knife for ex).

          
replace(szWeaponcharsmax(szWeapon), "weapon_""");
          
// Now we have weapon name without "weapon_".


Last edited by DWIGHTpN; 08-03-2013 at 14:53.
DWIGHTpN 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 15:46.


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