Raised This Month: $ Target: $400
 0% 

buy meny


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 03-13-2013 , 13:49   Re: buy meny
Reply With Quote #3

Quote:
Originally Posted by Torge View Post
With a boolean or booleans but depends how many items you add for each boolean. ;D

Example:
PHP Code:
// Bought?
if (g_bBoughtAK47[id])
   
menu_additem(hMenu"AK47 [BOUGHT]""1");
// Not bought?
else
   
menu_additem(hMenu"AK47 [NOT BOUGHT]""1"); 


yeah i got like 5 items but im going to add more
but how can i save booleans on nvault?
if not how should i do then?
Code:
stock save_item( index )
{
 gVault = nvault_open( "Nvault" )
 
 if( gVault == INVALID_HANDLE )
 {
  set_fail_state( "[Nvault] nValut ERROR: =-> Invalid-Handle" )
 }
 
 get_user_name( index, gSteamID, charsmax( gSteamID ) )
 
 formatex( vKey, charsmax( vKey ), "%sItems", gSteamID )
 formatex( vData, charsmax( vData ), "%d", gItems[ index ])
 nvault_set( gVault, vKey, vData )
 nvault_close( gVault )
}
stock load_item( index )
{
 gVault = nvault_open( "Nvault" )
 
 if( gVault == INVALID_HANDLE )
 {
  set_fail_state( "[Nvault] nValut ERROR: =-> Invalid-Handle" )
 }
 
 get_user_name(  index, gSteamID, charsmax( gSteamID ) )
 
 formatex( vKey, charsmax( vKey ), "%sItems", gSteamID )
 gItems[ index ] = nvault_get( gVault, vKey )
 nvault_close( gVault )
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 03-13-2013 at 13:49.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
 



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 21:46.


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