Raised This Month: $401 Target: $400
 100% 

Command used twice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SID12
Junior Member
Join Date: May 2019
Old 08-23-2019 , 11:51   Command used twice
Reply With Quote #1

How can i check if a user types a command twice for example : /bhop enables bhop type it again and it disables it or in general is there a way to check this?
SID12 is offline
Relaxing
Veteran Member
Join Date: Jun 2016
Location: Catlands, NY
Old 08-23-2019 , 12:29   Re: Command used twice
Reply With Quote #2

Yep, using booleans.
__________________
Relaxing is offline
SID12
Junior Member
Join Date: May 2019
Old 08-23-2019 , 13:05   Re: Command used twice
Reply With Quote #3

Quote:
Originally Posted by Relaxing View Post
Yep, using booleans.
Sounds good thx.
SID12 is offline
SID12
Junior Member
Join Date: May 2019
Old 08-23-2019 , 13:46   Re: Command used twice
Reply With Quote #4

Hmm one more thing how do i do that for individual users?XD
SID12 is offline
Relaxing
Veteran Member
Join Date: Jun 2016
Location: Catlands, NY
Old 08-23-2019 , 15:17   Re: Command used twice
Reply With Quote #5

Switch to arrays
__________________
Relaxing is offline
Old 08-23-2019, 15:24
LearninG
This message has been deleted by LearninG. Reason: nvm ,
Relaxing
Veteran Member
Join Date: Jun 2016
Location: Catlands, NY
Old 08-23-2019 , 15:31   Re: Command used twice
Reply With Quote #6

Code:
new array[33]; public command(id){     if (array[id])         array[id] = 0;     else array[id] = 1;     if (array[id]){         // activated     } else {         // deactivated     } }
__________________
Relaxing is offline
SID12
Junior Member
Join Date: May 2019
Old 08-24-2019 , 09:06   Re: Command used twice
Reply With Quote #7

That was very useful indeed thx .
SID12 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 20:21.


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