[MadCommands] StaffChat tutorial!

Hello everybody! I’m back into another tutorial, on this tutorial I’ll show you how to do staff chat command, that will only make a chat between every staff member.

First:

/cmd create staffchat

Then:

cmd add staffchat let %msg% = join(%args%[1+],\" \") 
cmd add staffchat if varset(%msg%) then goto 5 
cmd add staffchat message %p% Usage: /staffchat <msg>
cmd add staffchat exit 
cmd add staffchat let %staff% = array(<all your staff members>)
cmd add staffchat if %p% in %staff% then goto 9
cmd add staffchat message %p% You must be a staff member to use this command! 
cmd add staffchat exit
cmd add staffchat message %staff% [Staff-Chat] %p% >> %msg% 
cmd add staffchat exit 

And that’s it! Now you do /staffchat <msg> to send a message from you to all the staff members, and they have to do /staffchat <msg> as well to chat with the other staff.

And if you want, you can copy and paste the code to rcon.cf to save your time and to be faster

IshYaBoiMagmaCreeper
Join my servers:


Subscribe to me on YouTube: MagmaCreeper YT

very useful!

I wonder if it would be possible to do something like /staffchat enable and it enables it so you can talk with chat and don’t have to use the command everytime to write a message and then /staffchat disable to turn this off.

Mohammed
LEET Customer Service Representative

Check out my graphic design portfolio: http://mohammed.graphixnet.xyz

Need assistance? Get support at support.leet.cc !

GFX Designer

Twitter/YT/Instagram: TechKingHQ
Discord: TechKingHQ#4929

@fuzionpanda I found out yesterday that this is possible!
I’ll make a tutorial today!

twitter: @datalion_
Mail: [email protected]



Any problems?
Feel free to contact us on: http://support.leet.cc

@datalion said in [MadCommands] StaffChat tutorial!:

@fuzionpanda I found out yesterday that this is possible!
I’ll make a tutorial today!

AWESOME! :D

Mohammed
LEET Customer Service Representative

Check out my graphic design portfolio: http://mohammed.graphixnet.xyz

Need assistance? Get support at support.leet.cc !

GFX Designer

Twitter/YT/Instagram: TechKingHQ
Discord: TechKingHQ#4929

@datalion said in [MadCommands] StaffChat tutorial!:

@fuzionpanda I found out yesterday that this is possible!
I’ll make a tutorial today!

Lol it doesn’t work 😂😂😂 and you raged XD, but I’ll try to figure out how to do it before you >:)

(And no I won’t look/steal from your code)

IshYaBoiMagmaCreeper
Join my servers:


Subscribe to me on YouTube: MagmaCreeper YT

Hiw exacly does it message staff do you give staff groups the perm ti see the chat or no? Ilas am pooking for a staff chat

r59512.pocket.pe port 59512

To do automated staff chat, create an array of staff members who have it enabled. Then set up a chat event trigger and in it start by checking if the current player has automated staff chat enabled if he/she does then do cancel and pass the chat message to staffchat. Otherwise just exit and let PocketMine distribute the chat as usually.

Now you do the coding ;-)

If you like trains or mazes, make sure to check out TrainMazeLand!
If my post has helped you, feel free to donate some credits to trainmazeland.leet.cc ;-)

@madhon I created the staffchat command but it keep sending the message with an server error. (not madcmd error)

twitter: @datalion_
Mail: [email protected]



Any problems?
Feel free to contact us on: http://support.leet.cc

@madhon

cmd create staffchat
cmd add staffchat if varset(%args%[1]) = 0 then goto 6
cmd add staffchat let %toggle% = lowercase(%args%[1])
cmd add staffchat if %toggle% = \"chat\" then goto 34
cmd add staffchat if %toggle% = \"enable\" then goto 8
cmd add staffchat if %toggle% = \"disable\" then goto 21
cmd add staffchat message %p% Usage: /staffchat enable/disable
cmd add staffchat exit
cmd add staffchat #enable
cmd add staffchat let %status% = playerstatus(%p%)
cmd add staffchat if %status%[\"op\"] = 0 then message %p% You have no permission to use this command!
cmd add staffchat if %status%[\"op\"] = 0 then exit
cmd add staffchat load %staff%
cmd add staffchat if %p% in %staff% then goto 19
cmd add staffchat let %staff%[] = %p%
cmd add staffchat save %staff%
cmd add staffchat load %chattoggle%
cmd add staffchat let %chattoggle%[%p%] = 1
cmd add staffchat save %chattoggle%
cmd add staffchat message %p% [StaffChat] Enabled
cmd add staffchat exit
cmd add staffchat #disable
cmd add staffchat let %status% = playerstatus(%p%)
cmd add staffchat if %status%[\"op\"] = 0 then message %p% You have no permission to use this command!
cmd add staffchat if %status%[\"op\"] = 0 then exit
cmd add staffchat load %staff%
cmd add staffchat if %p% notin %staff% then goto 28
cmd add staffchat let %staff% = %staff% - %p%
cmd add staffchat save %staff%
cmd add staffchat load %chattoggle%
cmd add staffchat let %chattoggle%[%p%] = 0
cmd add staffchat save %chattoggle%
cmd add staffchat message %p% [StaffChat] disabled
cmd add staffchat exit
cmd add staffchat #chat
cmd add staffchat load %staff%
cmd add staffchat load %chattoggle%
cmd add staffchat if %chattoggle%[%p%] = 0 then exit
cmd add staffchat if %chattoggle%[%p%] = 1 then cancel
cmd add staffchat let %msg% = %args%[3]
cmd add staffchat message %staff% [StaffChat][%p%]» %msg%
cmd trigger chat staffchat

What am I doing wrong?

twitter: @datalion_
Mail: [email protected]



Any problems?
Feel free to contact us on: http://support.leet.cc

What errors are you getting? What is the contents of the %staff% variable?

If you like trains or mazes, make sure to check out TrainMazeLand!
If my post has helped you, feel free to donate some credits to trainmazeland.leet.cc ;-)

@xmagmacreeperx Cool suggestion! But I can’t use it since I can’t by MadCommands. I don’t have enough credits.

alt text
What's up everybody, this is Buzz!
YouTube: BuzzTheGamer23
Server Name: BuzzCraft v4
Server IP: buzzcraft.leet.cc
Server Port: 48686

Log in to reply

Looks like your connection to LEET Forums was lost, please wait while we try to reconnect.