-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
https://wiki.multitheftauto.com/wiki/Resource:Editor/EDF
-
That's because you didn't use showCursor(false) here: addEventHandler("onClientGUIClick", guiFgOkButton, function() guiSetVisible(guiFgWelcomeWindow,false) showCursor(false) end, false)
-
And you can use /crun to run a client side code.
-
No because ACL functions are server side only.
-
Why you even want to stop the resource, why not make a function that will start the game all over, start the Count down.
-
Lol, if he said no, then don't do it. Because anyway you will get into troubles, doing something he doesn't want.
-
, running? you must use the function.
-
I don't understand any thing.
-
Hex To RGB : getColorFromString ? RGB To Hex: function RGB2HEX(r,g,b) return string.format("#%02X%02X%02X", r,g,b) end
-
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.
-
if info == "Destruction derby" then where is it defined?
-
Wrong section, you should have posted this in resources section.
-
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.
-
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.
-
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.
-
It's for administrators only, isn't it? EDIT: nvm, i 've done it.
-
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.
-
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)
-
Could you tell me what about it, i mean don't just come saying add firefighter tell me what will firefighters do.