[Release] Chat Roleplay

This is a standalone script for /911 /ooc /me and /dispatch the script is running on a server i own called Justice Nation RP if you would like to test it

commands
/911 “allows the user to call 911”
/dispatch “lets a dispatcher respond”
/me “a player is doing an action”
/ooc "player is out of Character

In v2 i changed string.sub(msg,5) to string.sub(msg, 10) for dispatch and i capitalized the me and dispatch
Download Link
commands.zip v1 (1.8 KB)commands.zip v2 (1.8 KB)

8 Likes

i love you thank you

Would be cool if the name was out of dispatch, irl, Dispatchers dont usually give their names out. Just a suggestion :slight_smile:

Should Capitalize the D in Dispatch and M in ME

1 Like

will fix in the next update for this

ikr that always tilts me lmao

@Kevinsch1 It seems like any command over 3 characters includes the characters after 3 in the message. For example, your screenshot shows that Dispatch will show “patch” before any thing you write. I tested this further by using your script to write another one for “admin announcements” in which I made the command “/admina” and the “ina” from that command appears in chat just like “patch” from “dispatch”
Wondering if this is intentional for some reason and either way if there’s something I can change to fix it. Thanks man, otherwise awesome.

Change:

string.sub(msg,5)

To:

string.sub(msg, 10)

The line “/dispatch” is 9 characters, so therefor the next character line would be 10.

1 Like

Cool, that’s what I was thinking afterwards but I didn’t have a chance to test it. Thanks

You can fix this on your own. Here’s how:

replace
TriggerClientEvent('chatMessage', -1, "Dispatch | " .. name, { 30, 144, 255 }, string.sub(msg,10))

with
TriggerClientEvent('chatMessage', -1, "Dispatch", { 30, 144, 255 }, string.sub(msg,10))

All this does is exclude .. name so it doesn’t show who sent it. Hopes this helps!

Awesome! Thanks <3 Very good work

1 Like

Hi i installed this and it works, but it displays /me /911 and /ooc twice, one with color tag and one without

must be a conflicting mod

How can you remove the colon : from the script?

So it’s like OOC | Example test

not sure this was the first script i made but ill look into it for you and get you a version that has that as soon as possible

Thanks. I need it ASAP.

So like you do /me locks the door

It returns Name locks the door

Maybe in a color all together.

Hey buddy! Did you ever figure that one out? A player on my server was making the suggestion about the colon and I was in the same boat as you and didnt see the code that was putting it in.

you want to remove the colon or what?

Yah for example when someone does /me instead of -> Me | Cyborgmonkey: opens door
it become -> Me | Cyborgmonkey opens door

use this

    TriggerClientEvent('chatMessage', -1, "[Me]", {255, 0, 0}, "" .. GetPlayerName(source)   )