MQXO Posted May 30, 2020 Share Posted May 30, 2020 I am pretty new to skripting and i know kinda what im doing with commands but I've never been able to figure this one out; The commands I'm trying to get are; /forcechat [player] [message] and /forcechatall [message] I feel as though the parameters are pretty self explanitory but in case you dont get it, /forcechatall would force everyone to say the message inputted in the "[messsage]" field, and /forcechat would make the player entered in the "[player]" field say the message in the "[message]" field. Link to comment Share on other sites More sharing options...
KJPAKA Posted May 30, 2020 Share Posted May 30, 2020 This is a fully functioning Skript i made for you. command /forcechat [<offline player>] [<text>]: permission: op permission message: &CNo permission! usage: &c/forcechat <player> <message> trigger: if arg-1 is set: if arg-2 is set: set {_p} to arg-1 if {_p} is online: make {_p} send message arg-2 else: send "&cYou can't sudo a offline player" to player else: send "&CPlease specify a message!" to player else: send "&cPlease specify a player!" to player command /forcechatall [<text>]: permission: op permission message: &CNo permission! usage: &c/forcechatall trigger: if arg-1 is set: loop all players: make loop-player send message arg-1 else: send "&cPlease specify a message!" to player 2 Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
MQXO Posted May 30, 2020 Author Share Posted May 30, 2020 1 hour ago, KJPAKA said: This is a fully functioning Skript i made for you. command /forcechat [<offline player>] [<text>]: permission: op permission message: &CNo permission! usage: &c/forcechat <player> <message> trigger: if arg-1 is set: if arg-2 is set: set {_p} to arg-1 if {_p} is online: make {_p} send message arg-2 else: send "&cYou can't sudo a offline player" to player else: send "&CPlease specify a message!" to player else: send "&cPlease specify a player!" to player command /forcechatall [<text>]: permission: op permission message: &CNo permission! usage: &c/forcechatall trigger: if arg-1 is set: loop all players: make loop-player send message arg-1 else: send "&cPlease specify a message!" to player Thanks, I'm 100% gonna study this so i can figure out what the hell I'm doing. Link to comment Share on other sites More sharing options...
KJPAKA Posted May 30, 2020 Share Posted May 30, 2020 Alright, if you have any questions feel free to contact me. Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
mattwithabat Posted May 30, 2020 Share Posted May 30, 2020 https://en.njol.ch/projects/skript/doc this can help Link to comment Share on other sites More sharing options...
OMGPandaYT2 Posted May 31, 2020 Share Posted May 31, 2020 they made that way to hard this is very simple: command /chat <player> <text>: permission: chat trigger: make arg-1 say arg-2 Link to comment Share on other sites More sharing options...
KJPAKA Posted May 31, 2020 Share Posted May 31, 2020 (edited) What i did was i made it so it checked if it was set and other stuff to make it fancy. Also, use [<offline player>] and [<text>] instead. But yes that would work as well. I also made it check if the player was online etc. Edited May 31, 2020 by KJPAKA Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
UntitledGoose Posted May 31, 2020 Share Posted May 31, 2020 2 hours ago, KJPAKA said: What i did was i made it so it checked if it was set and other stuff to make it fancy. Also, use [<offline player>] and [<text>] instead. But yes that would work as well. I also made it check if the player was online etc. you could've just not used optional arguments, have put `usage: &c/forcechat (player) (message)` before the trigger and made it use a player argument instead of an offlineplayer argument VIP since January 7th, 2020 Support since September 19th, 2020 Helper since November 3rd, 2020 Moderator since March 8th, 2021 Link to comment Share on other sites More sharing options...
KJPAKA Posted May 31, 2020 Share Posted May 31, 2020 I use offline player because then you can tab the name. Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
Nateee Posted June 2, 2020 Share Posted June 2, 2020 Changing the alias would be cooler, like mail, or message. So like, /m. But this is a great skript super simply and works perfectly. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now