Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. No one's gonna go through the whole code looking for the reason it doesn't work. Tell us what's not working, and post any errors output.
  2. The order of the arguments in fetchRemote is wrong. The correct syntax: bool fetchRemote ( string URL[, int connectionAttempts = 10 ], callback callbackFunction, [ string postData = "", bool postIsBinary = false, [ arguments... ] ] ) The way you used it made it so, the postData equals attempts, postIsBinary gets true, and source is considered an argument.
  3. JR10

    2 unsolved problems

    Why are you posting this topic then? Locked.
  4. Yeah, a slight one. We don't help with leaked scripts, and you come asking for someone to make you a clone? Locked.
  5. JR10

    [Help]setTimer

    Why don't you just use onClientRender with getTickCount?
  6. JR10

    Custom Titles

    I doubt that this script is yours. If indeed it is yours and you can't fix it then at least you would have given us more info about what's wrong with it. Locked.
  7. Posting a long script with absolutely nothing about what's wrong will not get you help.
  8. I don't understand. What I posted should solve your problem.
  9. I don't think it's possible by default. You'll have to edit the scoreboard for that.
  10. if (exp + toad > 100) then exp = 100 end
  11. Element data are session based, when the player leaves the server it's reset. You need setAccountData to actually save the data. On login you load the data using getAccountData, then you set it as element data for the player. On quit/logout you save it with setAccountData.
  12. Well, for your problem, my code would just do for you.
  13. JR10

    Player blips

    The code is illogical. You're creating a blip for each player instead of only creating one for the player that used his weapon. The timer is also not needed. local blip = {} addEventHandler('onWeaponFire', root, function() if (not isElement(source) or isPedDead(source)) then return end local r, g, b = getPlayerNametagColor(source) if (isElement(blip[source])) then setBlipColor(blip[source], r, g, b) else blip[source] = createBlipAttachedTo(source, 0, 2, r, g, b) end end)
  14. Why are you declaring another function inside the coroutine function? And why do you need 2 coroutines? Something like this should do: local co = coroutine.create(function() dbQuery(callback, database, 'SELECT * FROM `table`') local results = coroutine.yield() -- Pause execution until coroutine.resume is called -- use results end) coroutine.resume(co) -- Start running the coroutine function for the first time function callback(qh) local results = dbPoll(qh, 0) coroutine.resume(co, results) end
  15. You want to color the rank in the scoreboard??
  16. It obviously depends on how you want to output it, if it's chat then yes you can do it server-side.
  17. If you're drawing this client-side, you can check for the group and set the color based on it. local r, g, b if (rank == 'Admin') then r, g, b = 255, 0, 0 elseif (rank == 'Player') then r, g, b = 0, 255, 0 end
  18. It's messed up. Why are you triggering the event from the server in the first place. (sorry for not pointing this out in the first reply) You can just use setElementData server-side and getElementData client-side. While this is not the best approach, performance wise, it still the easiest one.
  19. You can use the admin panel to get which country the player is from. You can also use something like geoip with callRemote. You make a command and strict it to players from that country. And you can send the message by looping through all the players and checking which are from the same country.
  20. @Noki Because the data can be not ready yet to be returned. And using -1 instead of 0 will freeze everything until it is returned.
  21. We don't help with leaked scripts.
  22. No it's not. triggerServerEvent('onZombieGetsKilled', root, currentexp) You can also use setElementData.
×
×
  • Create New...