nein überhaupt nicht ich hier mal mein gui und alle funktionen dazu
client:
Lua
local NewsBlip = createBlip ( -2054.5, 489.10000610352, 35.200000762939, 58, 2 )
local lp = getLocalPlayer()
----------------------------News Point Info Window-----------------------------------------------------------
NewsPointInfoWindow = guiCreateWindow(348, 160, 570, 723, "Willkomen an der Liberty Tree Redaktion", false)
guiWindowSetSizable(NewsPointInfoWindow, false)
guiSetAlpha(NewsPointInfoWindow, 0.79)
NewsaufgabeButton = guiCreateButton(100, 62, 381, 89, "News aufgeben", false, NewsPointInfoWindow)
guiSetFont(NewsaufgabeButton, "sa-header")
ZeitungsButton = guiCreateButton(100, 161, 381, 89, "Zeitung kaufen", false, NewsPointInfoWindow)
guiSetFont(ZeitungsButton, "sa-header")
AuktionsButton = guiCreateButton(100, 260, 381, 89, "Auktionshaus", false, NewsPointInfoWindow)
guiSetFont(auktionsButton, "sa-header")
WerbungsButton1 = guiCreateButton(100, 359, 381, 89, "Werbung aufgeben", false, NewsPointInfoWindow)
guiSetFont(WerbungsButton1, "sa-header")
WerbungsButton2 = guiCreateButton(100, 458, 381, 89, "Werbetafeln", false, NewsPointInfoWindow)
guiSetFont(WerbungsButton2, "sa-header")
LottoButton = guiCreateButton(100, 557, 381, 89, "Lotto", false, NewsPointInfoWindow)
guiSetFont(LottoButton, "sa-header")
Canclebutton1 = guiCreateButton(536, 27, 24, 25, "X", false, NewsPointInfoWindow)
guiSetFont(Canclebutton1, "default-bold-small")
-------------------------------Fenster nicht sichbar--------------------------------------------------------------
guiSetVisible(NewsPointInfoWindow, false)
----------------------------News Point Info Window-----------------------------------------------------------
function openNewspointWindow_func ()
guiSetVisible(NewsPointInfoWindow, true)
showCursor(true)
end
addEventHandler ( "onClientMarkerHit", Newsmarker, openNewspointWindow_func )
function cancelNewspointWindow_func (button)
if button == "left" then
guiSetVisible(NewsPointInfoWindow, false)
showCursor(false)
setElementData(lp, "ElementClicked", false)
end
end
addEventHandler("onClientGUIClick", Canclebutton1, cancelNewspointWindow_func, false)
Alles anzeigen
Server:
Lua
local Newsped = createPed ( 9, -2054.5, 489.10000610352, 35.200000762939, 264.002746 )
setElementData(NewsPed,"newPed",true)
function click(_,_,clickedElement)
if isCursorShowing(source) then
if getElementData(clickedElement,"newPed") then
triggerClientEvent("openNewspoint",source,source)
end
end
end
addEventHandler("onPlayerClick",getRootElement(),click)
Alles anzeigen