Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

LonelyRoad's Achievements


Sucka (13/54)



  1. Solved this myself, I had the "Full Screen Minimize" option enabled. Seems a bit of a strange clash, though...
  2. So before I reinstalled my PC I had window borderless enabled as I have two monitors, and it used to cause various graphics issues if I Alt+Tabbed. However since reinstalling my PC, and as a result GTA and MTASA - I cannot seem to get borderless windowed mode to work. I've tried both the options on 'Fullscreen mode' in the Advanced tab, but even after restarting the client the game still completely minimizes when I Alt+Tab, which isn't what I want. Any help, please?
  3. It appears it is poor handling of NULL on part of the mysql module (not the native mysql functions). I added a type() check for string, and it works fine. Mods, Please lock/delete.
  4. If the value of a key in a table is empty (in context, its a table being returned from a MySQL query) should it be a userdata value? Basically what I have is this: if (characterData["faction_perks"]) then local factionPerks = fromJSON(characterData["faction_perks"]) else local factionPerks = { } It never triggers the else, instead returns characterData["faction_perks"] as userdata: 01E10138, and hence returns the following error: Bad argument @ 'fromJSON' [Expected string at argument 1] I have also just tried using this: local factionPerks = fromJSON(characterData["faction_perks"]) or { } The default value of faction_perks in the MySQL table is NULL.
  5. Can you clarify your question? Tell us what you're trying to do or give an example...
  6. Callum: Please see italics text for edit in my previous post.
  7. Calling SQL connect could be done onResourceStart (addEventHandler) right? Since you mention it, query and exec are the only two I am currently making use of, would you mind if I slightly modified your 'wrapper' and used it in my game mode? How should args be given to your functions?
  8. So I have been out of the MTA scene for a while, but now I am back and looking to continue with work on my own gamemode. More to the point, the last time I did work on said gamemode the module was the only method of working with a MySQL database. Now, evidently, it is possible to use the native SQL functions instead, and I assume for many reasons it would be a good idea to convert my gamemode to using them instead. Anyway, more on to the point of my post... How can I actually change my scripts now, everything I've done was using functions from the module with a 'wrapper' resource to provide ability to do queries etc. Is there any updated wrapper that provides the same functionality but with the native SQL functions? (See old wrapper here)
  9. I thought about doing that, but if possible I wanted to avoid the step of logging in or having to spend time understanding what's available in phpMyAdmin. I wanted a lighter user method.
  10. So I have plans to start what I want to call the OpenDev project, which will basically be an open source active development of a gamemode that will aim to be fairly 'generic' but still kind of specialize in RPG characteristics. Now that you have the background, what I actually want to know is two things: 1) Is there interest in such a project, it will probably work out of github (unless I find a better alternative) and will have a primary server, it will be overseen and monitored by myself but anyone can pull, fork or commit after I approve such actions. 2) For the nerds... Does anyone know of an application that gives people a method of seeing the design and content of a MySQL Database, kind of like a spreadsheet in a web browser. The idea being is people can see what is being stored, but not directly edit it.
  11. Well the method I am looking to rebuild and implement now is basically a 2 step process: 1) You type your username and password, and select remember me. 2) Your password is encrypted against your MTA Serial (see link) - with some random mambo-jambo stirred into the mix, and stored locally on your machine in a .xml file. Then whenever you connect, I can verify your .xml file and allow you to proceed with login. EDIT: I should probably point out that contrary to what myonlake said, all of this was going to happen on the client. Probably without the mambo jambo... I am trying to adapt my login system to cater for this system now, and its proving to be a lot more code than I initially expected, but I am wondering if there is any different/easier/better implementations I could potentially use?
  12. Setting alpha I think is a bad way to do it, because the client still has to 'think about' the dx drawings being there, then superimpose the alpha. It's better to just remove the event handler, as TAPL said.
  13. The example of this is on the createPed page itself. You will need to use the following code - CLIENT SIDE: function cancelPedDamage() cancelEvent() -- Cancels the onClientPedDamage event end addEventHandler("onClientPedDamage", AdrianaLima, cancelPedDamage)
  14. LonelyRoad

    20 lines

    We cannot do a great deal to help without knowing what is broken, however a couple of things I notice are as follows: You're using a useful function without including its code, see wiki page for getPlayerFromNamePart - you need to include the function's code before it will work. You're using the command args in reverse, and are possibly conflicting with a globally defined internal for all functions 'source'. You should use (source, command, targetPlayer) - and hence everything that is source should be targetPlayer, or if you so wish 'mutedPlayer'. You're explicitly defining (a check for) another possible return value with 'elseif' - when there are only two possible states for this script in its current format. What I mean is why have an 'elseif' if they can only be muted or not muted - in which case you can always apply the opposite. Btw, your script is very bloated in this case, as you can just use 'not currentstate' to apply the opposite to whatever they already have. * *: All need is something like this pseudo-code - DO NOT JUST COPY AND PASTE WHAT IS BELOW AND EXPECT IT TO WORK OR YOU WILL BE SHOT: function mmuteply(src, cmd, tgt) if isElement(tgt) then local target = getPlayerFromNamePart(tgt) if (hasPermission(src, muteplayer), true) then local mutestate = getElementData(target, "mutestate") or false local newstate = not mutestate setElementData(target, "mutestate", newstate) end end addCommandHandler("mmute", mmuteply) Also, you could add a outputChatBox that will adapt itself to the mute state to tell the player whether they are muted or not, but due to the time of night and me writing without a great deal of thought - I cannot remember how to do this. Someone else may help though.
  15. I would be inclined to agree with ^ What does sValue return if you outputChatBox or outputDebugString? I'd hazard a guess that your if statement on line 6 is not doing the correct comparison.
  • Create New...