Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. JR10

    2 help needed

    Create the gui and use guiSetVisible to hide it, then use addCommandHandler with guiSetVisible to show it again, shouldn't be hard. addCommandHandler('updates', function() guiSetVisible(WINDOW, true) end) You can use guiMemoSetReadOnly to disable editing a memo: local memo = guiCreateMemo(...) guiMemoSetReadOnly(memo, false)
  2. If you're new, then this is definitely not yours. We don't offer help with leaked/stolen scripts. Locked. You can PM me if you want to protest.
  3. JR10

    [HELP] AP

    The admin panel itself works fine and doesn't spit out such errors, so you either have it edited or you messed up something.
  4. Because it doesn't work like that? You can't cross-return data. You have to trigger another event to return any data.
  5. JR10

    [HELP] AP

    aPerformanceInput is not defined. Post your client-side code.
  6. Yes, there is no problem setting it client-side, but it's useless to trigger a client event just to set the element data, when you can just do it server-side.
  7. JR10

    SQLite problems

    You mean from a function? One way to do that would be coroutines. viewtopic.php?f=91&t=86184&p=779671&hilit=coroutine#p779671 viewtopic.php?f=91&t=92076&p=828272&hilit=coroutine#p828272
  8. JR10

    SQLite problems

    You don't need to store the query handle returned from dbQuery since you're using callbacks. You don't need to use -1 as the timeout since the data will surely be ready, you can just use 0.
  9. JR10

    SQLite problems

    You can check the wiki page of any function for the syntax and a basic example. local qh = dbQuery('SELECT * FROM accounts') local results = dbPoll(qh, -1) -1 means that it will wait for the database to return the results. You can also use callbacks which is better because it doesn't freeze the server till the data is returned.
  10. JR10

    SQLite problems

    I made one some time ago: viewtopic.php?f=148&t=38203
  11. JR10

    Help-Hud

    The code I posted should solve just that. Check /debugscript 3
  12. JR10

    [HELP] AP

    You're calling getPlayerName with a boolean value. Add an if statement to make sure that the player argument is an element: _getPlayerName = getPlayerName function getPlayerName(player) if (not isElement(player) or getElementType(player) ~= 'player') then return end if get("hexRemove") == "true" then if string.find(_getPlayerName(player), "#%x%x%x%x%x%x") then return string.gsub(_getPlayerName(player), "#%x%x%x%x%x%x", "") else return _getPlayerName(player) end else return _getPlayerName(player) end end
  13. JR10

    Help-Hud

    What's the problem exactly here? The code should solve the hud showing on join. If it doesn't, post any errors or warnings in /debugscript 3
  14. JR10

    Help-Hud

    Server: addEventHandler('onPlayerLogin', root, function() triggerClientEvent(source, 'showHud', resourceRoot) end) Client: addEvent('showHud', true) addEventHandler('showHud', root, function() addEventHandler("onClientHUDRender",getRootElement(), dxtest) end) Remove line 94 from the rest of the code.
  15. JR10

    SQLite problems

    dbExec returns a boolean value, mostly true unless the connection is incorrect. dbQuery returns a query handle which can be polled using dbPoll to get the returned data. It's mostly used with SELECT.
  16. JR10

    Help-Hud

    Post your updated code.
  17. JR10

    SQLite problems

    Yes. Use /debugscript 3 to check for any errors/warnings in your scripts. You can also use /debugdb 2 to set the logging level which could help you identify database problems in the future.
  18. JR10

    SQLite problems

    You haven't specified any columns for the table. The basic syntax is this: CREATE TABLE IF NOT EXISTS accounts (column1 TEXT, column2 INTEGER) Also, don't use dbQuery when you don't need to return anything.
  19. JR10

    Help-Hud

    Did you try what I told you to?
  20. JR10

    Help-Hud

    Post your code then. I checked it from the other topic, you're adding the handler as soon as the script starts. Use onPlayerLogin server-side to trigger a client event, add the on render handler in that event.
  21. JR10

    Superman help

    This is where the key is bound and the events handlers are added. addEventHandler("onClientResourceStart", getResourceRootElement(thisResource), Superman.Start, false) So you can just remove that and trigger an event to the client.
  22. JR10

    Help-Hud

    Are we supposed to figure out what's wrong with the screenshot? It looks fine to me. Is this related to your other topic?
  23. I didn't understand a word but this should do. Server-side: function testing () setElementData(source, 'wins', (getElementData(source, 'wins') or 0) + 1) end addEventHandler ( "onPlayerFinish", root, testing )
  24. Add to the Console group or the Admin group.
  25. Use source not client, the triggerEvent line shows that the base element (source) is the player who finished the race. So, both client and kazanma is not defined. Why are you triggering a client event just to set the element data? You can do just that on the server-side.
×
×
  • Create New...