- Joined
- Aug 8, 2023
- Messages
- 6
How To code @mute by custome timings???
I must state one thing first. Custom time for mutes or bans will not work when player leaves game or when your world is empty. There are possibilities to keep it working when your world not empty but it could cause other issues like lag and entity limits error so I do not recommend that. When your world is empty it will not work.How To code @mute by custome timings???
Custom*How To code @mute by custome timings???
No, multi line argument command badCustom*
Whats ur ign i can give u the code?
Must support reasons, since dumb stuff. Must also be able to debug if player is not in game, if time isn't a number etc.I must state one thing first. Custom time for mutes or bans will not work when player leaves game or when your world is empty. There are possibilities to keep it working when your world not empty but it could cause other issues like lag and entity limits error so I do not recommend that. When your world is empty it will not work.
For example your command will be something like this: @mute player 2. Let's say number is in minutes.
You will use split text (msg) into an array with space delimiter (default) which will split your command into array elements at indexes
index 0: @mute
index 1: player
index 2: 2
Then you get element from array at index 0 and check if text is equal to @mute. If it is get element from index 1 of an array and select player by condition if player name equals then get element from index 2 of an array multiply it by 60 to get time in seconds and save result in %selected%_mute_time variable (Saved).
Then you will need loop (active all the time - 1 second intervals) which will select all players by condition if variable %selected%_mute_time is more than 0 and decrement it by 1.
Also you need Chat event If variable %player%_mute_time is more than 0 > Cancel event.
I might have mistaken with array indexing so if 0,1,2 is not working try 1,2,3 indexes.
bro i was gonna give him @mute [args], i just CHOSE multi lined for my game cuz i hate my staffNo, multi line argument command bad
We hate you too <3bro i was gonna give him @mute [args], i just CHOSE multi lined for my game cuz i hate my staff