5150 Posted September 25, 2016 Posted September 25, 2016 where can i find the /me script in the server files? i want to edit it a little bit
Gravestone Posted September 25, 2016 Posted September 25, 2016 That is an MTA Client command. You can try this: addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "me" then cancelEvent(true) outputChatBox() -- enter the format of the text you want it to be like end end ) 3
#BrosS Posted September 25, 2016 Posted September 25, 2016 (edited) Deleted post Edited September 25, 2016 by #KraTos^_^
N3xT Posted September 25, 2016 Posted September 25, 2016 6 minutes ago, #KraTos^_^ said: * Local cmd = me You're doing a big mistake
#BrosS Posted September 25, 2016 Posted September 25, 2016 3 minutes ago, N3xT said: You're doing a big mistake I know i'm using my phone the post wont be deleted Anyway . the me command is not a script you can find in the files . just use a command block just like what @Gravestone Said . good luck
Bonsai Posted September 25, 2016 Posted September 25, 2016 Just use https://wiki.multitheftauto.com/wiki/OnPlayerChat, check if type is 1, cancel the event, output it in your own way. 1
#BrosS Posted September 26, 2016 Posted September 26, 2016 Command = { ['me'] = true; --['cammand'] = true; type any cammand you want it to stop ['logout'] = true; } Commandd = { ['say'] = true; } SpamF8Timerr = {} SPAMF8 = {} addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( cmd ) if Command [ cmd ] then cancelEvent ( ); if getElementData ( source, "cmder") >= 0 then setElementData ( source, "cmder",0, false) local serialToBan = getPlayerSerial( source ) local timeToUnBan = '1' else outputChatBox ( "This Command is stoped by Console",source, 255,0,0) setElementData ( source, "cmder", getElementData ( source, "cmder")+1, false) end end; end ); addEventHandler ( 'onPlayerJoin',getRootElement ( ), function () setElementData ( source, "cmder",0, false) setElementData ( source, "cmderSpam",0, false) setElementData ( source, "spamM",0, false) end ); -----------------
5150 Posted September 26, 2016 Author Posted September 26, 2016 On 9/24/2016 at 10:47 PM, Gravestone said: That is an MTA Client command. You can try this: addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "me" then cancelEvent(true) outputChatBox() -- enter the format of the text you want it to be like end end ) Awesome, how can i make this local with a distance of 25?
Gravestone Posted September 26, 2016 Posted September 26, 2016 There is already an example for local chat given on onPlayerChat.
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