Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About 12g

  • Rank
  • Birthday 17/04/1996


  • Location
  • Interests
    Music, Videogames, Computers and Meeting Interesting People

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. No, I've no issues sharing it. Username is benxamix2 and my current e-mail address would be got12g@gmail.com, although I'm not sure if it's associated to that account. The profile URL is https://community.multitheftauto.com/index.php?p=profile&id=237892
  2. 12g

    Call for web designers

    I'd like to help here. I have experience in web design, mostly jQuery+Bootstrap and Angular. I've been playing MTA since 2009 or so, I think. This forum has seen me grow over time, as my interest in programming, started with Lua. I moved on from MTA for some time and I've done a couple of random comebacks every once in a while. I currently have a job as an IT consultant, I've finished a technical career as a Programmer Analyst, and most of my job experience has been poured into web design and Java programming. However I haven't mounted a 'visual' portfolio of my own yet, and I'm most
  3. Hello. I am currently having troubles logging into my MTA Community user profile, it says 'Invalid User ID'. Could anyone help me sort this out? Thanks in advance!!
  4. so, uh, yeah, again me, please, help. thanks.
  5. https://wiki.multitheftauto.com/wiki/OOP
  6. It's quite obvious, heh. function phone:new() local data = {} --blahblahblah return data end --blahblah phone:new() "data" isn't processed anywhere outside of that function scope if you do it like that. Consider deleting the "local" prefix inside of that function block, or adding it to the last line, like: local data = phone:new() or, let that table exist outside of any block, so its scope is limited to the whole script file.
  7. I'd be glad if someone could answer me this. Thanks beforehand.
  8. Ok guys look, I've got this code: local findX, findY, findZ = getWorldFromScreenPosition(cx, cy, 60) local rlX, rlY, rlZ = getElementPosition(localVehicle) rlZ = rlZ+4 local hit, finalX, finalY, finalZ, element = processLineOfSight(rlX, rlY, rlZ, findX, findY, findZ, true, true, true, true, false, true, true, true, localVehicle, false) if not hit then finalX, finalY, finalZ = findX, findY, findZ end if element == nil or getElementType(element) ~= "player" then createProjectile(localPlayer, 19, rlX, rlY, rlZ, 0, nil, findRotation(rlY, rlZ, fin
  9. local polveh = getElementsByType("vehicle") I'm gonna help you to understand how to use this. So, you want it to be triggered for every police vehicle? I guess you mean you mean to every player who is in a police vehicle. That isn't possible from client-side, unless you want to add unnecesary extra processing both for client and server by triggering events from client and back from server. So, in the server script is where we'll use some of that code you have there. You gotta paste the following in the part where you trigger the client event. Use your common sense to know if there's
  10. Since compiling is only the action of transcripting a file to make it understandable in computer language (or, in this case, to simply avoid to see the source code, because it's a scripting language), there are de-compilers in the internet, built to do exactly the opposite process in order to get the source code out of a compiled file. However, there are methods to avoid that. That page you passed has two for the MTA Lua scripting language, the second one only possible to be used in 1.3.4 or later releases of the MTA client (the mod). To put it simple: if you have downloaded the latest one re
  11. I don't understand your question. Where did you take those concepts from (e.g. maybe a forum topic, post which)? And what is, precisely, what you ask for?
  12. That error occurs when you try to insert values into non-declared tables. To fix it, either change the name of your button to something without the brackets [ ], or add this line before it: guestb = { } This is declaring a table. You can read more about tables and related at the Lua wiki. If you're familiar with arrays, it's similar but easier to use.
  13. Here, an user-friendly description. getTickCount returns a given time in miliseconds that you should use, but you gotta read the documentation for it in order to acknowledge how to use it. Sam1er gave you a whole example, you can use it to experiment and check how it works.
  14. You can use custom Element Data for this. It's kinda messy, but instead of letting everything (resources, chat) display the players' names, you must make them display said element data instead. There's also a better alternative, since element data uses a good amount of bandwidth. It's just a bit harder to manipulate from both server and client side.
  15. This might be the problem: you must declare handler functions before the event handlers they will be used for. guestb["guests"] = guiCreateButton(140, 178, 70, 30, "Guest", false, loginWindow["mainWindow"]) function guest32(button,state) if button == "left" and state == "up" then --Maybe you should use state == "down" instead guiSetInputEnabled( false ) guiSetVisible(loginWindow["mainWindow"], false) showCursor(false) end end addEventHandler("onClientGUIClick", guestb["guests"], guest32, false) As a note, when you test your
  • Create New...