Raised This Month: $ Target: $400
 0% 

Lock Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BlinkHardeR
Member
Join Date: Aug 2011
Location: Israel, Holon
Old 09-20-2011 , 09:50   Lock Menu
Reply With Quote #1

I need the code to so you can use 1 item and then its locked till i guess 300 seconds..
BlinkHardeR is offline
Send a message via Skype™ to BlinkHardeR
Fedde
BANNED
Join Date: Sep 2011
Old 09-20-2011 , 10:56   Re: Lock Menu
Reply With Quote #2

Wrong section.
Fedde is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 09-20-2011 , 11:25   Re: Lock Menu
Reply With Quote #3

Make a global Float variable
Set it to get_gametime() + 300.0 when you use it
Check if the variable > get_gametime() & stop if it's false.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
BlinkHardeR
Member
Join Date: Aug 2011
Location: Israel, Holon
Old 09-20-2011 , 12:52   Re: Lock Menu
Reply With Quote #4

can't you just give me the code cuz i dont understand veribals and stuff... [In English]
BlinkHardeR is offline
Send a message via Skype™ to BlinkHardeR
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 09-20-2011 , 13:17   Re: Lock Menu
Reply With Quote #5

He basically just did.
PHP Code:
new Float:gfVariable[33/MAX_PLAYERS+1]    //this is your variable 
PHP Code:
public handleMenublabla(idmenuitem)
{
     
blablabla...

     switch(
key)
     {
          case 
1:
          {
                if (
gfVariable[id] < get_gametime())
                {
                      
blablabla
                      gfVariable
[id] = get_gametime()+300.0
                  
}
                  else {
                       
blabla 
Erox902 is offline
Reply



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 19:33.


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