Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. isPlayerStaff will either return nil (won't return anything in fact) or return false, because callServerFunction will always return nil, so the check will fail and end up returning false. If the first check fails, it will return nil.
  2. There's a resource called votemanager that comes with the server, use that.
  3. The function just calls the server function, it can't return the anything. Just use events to check serverside.
  4. Getting a random player is easy: getRandomPlayer The rest needs to be scripted.
  5. Or let the Moderators of MTA only can rate it So instead of moderating the forum, moderators would have to play servers to rate them? That's not going to work.
  6. If you remove the targetElement argument, it will automatically apply it to everyone.
  7. Not to mention, your "all resolutions" logic is not correct. EDIT: Wow...
  8. JR10

    need help

    You could try onClientVehicleCollision. Or you could try what unpredictable suggested, though, from my previous experiences, attaching a colshape is just "unpredictable" *BA DUM TSS* (had to, really..)
  9. JR10

    need help

    Are you sure you're restarting? It shouldn't output a bad argument error.
  10. JR10

    need help

    @unpredictable More like worst way. Try this client-side: addEventHandler("onClientPlayerDamage", localPlayer, function(attacker) if (isElement(attacker) and getElementType(attacker) == "vehicle") then setElementHealth(localPlayer, 0) end end)
  11. Line 15 should be: if lvl > (levelCache[accName] or 0) then
  12. That's because you're setting the timer on each render. You only need to set it once. Move both timers somewhere else.
  13. If it's a grid list then you don't need to compare the item text with anything. -1 is the selected item if no item is selected, so you just need to make sure that the selected item index is not -1. if guiGridListGetSelectedItem(playerList) ~= -1 then
  14. JR10

    need help

    killPed is server-side only.
  15. JR10

    need help

    addEventHandler("onPlayerDamage", root, function(attacker) if (getElementType(attacker) == "vehicle") then killPed(source) end end)
  16. Or you could use dxDrawImageSection.
  17. The community has a lot of examples of shaders. https://wiki.multitheftauto.com/wiki/Shader_examples
  18. He already has that at the end of the for loop.
  19. @Ryancit2 You never really used setElementData to update the scoreboard. Also, it would be better to use an event instead of using an infinite timer.
  20. What you posted before makes no sense. And he's not using DayZ.
  21. Your code only checks kills on spawn. There is no detection of when a player's kills increases. function died(ammo, killer) -- check if zombie local acc = getPlayerAccount(killer) if (isGuestAccount(acc)) then return end local zombiekills = getAccountData(acc, 'Zombie kills') zombiekills = tonumber(zombiekills) + 1 end addEventHandler("onPedWasted", root, died) --Add the Event when ped1 dies Now you just need to check for levels. I would suggest moving the kills to a table, and only set the account's data when the player quits/logs out. Also, remove the same from the account data key.
  22. Are you talking about game type (setGameType) or the gamemode itself (the resource)? Why would you want that anyway?
  23. You can use the findRotation useful function.
  24. JR10

    [Question] Script

    Did you add the exp_system resource folder to your resources directory? What does the console output when you 'refresh'?
×
×
  • Create New...