Serverseitig:
Lua
function Spawn(player)
spawnPlayer(player, -1980.4000244141, 138.10000610352, 27.700000762939, 90.0041198, math.random(1, 300))
fadeCamera(player, true)
setCameraTarget(player, source)
outputChatBox("Willkommen auf dem Zombiegamemode", player, 255, 0, 0)
end
addEvent("SpawnPlayer", true)
addEventHandler("SpawnPlayer", getRootElement(), Spawn)
function showGU()
triggerClientEvent(getRootElement(), "onShowGUI", getRootElement())
triggerClientEvent(getRootElement(), "onDxJoin", getRootElement())
end
addEventHandler("onResourceStart", getRootElement(), showGU)
Alles anzeigen
Clientseitig:
Lua
GUIEditor = {
button = {}
}
showCursor(true)
function GUIEvent()
GUIEditor.button[1] = guiCreateButton(512, 492, 227, 69, "", false)
guiSetAlpha(GUIEditor.button[1], 0.00)
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
triggerServerEvent("SpawnPlayer", getLocalPlayer())
GUIEditor.button[2] = guiCreateButton(993, 493, 275, 68, "", false)
guiSetAlpha(GUIEditor.button[2], 0.00)
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
end
addEvent("onShowGUI", true)
addEventHandler("onShowGUI", getLocalPlayer(), GUIEvent)
function dxdraw()
dxDrawImage(0, 0, 1680, 1050, "back.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText("Zombie", 514, 494, 740, 562, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Zombie", 514, 492, 740, 560, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Zombie", 512, 494, 738, 562, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Zombie", 512, 492, 738, 560, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Zombie", 513, 493, 739, 561, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Reallife", 994, 494, 1269, 562, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Reallife", 994, 492, 1269, 560, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Reallife", 992, 494, 1267, 562, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Reallife", 992, 492, 1267, 560, tocolor(0, 0, 0, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
dxDrawText("Reallife", 993, 493, 1268, 561, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false)
end
function Joindraw()
addEventHandler("onClientRender", getLocalPlayer(), dxdraw)
end
addEvent("onDxJoin", true)
addEventHandler("onDxJoin", getLocalPlayer(), Joindraw)
Alles anzeigen
Jetzt steht beim Starten der Resource im Debugscript 3: Server triggered Clientside Event "ondxJoin" but the Event is not added clientside. Bitte um Hilfe