Search the Community
Showing results for tags 'addevent'.
-
I'm trying to make simple job. When player hit the marker this error pops up in debuscript 3. I'm just learning Lua and I don't know how to fix this error. Error: Server triggered clientside event, createGui, but event is not added clientside meta.xml <meta> <script src="server.Lua" type="server" /> <script src="client.Lua" type="client" /> </meta> client.Lua local gui = {} okno = guiCreateWindow(0.35, 0.26, 0.16, 0.45, "Praca GAZECIARZ", true) guiWindowSetSizable(okno, false) guiSetVisible(okno, false) button = guiCreateButton(0.16, 0.56, 0.73, 0.39, "", true, okno) addEvent("createGui", true) function openGui() outputChatBox("Test2") guiSetVisible(okno, false) end addEventHandler("createGui", resourceRoot, openGui) server.Lua function createSomeMarker() createMarker(-2442, 754, 34, "cylinder", 2) end addEventHandler("onResourceStart", root, createSomeMarker) function markerCollision (markerHit, matchingDimension) if matchingDimension then outputChatBox("Test1") triggerClientEvent("createGui", resourceRoot) end end addEventHandler("onPlayerMarkerHit", root, markerCollision) Thanks for the help!
-
Hello, I need help with interfacing from client to server and vice versa. Kindly someone explain it with an example. I read the example but I didn't get.
- 1 reply
-
- addevent
- clientandserver
-
(and 1 more)
Tagged with: