Jump to content

Noki

Members
  • Posts

    851
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Noki

  1. It's a play on words. Some might consider it a euphemism. It is saying 'stop playing with yourself', as in multiplayer. But it also implies the act of 'playing with yourself', referring to masturbation. I'm really surprised not everyone knew this.
  2. Noki

    I need help

    function doesVehExists(vehicleName) local qh = dbQuery(connection, "SELECT * FROM `vehicle` WHERE `vehicleName`=? LIMIT 1", vehicleName) local result = dbPoll(qh, -1) if (result and #result > 0) then return true end return false end function addToDatabase(vehicleName, vehicleid, vehicleType, r, g, b) if (not doesVehExists(vehicleName)) then local color = toJSON({r, g, b}) dbExec(connection, "INSERT INTO `vehicle` VALUES (?, ?, ?, ?)", tostring(vehicleName), tostring(vehicleid), tostring(vehicleType), color) return true end return false end function getVehicleColor(vehicleid) local qh = dbQuery(connection, "SELECT `color` FROM `vehicle` WHERE `vehicleid`=? LIMIT 1", vehicleid) local result = dbPoll(qh, -1) if (result and #result > 0) then return tonumber(unpack(fromJSON(result[1].color))) end return false end I ended up using JSON to store the colour, because there are multiple values and it's better than slabbing each colour in a separate column. I also don't know your column names, so make sure to replace them in the code.
  3. Noki

    Unicode

    Works flawlessly. Thank you.
  4. Noki

    Unicode

    I'm trying to log chats to a MySQL database. The code itself is fine and all insertions work etc. The database, tables and columns are all set to utf8mb4_unicode_ci and utf8mb4. However, when I type in a foreign language in MTA via the console, the insertion isn't correct. I get these weird characters. I've had a look into character encoding but it's confusing, to say the least. All I know is that utf8mb4_unicode_ci is currently working on the database's end. When I manually enter the characters into MySQL (via phpmyadmin) it works correctly, though not in MTA. I have tried so far with Japanese and Arabic.
  5. Noki

    Internet Speed

    Australia in a nutshell. It infuriates me.
  6. Noki

    MTA For Android

    As someone who has owned multiple Windows Phones and am writing from one now, they don't run anything.
  7. Noki

    MTA For Android

    MTA runs on x86 or x64 architecture. An Android phone usually runs on ARM architecture. You can't run x86/x64 applications on a device that uses ARM. Simple as that. Not to mention MTA is not developed for phones (look at the source code yourself or read what people have said in this thread if you don't believe me) and probably never will be. Your friend is remote controlling his/her computer using their phone, there is no other way.
  8. You're saying that all stable versions are completely bug free? I can assure you they are far from it. They're stable, not perfect.
  9. Noki

    [WIP] LIFE

    What functions would I need to give this resources access to in the ACL?
  10. Noki

    a

    Yes, that will work. But make sure you are logged in in-game and you have admin access in the ACL.xml file (/server/mods/deathmatch/ACL.xml).
  11. If you really want to use ACL: bool addCommandHandler ( string commandName, function handlerFunction, [bool restricted = false, bool caseSensitive = true] )
  12. Which can create bad habits. People like to talk themselves up on the internet. But yes, good job, raysmta!
  13. Noki

    a

    I gave your two possible methods to do. One method is more efficient than the other. Read about resources. They contain one or more .lua files and a meta.xml file. Paste your code (engineLoadTXD and all of that stuff) into a .lua file. Declare that .lua file in the meta.xml with . Then, put those two files in a folder, and place that folder in /server/mods/deathmatch/resources/. Load up map editor, log in and type "start" followed by the name of your resource (which is the name of the folder your script is in).
  14. You will need to make the command handler tied to /superman ACL restricted. It's an extra argument in addCommandHandler. That, alongside with adding the function line in your ACL, should work.
  15. Noki

    a

    I would strongly recommend you use resources for this. Enter your map editor server => log in => start runcode => open console => crun
  16. Noki

    a

    https://wiki.multitheftauto.com/wiki/Resources https://wiki.multitheftauto.com/wiki/Meta.xml
  17. Noki

    a

    crun means client run, which runs code client side. You cannot run client-side code in the console, as the console is the server itself. Put it in a .lua script and make it a new resource.
  18. JR10 is correct. If you're going to make your code server-sided (which you should), nstead of using onClientMarkerHit, use onMarkerHit.
  19. Noki

    a

    I was responding to the title itself. However, I'm here so I might as well tell you the rest. I'm assuming you have an account in your local server with admin rights. So, load into map editor, bring up your console, and log in. From there, write 'start runcode'. From there, write 'crun' followed by your code. But don't do the whole thing, just parts of it at a time. "crun col = engineLoadCOL(':resourceName/GTAV/dt1_24_bd_a_.col') dff = engineLoadDFF(':resourceName/GTAV/dt1_24_bd_a_.dff', 0) engineReplaceModel(dff, 10905) engineReplaceCOL(col, 10905)" Run something like that, where resourceName is the name of the resource in which they are declared in the meta file. Also make sure that resource is started. However, loading them in via runcode is slow and will probably not work. You're better off just putting them all in one resource, and starting that resource after you have logged into your account in the map editor.
  20. Noki

    a

    Don't use the tilde, use either ' or ", depending on your keyboard layout in the console.
  21. Post your mtaserver.conf
  22. You replace: if hasObjectPermissionTo(thePlayer, "user.guitarist5150", true) then with: if getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) == "teamName" then
  23. function skate2(_, newModel) if (newModel == 99) or (newModel == 92) and (getElementType(source) == "player") then setPedWalkingStyle(source, 138) end end addEventHandler("onElementModelChange", root, skate2)
  24. You should check for the vehicle itself. if getPedOccupiedVehicle(player) then You also never froze the vehicle, you only unfroze it. And if you want it to change your interior, you need to use setElementInterior. onClientMarkerHit is also a client-side event. So make sure your meta file declares your script as client-side.
×
×
  • Create New...