Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. Apart from that, I would suggest you to use tables instead of querying the database each time you need the data. Also, you shouldn't be using source from client-side, read more about event faking here: triggerServerEvent
  2. local rank = tonumber(returnRank) returnRank is not defined, should be just 'rank', the same goes for returnName.
  3. viewtopic.php?f=108&t=54447 Take this somewhere else. Locked.
  4. Take a look at the screenshots for the new user interface.
  5. A new version is released Version 1.3.0 Fully rewritten in OOP New directx user interface with the dxGUI library Can now use MySQL or SQLite Several bug fixes The resource needs some performance optimizations, unfortunately, this is all I had time for. I will be working on this in the future, perhaps adding interactive businesses.
  6. Yes this should work. If you're only expecting one row, you can append 'LIMIT 1' to the query string, this can significantly improve performance as it will halt when it has found one row.
  7. Depends on the variable that is assigned to the retval of dbPoll. local result = dbPoll(queryHandle, 0) local rank = result[1].rank -- Rank of the first row local rank = result[2].rank -- Rank of the second row rank = tonumber(rank) triggerClientEvent(target, "event", target, rank)
  8. JR10

    I need help

    You have multiple else's in the same if statement. You can only have one else in an if statement, and it has to be the last one.
  9. In order to make such functions you would need the data to be available as soon as you call the function, which is not the case here.
  10. Console doesn't have a password. The Console account is only assigned to the console so you can restrict its access if you want to. Runcode is restricted to admins only by default.
  11. It's not that simple. If I recall correctly, there was some work on it but it was halted.
  12. You need SQLite version 3.8.2 or later in order to use 'WITHOUT ROWID'. The latest version of SQLite included with MTA 1.4.1 is "3.7.17".
  13. The thing is, callbacks are not called immediately, which means that the rest of the code will have been executed by the time the callback is called. Why would you want this? You can just do whatever you want to do with the data inside the callback.
  14. Your function's name is Ped but you're passing makPed which is undefined. Rename your function to makPed.
  15. JR10

    I need help

    Stop asking like that. You need to tell us the errors or what happens so we can help you. You can change a button's normal and hover text color using guiSetProperty. getZoneName
  16. You need to use triggerEvent wherever the code for "using helmet" lies. Also change player to root in addEventHandler, player is not defined.
  17. JR10

    Oop?

    Despite the obvious limitaions, OOP improves code organization and reusability. If you've used OOP in a 'progamming' language and coded a relatively large app, it would make sense.
  18. JR10

    Enable/Disable

    Why not make the mods download optional? Players can specify what they want to download.
  19. JR10

    Map download

    They're not locally cached.
  20. JR10

    |Help| GUI

    You check if there is a player with the name, but you never assign the player to the 'theTarget' variable. addEvent("onPlayerIsMute", true) function mutePlayer(theTarget, muteTime) theTarget = getPlayerFromName(theTarget) if (isElement(target)) then if theTarget ~= nil and isObjectInACLGroup("user."..getAccountName(getPlayerAccount(client)), aclGetGroup("MOD")) then if tonumber(muteTime) > 0 and tonumber(muteTime) < 121 then setPlayerMuted(theTarget, true) end end end end addEventHandler("onPlayerIsMute", root, mutePlayer)
  21. JR10

    use all weapons

    This is for saving weapons and loading them again.
  22. Are you sure that the host is correct? The host has to match the user's host on the server.
  23. You can't use UNSIGNED with a VARCHAR, you can use INTEGER instead.
×
×
  • Create New...