-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmenu2.lua
152 lines (138 loc) · 5.23 KB
/
menu2.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
function things1(stuff)
things(stuff)
spawnStuff(stuff)
end
Citizen.Trace("stage 1 complete")
local options =
{
x = 0.51,
y = 0.2,
width = 0.22,
height = 0.04,
scale = 0.4,
font = 0,
menu_title = "Main obj Menu",
menu_subtitle = "Categories",
color_r = 30,
color_g = 144,
color_b = 255,
}
function Notify(text)
SetNotificationTextEntry('STRING')
AddTextComponentString(text)
DrawNotification(false, false)
end
function drawTxt(x,y ,width,height,scale, text, r,g,b,a, outline)
SetTextFont(0)
SetTextProportional(0)
SetTextScale(scale, scale)
SetTextColour(r, g, b, a)
SetTextDropShadow(0, 0, 0, 0,255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
if(outline)then
SetTextOutline()
end
SetTextEntry("STRING")
AddTextComponentString(text)
DrawText(x - width/2, y - height/2 + 0.005)
end
function DisplayHelpText(str)
SetTextComponentFormat("STRING")
AddTextComponentString(str)
DisplayHelpTextFromStringLabel(0, 1, 1, -1)
end
function Main()
DisplayHelpText("Use ~INPUT_CELLPHONE_UP~ ~INPUT_CELLPHONE_DOWN~ to ~y~move~w~ and ~y~Enter~w~ to ~r~select")
Notify("Press ~r~F5 ~w~to ~g~open~w~/~r~close~w~!")
options.menu_title = "my menyoo"
options.menu_subtitle = "~o~main menu"
ClearMenu()
Menu.addButton("~y~veh spawn ~b~menu", "vehSpawnMenu", nil)
Menu.addButton("~y~TBA ~b~menu", "things2", "my name")
Menu.addButton("~y~TBA ~b~menu", "things2", "is")
end
function things2(stuff)
Citizen.Trace(tostring(stuff))
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustReleased(1, 166) then -- INPUT_CELLPHONE_DOWN
Main() -- Menu to draw
Menu.hidden = not Menu.hidden -- Hide/Show the menu
end
Menu.renderGUI(options) -- Draw menu on each tick if Menu.hidden = false
end
end)
function vehSpawnMenu()
DisplayHelpText("Use ~INPUT_CELLPHONE_UP~ ~INPUT_CELLPHONE_DOWN~ to ~y~move~w~ and ~y~Enter~w~ to ~r~select")
Notify("Press ~r~F5 ~w~to ~g~open~w~/~r~close~w~!")
options.menu_title = "Veh Spawn Menu"
options.menu_subtitle = "choose a veh type"
ClearMenu()
Menu.addButton("boats", "vehBoatsSpawnMenu", nil)
Menu.addButton("~g~BACK TO MAIN MENU", "Main", nil)
end
function vehBoatsSpawnMenu()
DisplayHelpText("Use ~INPUT_CELLPHONE_UP~ ~INPUT_CELLPHONE_DOWN~ to ~y~move~w~ and ~y~Enter~w~ to ~r~select")
Notify("Press ~r~F5 ~w~to ~g~open~w~/~r~close~w~!")
options.menu_title = "Veh Boats Spawn Menu"
options.menu_subtitle = "choose a veh to spawn"
ClearMenu()
Menu.addButton("~g~spawn dinghy ~b~menu", "vehSpawnDinghyMenu", nil)
Menu.addButton("~g~spawn dinghy ~b~menu", "vehSpawnDinghy2Menu", nil)
Menu.addButton("~g~BACK", "vehSpawnMenu", nil)
Menu.addButton("~g~BACK TO MAIN MENU", "Main", nil)
end
function vehSpawnDinghyMenu()
RequestModel(1033245328)
DisplayHelpText("Use ~INPUT_CELLPHONE_UP~ ~INPUT_CELLPHONE_DOWN~ to ~y~move~w~ and ~y~Enter~w~ to ~r~select")
Notify("Press ~r~F5 ~w~to ~g~open~w~/~r~close~w~!")
options.menu_title = "~y~Veh boat Spawn menu"
options.menu_subtitle = "Spawn Boat"
ClearMenu()
Menu.addButton("~g~spawn dinghy", "things1", 1033245328)
Menu.addButton("~g~move dinghy", "moveDinghy", nil)
Menu.addButton("~b~disable collision ~r~dinghy", "setCollisionStuff", true)
Menu.addButton("~b~enable collision ~b~dinghy", "setCollisionStuff", false)
Menu.addButton("~r~delete object", "deleteStuff", nil)
Menu.addButton("~g~back", "vehBoatsSpawnMenu", nil)
Menu.addButton("~g~BACK TO MAIN MENU", "Main", nil)
end
function vehSpawnDinghy2Menu()
RequestModel(276773164)
DisplayHelpText("Use ~INPUT_CELLPHONE_UP~ ~INPUT_CELLPHONE_DOWN~ to ~y~move~w~ and ~y~Enter~w~ to ~r~select")
Notify("Press ~r~F5 ~w~to ~g~open~w~/~r~close~w~!")
options.menu_title = "~y~Veh boat Spawn menu"
options.menu_subtitle = "Spawn Boat"
ClearMenu()
Menu.addButton("~g~spawn dinghy2", "spawnStuff", 276773164)
Menu.addButton("~b~disable collision ~r~dinghy2", "setCollisionStuff", true)
Menu.addButton("~b~enable collision ~b~dinghy2", "setCollisionStuff", false)
Menu.addButton("~r~delete object", "deleteStuff", nil)
Menu.addButton("~g~back", "vehBoatsSpawnMenu", nil)
Menu.addButton("~g~BACK TO MAIN MENU", "Main", nil)
end
function moveDinghy()
Notify("use arrow keys to move obj ~n~Press [ ] keys to rotate on Y~n~ Press - = keys to rotate on X")
Notify("Press NUM- NUM+ to change heading ~n~ Press pgUP PgDOWN to change hight")
Notify("~r~enter ~w~to freeze ")
options.menu_title = "~y~move menu"
options.menu_subtitle = "move object"
ClearMenu()
freezeStuff()
Menu.addButton("~b~unfreeze ~y~Dinghy", "moveDinghy0", nil)
Menu.addButton("~g~back", "vehSpawnDinghyMenu", nil)
Menu.addButton("~g~BACK TO MAIN MENU", "Main", nil)
end
function moveDinghy0()
Notify("use arrow keys to move obj ~n~Press [ ] keys to rotate on Y~n~ Press - = keys to rotate on X")
Notify("Press NUM- NUM+ to change heading ~n~ Press pgUP PgDOWN to change hight")
Notify("~r~enter ~w~to freeze ")
options.menu_title = "~y~move menu"
options.menu_subtitle = "move object"
ClearMenu()
Menu.addButton("~b~freeze ~y~advanced case", "moveDinghy", nil)
unfreezeStuff()
end