Raised This Month: $ Target: $400
 0% 

optimize nVault save/load?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-22-2013 , 09:16   Re: optimize nVault save/load?
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
Because i like you, and dispite the fact you've just broken a forum rule (bump / double post), i gonna show you a smart way.

Your Code


Edit :
And obviously :
Code:
g_mPlayerStore[id][m_iRiffles][1] = 1; // set AUG on 1
thanks conner and im sorry for my bump/double post donno what i was thinking.

i didnt need to use the
Code:
new const g_iItemsIndexes[mSaveDatas] = {     {CSW_P228, CSW_ELITE, CSW_FIVESEVEN, CSW_USP, CSW_GLOCK18, CSW_DEAGLE, }, // PISTOLS     {CSW_XM1014, CSW_M3}, // SHOTGUNS     {CSW_MAC10, CSW_UMP45, CSW_MP5NAVY, CSW_TMP, CSW_P90}, // SMGS     {CSW_SCOUT, CSW_AUG, CSW_SG550, CSW_GALIL, CSW_FAMAS, CSW_AWP, CSW_M4A1, CSW_G3SG1, CSW_SG552, CSW_AK47}, // RIFFLES     CSW_M249, // MACHINEGUN     {CSW_HEGRENADE, CSW_SMOKEGRENADE, CSW_FLASHBANG, CSW_KNIFE, CSW_VEST, CSW_VESTHELM, CSW_DEFUSER, CSW_NVGS} // EQUIP };

as i already had a setup for those. this is how i got it working
Code:
// Enum enum _:GunItems {     GunName[ 32 ], GunWeapon[ 32 ], csw, ammo }; enum _:SayCmds {     Say[ 32 ], Func[ 32 ] }; enum _:mSaveDatas {     m_iPistols[6],     m_iShotGuns[2],     m_iSmgs[5],     m_iRiffles[10],     m_iMachineGun,     m_iEquipments[8] } // Variables new g_mPlayerStore[ 33 ][ mSaveDatas + 1 ]; //Constants new const g_szPistols[ MAX_PISTOL ][ GunItems ] = {     { "USP", "weapon_usp", CSW_USP, 100 }, // = 0     { "Glock", "weapon_glock18", CSW_GLOCK18, 120 }, // = 1     { "Deagle", "weapon_deagle", CSW_DEAGLE, 35 }, // = 2     { "228 Compact", "weapon_p228", CSW_P228, 52 }, // =3     { "Dual Elites", "weapon_elite", CSW_ELITE, 120 }, // = 4     { "Five-Seven", "weapon_fiveseven", CSW_FIVESEVEN, 100 } // = 5 };
etc etc...

thanks heaps...
__________________
Blizzard_87 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 16:17.


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