Cze??, za?apa?em ma?y problem podczas pisania skryptu.
Zauwa?y?em, ?e podczas wy?wietlania mojego okna - jest wy?wietlane dla wszystkich graczy.
Oto kod :
-- GUI
[lua]
buswindow = guiCreateWindow(572,355,539,213,"Kierowca Autobusu",false)
businfo = guiCreateLabel(19,30,461,76,"Tutaj by? tekst ",false,buswindow)
bus_pksbtn = guiCreateButton(13,144,160,47,"PKS",false,buswindow)
bus_mpkbtn = guiCreateButton(361,144,164,47,"Miejska",false,buswindow)
bus_trasyinfo = guiCreateLabel(193,155,152,47,"Trasy s? wybierane losowo!",false,buswindow)
guiLabelSetColor(bus_trasyinfo,200,0,0)
[/lua]
Zastanawia?em si? nad dodaniem do guiCreateWindow argumentu visibleTo, ale nie wiem czy to by co? da?o.
A teraz trigger dla okna, po wej?ciu w marker -
[lua]
-- client
function markerHitGUI()
guiSetVisible(buswindow, true)
showCursor(true)
end
addEvent("triggerujGUIBus", true)
addEventHandler("triggerujGUIBus", getRootElement(), markerHitGUI)
[/lua]
[lua]
-- server
guiStartMarker = createMarker(1778.9837646484, -1913.16796875, 12.4, "cylinder", 4.0, 200, 0, 0)
infoBusBlip = createBlip(1778.9837646484, -1913.16796875, 12.4, 55, 2, 255, 255, 255, 255, 0, 99999.0)
function guiHandler(theVehicle)
local id = getElementModel ( theVehicle )
if id == 431 then
triggerClientEvent ( "triggerujGUIBus", getRootElement())
else
outputChatBox("tekst", getRootElement(), 255, 194,... |