Jump to content

NanoBob

Distinguished Members
  • Posts

    49
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by NanoBob

  1. Is your database actually mySQL or SQLLite? Because you state mysql both in your code and topic title, but your dbConnect call is for a SQLLite database.
  2. Just to inform you, if you're planning on created a lua compiler to use with MTA, that will not work.
  3. In the original GTA:SA files there was code and animations for sex, these were disabled in the release of the game, but still remained in the game. Now the issue is that people found out about that (and made the "hot coffee" mod, which reenabled them. In response to that in an updated version of GTA:SA Rockstar Games had removed the animations alltogether. This means that people with later versions of GTA:SA will be unable to see the animations, whilst people with the original version will be able to see them.
  4. That is exactly what you ahve to do. The results are returned in an array like table. Every entry in that table is one row from your database. Every row in that table is also a table, of which the keys are the string names of the columns in your database table. if(accData[i].username) then outputChatBox(accData[i].username,source,255,0,0, true) -- used to check results end
  5. If the server is set up to follow your server's bans for that ban type as well, then yes. Adding a ban like that would most likely look something like this: Then in the server settings for the other server your server would need to be enabled like this: So with the config above if I ban someone from SAES:RPG, and your server has "abusive behaviour" bans from SAES:RPG enabled, then the player will also e unable to join your server (given you have implemented the code snippet which can be found on the developers page, on the management dashboard, whilst logged in with your server account. The reason SAES:RPG is there is because I am actually the lead developer of SAES:RPG. I hope that in the coming weeks many other servers will join the platform, so we can keep our servers clear of any nasty people.
  6. We all know that cheaters and hackers are not people you want on your server, or on any server for that matter. In order to prevent these people who get banned on one server for cheating, hacking (or just being a dickhead) from joining another server and doing the exact same, ruining the game for other players I have developed Bansync. Bansync is a way for a server owner to both contribute, and profit from a ban database, somewhat similar to how VAC works. Where getting banned from one server would mean you get banned from others as well. Anyone can sign up to join bansync as a server, and contribute to the database. And as a server owner you will be able to specify per server what types of bans you want to enforce on your server. ( See screenshot in spoiler below) Besides just being a ban database, it's also a platform for people to appeal their bans which were handed out using bansync. When an appeal is accepted the ban is automatically lifted and the player will be able to play on any servers enforcing bansync. Bansync runs as a website at https://bans.nanobob.net/ , once you sign up for a server account you will have information on how to implement bansync available on your admin dashboard. I welcome any questions, and encourage you to browse the website, it contains a more detailed and in depth explanation of the project. I would also like to ask for anyone who is interested and owns a server, or plays on a server which you think should be hacker free, to implement this, or ask the developers to implement bansync. This way we can make the MTA community just a bit nicer for everyone. Screenshots:
  7. A better idea would be to use an autoincrement column in your database. So your code won't need to asign the IDs. But since you also have a username, which is unique per playerm why not use that as primary key?
  8. use https://wiki.multitheftauto.com/wiki/GuiGridListGetItemText instead of guiGridListGetItemData
  9. What would probably be a lot easier, more flexible, and nicer would be to make use CEF instead. This will require you to use HTML, CSS and Javascript as well. But even if you've never done it before, it's not that difficult. https://wiki.multitheftauto.com/wiki/CEF_Tutorial Otherwise for the dx solution, you will need to compare the position you clicked on with the position of the items, since dxDraw functions don't create elements or anything like that, they just draw a couple lines and such for you.
  10. What's the point of that entire function? it's exactly the same as just calling tonumber() with the exception that tonumber returns nil when the string can't be parsed and your function returns false.
  11. NanoBob

    createWeapon

    What you would do is have a table on the server side, with all the created weapons. When a player join the game, and on creation of the weapon you would use triggerClientEvent() to create the weapon for all clients that do not yet have it. FUrthermore in order to synchronise them you would have to make sure the functions are executed on all clients, this can be done using triggerClientEvent. (If you want to sync from 1 client to all other clients you will have to triggerServerEvent first, and from there on triggerClientEvent to every client (except the original sender)
  12. You can use the client side event onClientChatMessage event, and call cancelEvent when the message matches the message you don't want to be output. For sharing data and making calls between resources you could use exports as Enargy stated.
  13. NanoBob

    CEF Problem

    The documentation for guiCreateBrowser specifies the 5th argument "isLocal" is required to be set to true if the page you are loading is from a local file. You set this to false meaning you can only load public websites, not local files. Change this to true and it should work just fine.
  14. Also if you write elseif as one word you will only need one end to end your entire if statement.
  15. You have to make your engineLoadTXD and engineLoadDFF functions get called after the download is finished. https://wiki.multitheftauto.com/wiki/OnClientFileDownloadComplete Also you really would not want to restart hte resource when the player logs in since that restarts it for all players, meaning all mods get unloaded and reloaded.
  16. NanoBob

    help

    Weapons use weapon slots, the M4 and AK are in the same slot. And so are the pistol and the deagle, the issue is you can only have one weapon per slot. For info on the weapons and their respective slots check the wiki. https://wiki.multitheftauto.com/wiki/Weapons
  17. NanoBob

    TOP mysql

    https://wiki.multitheftauto.com/wiki/DbQuery
  18. I believe this is actually SQLlite, not mySQL. But there's no real difference regarding your question. ON line 3 you output the result of the query using toJSON, toJSON is what makes it output in that way. In order to output it like you want you would have to use a loop. for id,row in ipairs(members) do outputChatBox(row.member_account) end More information about this can be found here https://www.lua.org/pil/7.3.html
×
×
  • Create New...