Hi! I’d like to learn LUA! But that’s not a problem, I can attempt to learn.
But I’ve been trying to make a command. /do.
It’s used on SAMP roleplay servers to describe a roleplay item, e.g: “/do My M4A1 rifle would be painted in a desert camouflage.”
The command is just a rip off of /me just in a different context. I’d like it to print out to the chat, allowing other people to see it, like me. Like this: “<User Input> (( ply name ))”, example: “The camera would be set to HDR mode. (( Cody Castle ))”. Would the below code work? I tested it on single player and nothing happens. I would just like help:) Thanks!
hook.Add( "PlayerSay", "doCommand", function( ply, text, input ) text = string.lower( text ) if ( text == "/do" ) then v:ConCommand("say"..input.."(("..ply.."))") return "" end end )