Raised This Month: $ Target: $400
 0% 

Saving variable per variable


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-04-2014 , 10:12   Re: Saving variable per variable
Reply With Quote #4

You already said that. How do you identify items? By a generated integer? The simple answer would be new g_ItemBuyTimestamp[ MaxPlayers ][ MaxItems ]. When a player buys an item you just do g_ItemBuyTimestamp[ Id ][ ItemId ] = get_systime(). Then on menu display/callback you check if g_ItemByTimestamp[ id ][ ItemId ] + 3600 < get_systime() and disable the item accordingly.

Since you want it to last this long you somehow need to save the time stamp.

Although this is really simple so I'm unsure if that's what you want.
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 09:47.


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