Jump to content

Help GrindList


kevincouto6

Recommended Posts

Hi, I've been asking GrindList for help, well I have the script, but I'll add a first mission type

-- Client Side--

GUIEditor = {
    gridlist = {},
    window = {},
    button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
	function ()
        WinMission = guiCreateWindow(356, 141, 594, 329, "Mission", false)
		guiSetVisible (WinMission, false
 )
        guiWindowSetSizable(WinMission, false)

        accepted = guiCreateButton(12, 236, 180, 34, "ACCCEPTED", false, WinMission)
        declined = guiCreateButton(207, 236, 180, 34, "DECLINED", false, WinMission)
        abandon = guiCreateButton(397, 236, 180, 34, "ABANDON", false, WinMission)
        ListMissions = guiCreateGridList(12, 36, 565, 190, false, WinMission)
        guiGridListAddColumn(ListMissions, "MISSION", 0.9)
        for i = 1, 11 do
            guiGridListAddRow(ListMissions)
        end
        guiGridListSetItemText(ListMissions, 0, 1, "Fist  Misson", false, false)
        guiGridListSetItemText(ListMissions, 1, 1, "Seccond Mission", false, false)
        guiGridListSetItemText(ListMissions, 2, 1, "-", false, false)
        guiGridListSetItemText(ListMissions, 3, 1, "-", false, false)
        guiGridListSetItemText(ListMissions, 4, 1, "-", false, false)
        guiGridListSetItemText(ListMissions, 5, 1, "-", false, false)
        guiGridListSetItemText(ListMissions, 6, 1, "-", false, false)
        guiGridListSetItemText(ListMissions, 7, 1, "-", false, false)
		guiGridListSetItemText(ListMissions, 8, 1, "-", false, false)
        guiGridListSetItemText(ListMissions, 9, 1, "-", false, false)
        guiGridListSetItemText(ListMissions, 10, 1, "-", false, false)
		
        Buttonexit = guiCreateButton(10, 276, 567, 43, "EXIT", false, WinMission)    
	end
)

--if you want add Marker# {},
Mark = {
{209.04536, 1871.57690, 12},
}
--Marker
local Marker1 = createMarker(209.04536, 1871.57690, 12, "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 (WinMission, true )
            showCursor( true )
        end
    end
)
end

addEventHandler ("onClientGUIClick", getRootElement(), function (button, state, absoluteX, absoluteY)
	local me = not guiGetVisible (WinMission)
	if (source == Buttonexit) then
		guiSetVisible (WinMission, me)
		showCursor (me)
	end
end)

here is the script

I wanted to add a function to GindList 0, 1

I have a mission and I want to add then how to do?

Edited by kevincouto6
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...