Jump to content

Spajk

Members
  • Posts

    285
  • Joined

  • Last visited

Everything posted by Spajk

  1. Hmm, anyone got an idea of how did they make this edit box?
  2. You should then try with helmet[thePlayer] instead of helmet[lp] EDIT: Try this: helmet = {} --lp = getElementType(thePlayer) if getElementData(thePlayer, 'helmetOn') ~= 1 then setElementData(thePlayer, 'helmetOn', 1) local x, y, z = getElementPosition(thePlayer) helmet[thePlayer] = createObject(2053, x, y, z) setObjectScale(helmet[thePlayer], 2.4) exports.bone_attach:attachElementToBone(helmet[thePlayer],thePlayer,1,0,0.03,0.1,0,0,180) else setElementData(thePlayer, 'helmetOn', 0) destroyElement(helmet[thePlayer]) helmet[thePlayer] = nil end
  3. I dont know if this will help you, but after "destroyElement(helmet[lp])" do "helmet[lp] = nil", also from this part of code, I cant see who is "lp" and who is "thePlayer"
  4. Spajk

    Edit boxes

    Most likely CSS for http. If there was a dx code reading css people would know about it.
  5. Spajk

    Edit boxes

    Not as far as I know
  6. Spajk

    Question

    oh, thats possible by using client-side "fetchRemote"
  7. If you found a solution, please post it
  8. Spajk

    Question

    Not as far as I know, it would be cool if we had some functions to compress and decompress zip, rar and 7z.
  9. Spajk

    string format

    Hello, I am bumping this topic as I found a really nice and efficient way of allowing only numbers in edit fields ( or anything else you want ). guiSetProperty(editBox, "ValidationString", "^[0-9]*$") This is just an example, it uses regex and can be used for any kind of input filtering.
  10. This should do the trick: function getUnoccupiedSeats(vehicle) local seats = {} local maxp = getVehicleMaxPassengers(vehicle) for i = 0, maxp-1 do if(not getVehicleOccupant(vehicle, i))then table.insert(seats, i) end end if(#seats > 0)then return seats else return false end end
  11. Spajk

    execute

    also what TAPL said
  12. Spajk

    Dx button

    The easiest way is to create a blank gui label over the rectangle and then use onClientGUIClick.
  13. Spajk

    Tables.

    Nope The output for 2 players online should only be: 1 2
  14. Spajk

    Tables.

    Because of the "for" loop. The first time it goes thru the loop, it adds 1 name to the playerT table and total number of variables in that table is 1. The 2nd time it goes thru the loop it adds one more name to the table and total number of variables in that table is 2. Another thing, dxDrawText and dxDrawLine return true/false, so there's no really a reason to put their returns into globab variables.
  15. Spajk

    Bad args

    But, wont it make errors if player quits. ( Logout is triggered, but if you delay it for 2 seconds, it would be too late, as the player element will be destroyed, right? )
  16. sorry, but why you need it less then 50 ms when you want to do it every 1.5 secs ?
  17. Spajk

    Bad args

    You should do this without the timer, or if you cant do it like that, then you should collect all the data about the player before the timer and pass them to the timer function. BTW, you are doing the UPDATE statement, is there some data already in the table with the account or not?
  18. Spajk

    god mode

    You cannot use it like that. local plrGodadmin = false It will work good as long as one player is on the server, but if there are more players it wont work correctly. 2nd, you dont have plrGodadmin defined client-side.
  19. Spajk

    Bad args

    On the end of the timer add ", source" so it goes like: " end, 2000, 1, source)" to pass the source to the timer function. But, there might be another problem. The logout event is mostly triggerd when player quits, right? If you delay that for a few seconds, I think that the player element will already be destroyed and it would probably say something like "bad pointer".
  20. Spajk

    Bad args

    The only problem that it could be is that "connection" is bad.
  21. Spajk

    play with me :)

    The title is a bit disturbing.
  22. Spajk

    Hiding GUI's

    Whats better, guiSetVisible or destroying and recreating?
  23. I'd say it's impossible. First, you need a way to detect when player is about to die and then start recording. Both of them are hard ( if not impossible ).
  24. Is there a way to make a synchronous call to a HTTP server? Both callRemote and fetchRemote are asynchronous.
×
×
  • Create New...