Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Cool on Apr 21, 2017, 03:36 PM

Title: Problem with rulk's bot
Post by: Cool on Apr 21, 2017, 03:36 PM
The rulk's bot seems to doesn't work properly when we have a ":" in our text. As rulk's bot gets the username, text by splitting ":". So when I try to send any text from echo bot containing ":" it doesnt work. so how to deal with it
Title: Re: Problem with rulk's bot
Post by: Sebastian on Apr 21, 2017, 03:44 PM
How does exactly look the code of rulk for onPlayerText ?
Title: Re: Problem with rulk's bot
Post by: Cool on Apr 21, 2017, 03:58 PM
// Find the text that was typed.
local
FindText = split( raw[ 0 ], ":" ),
text = FindText.len() > 1 ? FindText[ 1 ] : "",
prefix = text != "" ? text.slice( 0, 1 ) : "";

// Find the command that was typed.
local
Findcmd = text != "" ? split( text, " " ) : "",
cmd = Findcmd != "" ? Findcmd[ 0 ].slice( 1, Findcmd[ 0 ].len() ) : "";

Title: Re: Problem with rulk's bot
Post by: DizzasTeR on Apr 21, 2017, 04:18 PM
You can't deal with it. Its how its taking out event IDs and separating the raw data. It does not affect your server or the echo in any way if someone sends a : D face and there's no : in echo. So just leave it.
Title: Re: Problem with rulk's bot
Post by: Cool on Apr 21, 2017, 04:47 PM
@Doom_Kill3R then what i do i am trying !tempban Doom 00:00:23 What i do :P
Title: Re: Problem with rulk's bot
Post by: Anik on Apr 21, 2017, 04:49 PM
Quote from: Cool on Apr 21, 2017, 04:47 PM@Doom_Kill3R then what i do i am trying !tempban Doom 00:00:23 What i do :P
Use something else instead of ":". Such as 00~00~23
Title: Re: Problem with rulk's bot
Post by: Cool on Apr 21, 2017, 05:49 PM
Problem Solved. but actually not solved i just changed the sign still cant use : :P