Creative+ Tutorial on Coding @mute player time reason and @unmute

Aalus

Big Bandar
Joined
May 20, 2023
Messages
456
Chain 1: If message equals (not) = mute, Split text into elements. Put an array named Message_mute and then put the player message value to split. Now get Element (Message_mute - index = 1, Output variable = Mute). If variable text equals Mute (variable) and if it is equal to @mute, Get Element (Message_mute, index 2, Output variable - (MuteTarget). Get Element - Message_mute (array), Index 3, output variable - MuteTime. Get Element - Message_mute (array) Index = 4 and output variable = MuteReason,
Parse Number (Mute_actual - MuteTime). Select object if player name equals "MuteTarget (variable) Set variable -) %selected%_mutetime (must be saved) and Mute_actual (variabl) is being saved in that variable. Player action send message: %selected%_mutetime. Start loop, Send message: %default% has mute - MuteTarget (variable). Send message (all): Time: MuteTime (variable). Send message (all): Reason: MuteReason (variable)

Chain 2: Loop (20 ticks) Select player condition (compare number) = %selected%_mutetime (-MORE than 1. Set decrement variable: %selected%_mutetime - 1.

Chain 3: Player chat message event: If player name equals (your name) Call function (Player Event)
Put a piston facing towards the code and then place the if variable compare number block behind the piston in the same coding line and inside the chest (%selected%_mutetime) (- MORE 1. Game action cancel, send message You are muted for (text) %selected%_mutetime (variable) -) sec:

Player chat message event: if message equals (not) -) @unmute, Split text into elements (UnmuteArgs -) Player message value), Get element -) UnmuteArgs (array), Index = 1, Output variable = Unmute -) if variable text contains -) Unmute (variable), @unmute (text). Get Element -) UnmuteArgs (array) -) Index 2, output variable = varTarget, select players by name equals varTarget (variable), set variable = %selected%_mutetime, 2. Player action send message: You have been unmuted by %default%

Finally, start the loop when someone joins
 

itsmeDusty

New member
Joined
Jun 2, 2023
Messages
22
Chain 1: If message equals (not) = mute, Split text into elements. Put an array named Message_mute and then put the player message value to split. Now get Element (Message_mute - index = 1, Output variable = Mute). If variable text equals Mute (variable) and if it is equal to @mute, Get Element (Message_mute, index 2, Output variable - (MuteTarget). Get Element - Message_mute (array), Index 3, output variable - MuteTime. Get Element - Message_mute (array) Index = 4 and output variable = MuteReason,
Parse Number (Mute_actual - MuteTime). Select object if player name equals "MuteTarget (variable) Set variable -) %selected%_mutetime (must be saved) and Mute_actual (variabl) is being saved in that variable. Player action send message: %selected%_mutetime. Start loop, Send message: %default% has mute - MuteTarget (variable). Send message (all): Time: MuteTime (variable). Send message (all): Reason: MuteReason (variable)

Chain 2: Loop (20 ticks) Select player condition (compare number) = %selected%_mutetime (-MORE than 1. Set decrement variable: %selected%_mutetime - 1.

Chain 3: Player chat message event: If player name equals (your name) Call function (Player Event)
Put a piston facing towards the code and then place the if variable compare number block behind the piston in the same coding line and inside the chest (%selected%_mutetime) (- MORE 1. Game action cancel, send message You are muted for (text) %selected%_mutetime (variable) -) sec:

Player chat message event: if message equals (not) -) @unmute, Split text into elements (UnmuteArgs -) Player message value), Get element -) UnmuteArgs (array), Index = 1, Output variable = Unmute -) if variable text contains -) Unmute (variable), @unmute (text). Get Element -) UnmuteArgs (array) -) Index 2, output variable = varTarget, select players by name equals varTarget (variable), set variable = %selected%_mutetime, 2. Player action send message: You have been unmuted by %default%

Finally, start the loop when someone joins
what to put in mutetarget

do i have to put dynamic variable
?
 
Top