kevincouto6
-
Posts
235 -
Joined
-
Last visited
Status Updates posted by kevincouto6
-
I wanted to add a mission to windows gui that I created, but I do not know how to do it, could I do it for myself, or hollow out how?
Gui Windons Client
GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() missionwindow = guiCreateWindow(558, 242, 257, 319, "Zombie HELL PARTY RELOADED", false) guiWindowSetSizable(missionwindow, false) guiSetVisible(missionwindow, false) GUIEditor.gridlist[1] = guiCreateGridList(9, 21, 238, 253, false, missionwindow) guiGridListAddColumn(GUIEditor.gridlist[1], "Missions", 0.9) fistmiss = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(fistmiss, 0, 1, "Transportation Weapons", false, false) AcceptButton = guiCreateButton(9, 284, 76, 25, "ACCEPT", false, missionwindow) guiSetProperty(AcceptButton, "NormalTextColour", "FED6D800") ExitButton = guiCreateButton(173, 284, 74, 25, "EXIT", false, missionwindow) guiSetProperty(ExitButton, "NormalTextColour", "FE29D900") AbandonButton = guiCreateButton(91, 284, 76, 25, "ABANDON", false, missionwindow) guiSetProperty(AbandonButton, "NormalTextColour", "FEDA0000") end ) --if you want add Marker# {}, Mark = { {-2404.00000, -598.00000, 132}, } --Marker local Marker1 = createMarker(-2404.00000, -598.00000, 132, "cylinder", 1.5, 250,250,0) for k,v in ipairs (Mark) do z = v[3] -1 Marker = createMarker ( v[1], v[2], z, "cylinder", 1.5, 255, 255, 0, 255 ) addEventHandler('onClientMarkerHit', Marker, function ( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible (missionwindow, true ) showCursor( true ) end end ) end addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) local me = not guiGetVisible(missionwindow) if ( source == ExitButton ) then guiSetVisible(missionwindow,me ) showCursor( me ) end end )
Here is the mission, you can modify it to start in the windons GUI
Mission
Mfim = createMarker ( 858.41198730469, -583.17816162109, 18.150485992432 -1, "cylinder", 2, 0 ,255 ,0, 255) Bfim = createBlipAttachedTo ( Mfim, 19 ) setElementVisibleTo ( Bfim, root, false ) veh = {} function incio (source) if fistmiss (source, AcceptButton) then if veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) Trabalho = true veh[source] = createVehicle(514,290.74652099609, 2041.4344482422, 18.340299606323,0,0,270) setElementVisibleTo ( Bfim, source, true ) warpPedIntoVehicle ( source, veh[source] ) outputChatBox ("#ffff00Take this Flag Card without leaving the vehicle !",source,0,0,0,true ) end end addEventHandler( "onMarkerHit", Minicio, incio ) function fim (source) if veh[source] and isElement(veh[source]) then destroyElement (veh[source]) givePlayerMoney(source,200000) setElementVisibleTo ( Bfim, source, false ) outputChatBox("#00ff00você Ganhou $10000 Pela Entrega,Parabéns!",source,0,0,0,true) else end end addEventHandler("onMarkerHit",Mfim ,fim) function sair (source) if (veh[source]) and isElement(veh[source]) then setElementVisibleTo ( Bfim, source, false ) destroyElement (veh[source]) outputChatBox("#ff0000Você Perdeu o Trabalho Ao Sair Do Veículo", source ,0,0,0,true) else end end addEventHandler ( "onVehicleExit", getRootElement(), sair )