Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. https://wiki.multitheftauto.com/wiki/Resource:Editor/EDF
  2. JR10

    GUI Welcome Screen

    That's because you didn't use showCursor(false) here: addEventHandler("onClientGUIClick", guiFgOkButton, function() guiSetVisible(guiFgWelcomeWindow,false) showCursor(false) end, false)
  3. And you can use /crun to run a client side code.
  4. JR10

    Redirect

    No because ACL functions are server side only.
  5. Why you even want to stop the resource, why not make a function that will start the game all over, start the Count down.
  6. JR10

    Redirect

    Lol, if he said no, then don't do it. Because anyway you will get into troubles, doing something he doesn't want.
  7. , running? you must use the function.
  8. JR10

    Redirect

    My bad, i didn't read carefully.
  9. I don't understand any thing.
  10. JR10

    Help ACL

    No problem.
  11. Hex To RGB : getColorFromString ? RGB To Hex: function RGB2HEX(r,g,b) return string.format("#%02X%02X%02X", r,g,b) end
  12. JR10

    Redirect

    Lol, yes, but why not add it manually? put this any where in your code addEventHandler("onResourceStart", resourceRoot, function() aclGroupAddObject(aclGetGroup("Admin"), "resource."..getResourceName(getThisResource())) aclSave() end) Not tested but should work.
  13. JR10

    Help ACL

    There is functions for it aclGroupAddObject aclGroupRemoveObject aclSave
  14. if info == "Destruction derby" then where is it defined?
  15. Wrong section, you should have posted this in resources section.
  16. No problem. What i mean, that it's wrong to do this: function(source) because source is always defined and you can't put it in function.
  17. 1. Your example is wrong because source will be already defined, so you can't put it in the function() 2. No, because /getc player he wants to check for another player using your example he will check for himself.
  18. Triggering getLocalPlayer() twice: triggerServerEvent("getPlayerCredits", getLocalPlayer(), getLocalPlayer()) -- in this way server side should be something like addEvent("getPlayerCredits", true) addEventHandler("getPlayerCredits", root, function(player) --here player == source because getLocalPlayer() is triggered twice And let's say: --client side function getPlayerCredits(cmd, who) local player = getPlayerFromName(who) if not player then outputChatBox("Player not found.",255,0,0) return end triggerServerEvent("getPlayerCredits",getLocalPlayer(),player) end addCommandHandler("getc",getPlayerCredits) --server side addEvent("getPlayerCredits",true) addEventHandler("getPlayerCredits",root, function (player) outputChatBox(getPlayerName(player) .." has 50000 credits.",root,0,255,0) end) Here player ~= source because in triggerServerEvent addCommandHandler("getc", function() triggerServerEvent("getPlayerCredits", getLocalPlayer() --[[ the source server side]], --[[ more possible params like:]] getPlayerFromName("DarkLink")) end Server side you will have addEvent("getPlayerCredits", true) addEventHandler("getPlayerCredits", root, function(DarkLink) outputChatBox("DarkLink has 50000 credits.",root,0,255,0) end) Server side: "source" and that's the player who typed the /getc it's the getLocalPlayer() in triggerServerEvent "DarkLink" and that's the getPlayerFromName in triggerServerEvent. I'm not good in explaining either, but i thought this might help.
  19. JR10

    How to use..

    It's for administrators only, isn't it? EDIT: nvm, i 've done it.
  20. You didn't add the event and handle it. triggerClientEvent uses event not function. example: --client side addEvent("showLoginWindow", true) addEventHandler("showLoginWindow", root, function() showLoginWindow() end) You CAN'T use triggerClientEvent or triggerServerEvent to trigger a function you must add the function to the event. And it's addEventHandler not AddEventHandler.
  21. You didn't use those functions function showLoginWindow() createLoginWindow() if loginWindow then guiSetVisible(loginWindow, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox("A bejelentkező panel jelenleg nem üzemel") end end function showRegistWindow() createRegistWindow() if registWindow then guiSetVisible(registWindow, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox("A regisztrációs panel jelenleg nem üzemel") end end So it won't show up use it like this addEventHandler("onClientResourceStart", resourceRoot, function() showLoginWindow() end)
  22. JR10

    Login GUI

    Stop off-topic.
  23. Could you tell me what about it, i mean don't just come saying add firefighter tell me what will firefighters do.
×
×
  • Create New...