Jump to content

[MM]Stuart

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by [MM]Stuart

  1. I think this would be a good idea also a new event onPlayerCommand Which should be called every time a player does a command

    EG

    addEventHandler("onPlayerCommand",getRootElement(),
    function (Command)
    local Players = getElementsByType("player")
    for k,p in ipairs(Players) do
    if isObjectInACLGroup ( "user." .. getPlayerName(p), aclGetGroup ( "Admin" ) ) then
    outputChatBox(getPlayerName(source).." typed: ".. Command,p)
    end
    end
    end
    )
    

  2. I'm not sure about using mysql here. For me, it isn't a good idea, server makes bigger bandwith >.> When I turned it on on my server, there was "omgwtflolsuperlal" lagzzz... It's better to use a lua irc library :P

    This is mostly for linux users as there is no irc plugin working for linux at the moment

  3. NOTES: You will need JDK to compile the Irc bot

    What It does ?

    Well this adds a irc echo to your server using mysql.

    The download includes a resource and a Irc bot which is made in java using the pircbot plugin

    It also includes 1 irc command !m [Message] to talk ingame

    How to set it up:

    -Firstly you need to create a mysql database and 2 tables

    first on called "irccmds" and 3 feilds like this

    ID bigint auto_increment

    Cmd varchar

    Args varchar

    and then another table called "echo" with 2 feilds like this

    ID bigint auto_increment

    Message varchar

    They you need to open up server.lua in the [MM]Echo folder and edit

    local SqlHost = "localhost" -- Change this to your mysql host
    local SqlUser = "root" -- Change to your mysql user
    local SqlPass = ""	-- change to your mysql pass
    local SqlDataBase = "" -- Change to ur mysql db
    

    to your host user etc

    Also open the irc bot folder and open the SQL.java file and edit

    theses to yours

    public static String HOST = "localhost";
    public static String DB = "";
    public static String user = "root";
    public static String pass = "";
    

    finally open MyBot.java

    and edit theses

    public String Channel = "#asdfghsdfgg";
    public String BotName = "[MM]EchoBot";
    

    atfer that run compile the bot (compile.bat) and then run it

    Note if restarting the bot it is best to empty the table "echo" first this also works for linux :)

    Feel free to report any bugs I will try can fix them if I have time

    Here is the download link

    https://community.multitheftauto.com/index.html?p ... ils&id=596

    Credits

    -Me (Scripting)

    -djlobo (idea) couldn't of done with out him xD

×
×
  • Create New...