Necktrox

Members
  • Content count

    481
  • Joined

  • Last visited

Community Reputation

12 Decent

3 Followers

About Necktrox

  • Rank
    Hustler
  • Birthday 22/11/95

Details

  • Gang
    www.teamskc.co.uk
  • Location
    Germany
  • Interests
    Lua

Recent Profile Visitors

294 profile views
  1. Look at the repository, it has a Makefile e.g. in ml_system. https://github.com/multitheftauto/multitheftauto-modules
  2. addEventHandler("onClientPlayerSpawn", root, function () setPedCanBeKnockedOffBike(source, false) end ) This would prevent any player to be knocked off his bike. Furthermore, this snippet is clientside, because setPedCanBeKnockedOffBike is a clientside-only function.
  3. You have to use cancelEvent in the onPlayerChat event if messageType == 1 and place your /me related code there.
  4. You are missing the socket module for your MTA server. There is a check in place to prevent starting the resource without it, which you probably circumvented, because the resource stops immediately if it's not available.
  5. 1 second 1 minute = 60 seconds 1 hour = 60 minutes = 3600 seconds 1 day = 24 hours = 1440 minutes = 86400 seconds 1 month = 31 days = 744 hours = 44640 minutes = 2678400 seconds 1 year = 12 months = 365 days = 8760 hours = 525600 minutes = 31536000 seconds
  6. https://github.com/Necktrox/mta-discord-bot/commit/da6cd936a57ef106b2c612fd7dec0bc893de216c Fixed, I didn't test this part of the code, because I modified my config to include the "Bot " prefix and never tested it without it. Sorry for any inconvenience.
  7. @LoPollo Did you use this token?
  8. There are 3 parts, the relay server and 2 MTA resources. You can install PM2 (Unitech/pm2) to launch the relay node.js server. You only have to duplicate example.config.json as config.json, make your changes to the configuration and run the relay. Below is a copy of my PM - how to configure the relay. Token Visit Applications @ discordapp.com Create a new application if not done yet or select an existing one Create a bot user for the application Reveal the bot user token (you have to click on 'click to reveal') Copy the entire bot token and paste it into your config (see example below) Note: Do not share this bot token with anybody, because they will have access to the bot user. Passphrase This is a random text passphrase you can set to anything you want. Make sure the MTA resource uses the same passphrase in the configuration, otherwise the MTA resource won't be able to authenticate with the node.js relay. The passphrase is like a login password just to make sure nobody can connect to the node.js relay and send messages/spam without your permission to do so. Example Configurationđź“‹ { "port": 8100, // You can use any port you want "passphrase": "super-secret-password", // You can use any passphrase you want "server": "228439442069651456", // Discord server/guild id from Mr.Green Discord guild "bots": [{ "channel": "race", // Name of the channel the bot communicates on (here: #race, do not include the hash #) "token": "bot.token" // Your secret bot user token (do not share this code with others) }] } Warning: JSON configuration files do not support comments. Remove these.
  9. One the one hand you are forced to keep OOP disabled in any resource, which uses the socket module's functions; and I like to use the OOP methods, because the code looks cleaner and easier to read when you try to understand it. On the other hand, you can restart the event handler resource without interrupting the connection with the Discord relay - I have to admit here, that I didn't have any specific reason not to use one resource, it was personal preference. I actually encode the JSON string with base64 to avoid this issue, see here.
  10. I have released a self-hosted Discord relay some time ago, but didn't bother posting here or adding documentation. @specahawk, you can tell me to remove this post if you don't want to have this advertising in your thread. Anyway, the code is on GitHub (Necktrox/mta-discord-bot) and it's being used by Mr.Green, one unknown guy and my clan's server. It doesn't support any commands, but the implementation is up to you (the bot recognizes commands with dot (.) prefix). It's running perfectly stable for months.
  11. The chat box doesn't work like that. To accomplish your suggestion we would have to assign an unique message id for every chat message. You could use the id to receive, edit and delete a chat message. Feel free to submit a ticket in the bugtracker.
  12. You can use my premake-refactor repository of the modules: https://github.com/Necktrox/multitheftauto-modules
  13. Well, I didn't work on my resource for a long time, but I can also link to newer resources.
  14. https://wiki.multitheftauto.com/wiki/Shader
  15. You could try it in a virtual machine.