Chat

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
D

Deleted member 239

Hey,

I want to create a json Chat. When anyone clicks on my name, a chat has to be open with the line "/msg <Player>", so the player has to type only the msg message.

Best regards
H0peLess
 
This may help: https://forums.skunity.com/resources/json-sk.23/.

You could write your own json chat plugin with the help of the Json API.

Something like this:
code_language.skript:
on chat:
    set {_msg} to message
    cancel the event
    #add stuff here like chat filters, spam control, etc.
    loop all players:
        json("%loop-player%", "%{_msg}%") #Add json command
 
No, i mean a clicked event.
2017-07-16_21-38-51.gif

[doublepost=1500234201,1500233949][/doublepost]EDIT:

I fixed it. simply add "sgt:COMMAND" to the json event.
 
Yeah, this is how it, Look at the Json page.

code_language.skript:
json("%player%", "%player%||sgt:/msg %player%||>> %message%")


#edit oh, you figure out. didn't see your edit. :emoji_grinning:

then make as solved.
 
UPDATE

Json.sk includes a Json broadcast feature. Rather than loop all players and send a json to each one, simply use the json broadcast feature.

code_language.skript:
on chat:
    set {_msg} to message
    cancel the event
    #add stuff here like chat filters, spam control, etc.
    jsonBroadcast("%name of player%||sgt:CMD||%{_msg}%")
Edit: Removed loop.
 
Last edited by a moderator:
Status
Not open for further replies.