Tomaat Posted November 10, 2012 Posted November 10, 2012 Hey everyone, this part of my script wont work, and the gui wont show anymore... -- LEAVE HOUSE -- addEventHandler("onClientGUIClick", Knopf2[5], function() Guivar3 = 0 showCursor(false) destroyElement(Fenster2[1]) executeCommandHandler("out", playerSource) end, false) Whats wrong ? Regards, Tomaat
Renkon Posted November 10, 2012 Posted November 10, 2012 I am not sure but, doesn't executeCommandHandler require to have the resource as Admin in ACL?
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 I am not sure but, doesn't executeCommandHandler require to have the resource as Admin in ACL? Yes, the other command which was standard in the script was working, but indeed it said it wanted ACL rights, i know how to do that But this one doesnt give any error or debugscript 3 log stuff, the other /in button does what did i do wrong ? the gui after wont appear, although the /in command it will appear if you want to let it appear, this one doesnt //edit executeCommandHandler("out") i will try that
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 executeCommandHandler("out") Nope, wont work
Castillo Posted November 10, 2012 Posted November 10, 2012 I don't really understand what is your problem.
TAPL Posted November 10, 2012 Posted November 10, 2012 destroyElement(Fenster2[1]) i guess you are destroying the gui and when you want show it again you using guiSetVisible? You should note that after destroying the gui, it does not exist anymore that why it won't show anymore.
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 I don't really understand what is your problem. Theres a command to leave the house, /out, i want a button to execute that command, and it wont work, i used mta wiki to make the executer destroyElement(Fenster2[1]) i guess you are destroying the gui and when you want show it again you using guiSetVisible? You should note that after destroying the gui, it does not exist anymore that why it won't show anymore. An other command in the gui does use this exact method it also destroys it, then i go in the house, when i do /out and press F2 again, it will reappear
Castillo Posted November 10, 2012 Posted November 10, 2012 The 'out' command is server side, right? I just made a fast test, and you can't execute server side commands client side.
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 The 'out' command is server side, right? I just made a fast test, and you can't execute server side commands client side. i have tryed executeserverside stuff, but i could manage to get it working
Castillo Posted November 10, 2012 Posted November 10, 2012 What you can do is: trigger a server event, then execute the command in the server side.
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 What you can do is: trigger a server event, then execute the command in the server side. yes i tryed to make it, i did the exect same sentence, but then it said cant find the serverside of it ;S
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 What you can do is: trigger a server event, then execute the command in the server side. Server:: addEventHandler("onHouseSystemInfoLeave", getRootElement(), function(id) if(houseData[id]) then executeCommandHandler("out", source) end end) Client:: -- LEAVE HOUSE -- addEventHandler("onClientGUIClick", Knopf2[5], function() Guivar3 = 0 showCursor(false) destroyElement(Fenster2[1]) triggerServerEvent("onHouseSystemInfoLeave", gMe, id) end, false) Client triggered serverside event onHouseSystemInfoLeave but event is not added serverside
Baseplate Posted November 10, 2012 Posted November 10, 2012 Server: addEvent("onHouseSystemInfoLeave", true) addEventHandler("onHouseSystemInfoLeave", getRootElement(), function(id) if(houseData[id]) then executeCommandHandler("out", source) end end) Client: -- LEAVE HOUSE -- addEventHandler("onClientGUIClick", Knopf2[5], function() Guivar3 = 0 showCursor(false) destroyElement(Fenster2[1]) triggerServerEvent("onHouseSystemInfoLeave", gMe, id) end, false)
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 Server: addEvent("onHouseSystemInfoLeave", true) addEventHandler("onHouseSystemInfoLeave", getRootElement(), function(id) if(houseData[id]) then executeCommandHandler("out", source) end end) Client: -- LEAVE HOUSE -- addEventHandler("onClientGUIClick", Knopf2[5], function() Guivar3 = 0 showCursor(false) destroyElement(Fenster2[1]) triggerServerEvent("onHouseSystemInfoLeave", gMe, id) end, false) Thanks so much
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 No Problem! I also got 1 problem, i want the maps on the F11 map/minimap gone, is there a specific name for that?
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 The "maps"? what does that mean? i mean blips can the blips only be removed from the F11 or the Radar only ?
Castillo Posted November 10, 2012 Posted November 10, 2012 Blips can be removed with destroyElement, but they can't be removed just from radar or F11 map.
Tomaat Posted November 10, 2012 Author Posted November 10, 2012 Blips can be removed with destroyElement, but they can't be removed just from radar or F11 map. hmm okay, im still trying to find a way to reduce the FPS decreasement, i already deleted the Blip stuff, but it didnt change anything of the FPS, i dont know why the fps decreases
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now