Raised This Month: $ Target: $400
 0% 

Saving player weapons and ammo


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-25-2012 , 08:17   Re: Saving player weapons and ammo
Reply With Quote #2

I think you won't be able to do this with bitsums, which means you would have to create a more dimensional variable, like:

PHP Code:
enum AmmoType
{
     
ClipAmmo,
     
BpAmmo
}

new 
g_Weapons33 ][ CSW_P90 /*I think?*/ ][ AmmoType 
Then you will have to set the variable for each player like

PHP Code:
new weapon get_user_weaponid )
g_Weaponsid ][ weapon ][ BpAmmo  ] = cs_get_user_bpammoidweapon 
g_Weaponsid ][ weapon ][ ClipAmmo ] = /* you'll need to get the weapon's entity index to get clip ammo here */ 
You can save some memory and set for example bpammo to -1 if the user doesn't have the specific weapon.

Last edited by Backstabnoob; 06-25-2012 at 08:19.
Backstabnoob 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 06:14.


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