Raised This Month: $32 Target: $400
 8% 

add a Limitations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Thew_ConFiger
Member
Join Date: Apr 2019
Old 08-07-2020 , 03:52   add a Limitations
Reply With Quote #1

solved

Last edited by Thew_ConFiger; 03-27-2021 at 15:10.
Thew_ConFiger is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-07-2020 , 06:36   Re: add a Limitations
Reply With Quote #2

Where did you set "VipUsed" to 1?
__________________

Last edited by OciXCrom; 08-07-2020 at 06:36.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 08-07-2020, 08:46
Thew_ConFiger
This message has been deleted by Thew_ConFiger.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-07-2020 , 09:43   Re: add a Limitations
Reply With Quote #3

Post the full code you tried.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Thew_ConFiger
Member
Join Date: Apr 2019
Old 08-07-2020 , 10:34   Re: add a Limitations
Reply With Quote #4

solved

Last edited by Thew_ConFiger; 03-27-2021 at 15:10.
Thew_ConFiger is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-07-2020 , 10:49   Re: add a Limitations
Reply With Quote #5

If you only want to affect this menu option:
Code:
    switch(item)     {         case 0:     {     set_user_health(id, get_user_health(id) + 250);     }     VipUsed[id] = 1     }
-->
Code:
    switch(item)     {         case 0:     {     set_user_health(id, get_user_health(id) + 250);     VipUsed[id] = 1     }     }

If you have more menu options but only one can be selected:
Code:
    switch(item)     {         case 0:     {     set_user_health(id, get_user_health(id) + 250);     }     VipUsed[id] = 1     }
-->
Code:
    switch(item)     {         case 0:     {     set_user_health(id, get_user_health(id) + 250);     }     }     VipUsed[id] = 1

But since you refuse to share full code, who knows...
Trust me, nobody wants to steal it.
__________________

Last edited by Black Rose; 08-07-2020 at 10:52.
Black Rose is offline
Old 08-07-2020, 11:35
Thew_ConFiger
This message has been deleted by Thew_ConFiger.
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-07-2020 , 11:54   Re: add a Limitations
Reply With Quote #6

Do you want a set amount of rounds like:

1-3, one use
4-6, one use
used round 3, ready on round 4.

or a cooldown like: used round 2, ready 3 rounds later at round 5.

?
__________________

Last edited by Black Rose; 08-07-2020 at 11:56.
Black Rose is offline
Thew_ConFiger
Member
Join Date: Apr 2019
Old 08-07-2020 , 11:56   Re: add a Limitations
Reply With Quote #7

i want cooldown : player used round 2 ready round 5
Thew_ConFiger is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-07-2020 , 12:17   Re: add a Limitations
Reply With Quote #8

Then I would do this:
Code:
VipUsed[id] = 3; // On use // ... if ( VipUsed[id] )     VipUsed[id]--; // On round end // ...     else if ( VipUsed[id] )     {         client_printc(id, "%s You Already used !gVIP Menu!n this round. Please wait till next round", PREFIX);     }
__________________

Last edited by Black Rose; 08-07-2020 at 12:18.
Black Rose is offline
Thew_ConFiger
Member
Join Date: Apr 2019
Old 08-07-2020 , 12:20   Re: add a Limitations
Reply With Quote #9

can you show this on menu ? edit my last menu
Thew_ConFiger is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-07-2020 , 12:35   Re: add a Limitations
Reply With Quote #10

Code:
VipUsed[id] = 1;
-->
Code:
VipUsed[id] = 3;





Code:
    VipUsed[id] = 0; // I'm guessing since you haven't shared this code
-->
Code:
if ( VipUsed[id] )     VipUsed[id]--;





Code:
    else if ( VipUsed[id] == 0 )     {         client_printc(id, "%s You Already used !gVIP Menu!n this round. Please wait till next round", PREFIX);     }
-->
Code:
    else if ( VipUsed[id] )     {         client_printc(id, "%s You Already used !gVIP Menu!n this round. Please wait till next round", PREFIX);     }
__________________

Last edited by Black Rose; 08-07-2020 at 12:35.
Black Rose is offline
Reply


Thread Tools
Display Modes

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 02:15.


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