Jump to content

Noki

Members
  • Posts

    851
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Noki

  1. http://www.lua.org/pil/20.2.html As we can see, we can't just use string.find(var, ".") because .find is meant to find patterns in strings and not strings within strings. That's why there is "%d", "%w" etc. And, "." matches all characters according to the link above. Since we're looking for a pattern, we need to use the pattern operator before what we want to find (%). So string.find(var, "%.") would work. From this we can also see string.find has an argument on the end of it called plain. That matches a plain character without any pattern operators (so I can search for just "w" instead of "%w" which matches alphanumeric characters. So, you can do string.find(var, ".", 1, true). 1 represents the string index to begin at. tl;dr var = "100.000.000" string.find(var, "%.") -- or string.find(var, ".", 1, true)
  2. Create a col shape and on vehicle exit, check is a player is within the specific col shape and if they are, cancel their exit using cancelEvent().
  3. getResources fileExists getResourceName You will also need a few of the other file functions.
  4. Noki

    Can't enter a server.

    viewtopic.php?f=5&t=94271&p=847080&hilit=EngineSetAsynchronousLoading#p847080
  5. Noki

    Vote!

    Contact the original author if you want a decompiled version.
  6. Noki

    MTA 5 ?

    https://en.wikipedia.org/wiki/Streisand_effect
  7. Noki

    MTA 5 ?

    It is still alive.
  8. You're the one who think it's okay to cheat in a game.
  9. Noki

    Flashing Icon

    https://bugs.mtasa.com/view.php?id=9059
  10. Noki

    call

    You need to pass client to the timer. So after the 1, but before the closing bracket on the Timer function, add another argument called client.
  11. If your marker code was server sided, then your maker was probably created server side. Any errors in debugscript?
  12. You will need to use triggerClientEvent from the server side. Remember to pass the hitElement as well.
  13. foo = {} function foo.bar() outputDebugString("Executed foo.bar") end The table would look like foo = {[1] = bar}. Though, bar would be a function (eg: function: 0429DF58) and not a function name.
  14. I was able to with runcode, like the way I posted it above. However, I did not think of concatenating it and I am now asking myself why I didn't think of that. Thanks!
  15. Preface: I'm trying to use loadstring to pass a variable. I'm using it with and without assert and not having any luck. I first call a function in another resource (using export), which passes the variable fine. However, the problem is in passing it using loadstring (see the second block of code). Everything else works fine, except this. It's worth mentioning this is entirely client-sided. It works fine using runcode, which is odd. arg = 1 exports.util:createConfirmationWindow("Are you sure you want to sell this vehicle?", "exports.system:callback_sellVehicle(arg)", arg) outputDebugString("util: argument passed = "..tostring(arg)) if (callbackString ~= "") then loadstring(callbackString)(arg) assert(loadstring(callbackString))(arg) end arg within the scope of that piece of code is equal to 1. When outputted in debugstring, it always outputs 1. function callback_sellVehicle(arg) outputDebugString("Successfully called callback_sellVehicle") outputDebugString("system: argument passed = "..tostring(arg)) end However, when calling this function via loadstring and passing the arg variable, it always returns nil, both with and without assert.
  16. I'm 15 and I've been playing GTA since I was 8. It really does not matter what your age is. Take Two/Rockstar aren't going to come to your house and demand that you stop playing because you're under 18.
  17. On a player or ped it returns a value between 0 and 100, and on a vehicle it returns a value between 0 and 1000.
  18. http://bugs.mtasa.com/view.php?id=9065 Edit: ccw fixed it already. That was quick.
  19. Noki

    MTA 1.5 MAC

    https://www.dropbox.com/sh/wlfdul8f1i7x ... to.app.zip https://www.dropbox.com/sh/wlfdul8f1i7x ... ctions.txt I found these on one of qaisjp's profiles. I'm not sure if they work or not as I don't have a Mac to test them out on.
  20. If you want to do something as a player joins, use onClientPlayerJoin. It triggers client-side for every player who joins, par the local player. No need for client and server-sided events.
  21. You can use onClientKey in conjunction with isConsoleActive. Remember the console binds to F8 and the tilde key.
×
×
  • Create New...