pa3ck

Members
  • Content count

    1,126
  • Joined

  • Last visited

  • Days Won

    7

pa3ck last won the day on July 10 2017

pa3ck had the most liked content!

Community Reputation

202 Celebrity

About pa3ck

  • Rank
    Banger
  • Birthday 01/01/2017

Details

  • Occupation
    Software Developer

Recent Profile Visitors

2,225 profile views
  1. Inventory, item placing help

    If you post your code and tell us which part you're stuck on, somebody might be able to help you..
  2. setElementData

    setElementData is meant to be temporary, so if a player rejoins, their elementData is cleared, if you restart the server all elementData is cleared, so yes, it is normal.
  3. [Help]teampanel

    Where do you set that setElementData?
  4. [Help]teampanel

    It's not clear what you're trying to do and what your problem is. So you want the leader to be able to add / kick players, but you don't know who the leader is? What is wrong with your code? Any errors? Which "if" statement does the execution fail at?
  5. Smooth moving health bar

    It's some sort of a pseudo code, but it should give you an idea.. As @Shayf said, setTimer doesn't really go well with animations, it will be slow and clunky. local inRenderHealth = 0 local renderStart = getTickCount() function drawHealth() local playerHealth = Math.ceil ( getElementHealth ( localPlayer ) ) if(inRenderHealth ~= playerHealth ) renderStart = getTickCount() end local now = getTickCount() local endTime = renderStart + 500 local elapsedTime = now - renderStart local duration = endTime - renderStart local progress = elapsedTime / duration local inRenderHealth, _, _ = interpolateBetween ( inRenderHealth, 0, 0, playerHealth, 0, 0, progress, "Linear") dxDrawRectangle ( 0, 0, inRenderHealth * 4, 20 ) end
  6. Serverside variable

    Oh, I see, what do you have so far? Post your full code
  7. Serverside variable

    I don't understand at least one thing here. What are you trying to achieve? client-server-client-server-client, that is not communication between server and client, that's a whole conversation..
  8. I never used getAccountsBySerial myself, but the wiki says it returns a table of accounts, so I assume you get back something like this: { Account1, Account2, Account3} So, what if you try: accounts = oldAccounts[i] -- INSTEAD OF accounts = oldAccounts[i][1]
  9. The way I would do this, instead of having 2 states (opened/closed), I would have 3 states, opened/closed/moving. When I hit the marker and it's in the moving state, don't do anything, if it's in the open state you close it etc..
  10. Közlekedési lámpa script

    Szia, alapból kellene működniük, nem kell rá script. Szerintem valamelyik scripted okozza a problémát, ha nem működnek.
  11. [ADVICE] Is this bad or it's ok?

    Or you can use onClientResourceStart client side, so you can skip on a triggerClientEvent.
  12. [ADVICE] Is this bad or it's ok?

    Okay, so if I understand correctly, when a player logs in you can add an elementData from their accountData to save their paintjob. When somebody joins you can loop through all players and load the paintjobs client side based on their elementData which you have saved when they logged in. Use the event onPlayerLogout to remove elementData and trigger to every client to remove the paintjob. I guess that kinda does the same thing?
  13. [ADVICE] Is this bad or it's ok?

    In some scenarios you have no option but to use something like that. Although I see you're using elementData to check whether you'd need to load or unload the paintsjob. Element data somehow needs to be added / removed, right? When you add the elementData, why can't you just use the triggerClient/ServerEvent w/e side it is in and then load/unload?
  14. Script not working

    setPedArmor is server side only, you can't use it client side.
  15. Ask ID

    local targetPlayer, tinta = exports.global:findPlayerByPartialNick(thePlayer, targerPlayer) ---> local targetPlayer, tinta = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer) targerPlayer --> targetPlayer, just a small typo in your code.