This repository was archived by the owner on Apr 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathInternetFunctions.lua
More file actions
73 lines (70 loc) · 2.51 KB
/
Copy pathInternetFunctions.lua
File metadata and controls
73 lines (70 loc) · 2.51 KB
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
--this function enables the mouse input for scaleform
function enableMouse()
if HasNamedScaleformMovieLoaded("web_browser") then
PushScaleformMovieFunction(scaleform, "SET_MOUSE_INPUT")
--these 2 are the moust X and Y position on screen
PushScaleformMovieFunctionParameterFloat(GetDisabledControlNormal(2, 239))
PushScaleformMovieFunctionParameterFloat(GetDisabledControlNormal(2, 240))
PushScaleformMovieFunctionParameterInt(-1)
--PopScaleform is kinda like populate scaleform or an "end" statement to your scaleform function "push"
PopScaleformMovieFunctionVoid()
--this is the mouse scroll wheel
if IsControlJustPressed(2, 242) then
Citizen.Trace("is control 242 "..tostring(IsControlJustPressed(2, 241)).." bvar: "..tostring(bvar))
--this is for scrolling the webpage
if bvar <= 0.0 then
bvar = 20.0
else
bvar = bvar + 20.0
if bvar >=100.0 then
bvar = 100.0
end
end
end
--this is the mouse scroll wheel
if IsControlJustPressed(2, 241) then
Citizen.Trace("is control 241 "..tostring(IsControlJustPressed(2, 241)).." bvar: "..tostring(bvar))
--this is for scrolling the webpage
if bvar > 0.0 then
bvar = 0.0
else
bvar = bvar - 20.0
if bvar <=100.0 then
bvar = -100.0
end
end
end
--this is also for scrolling the webpage
PushScaleformMovieFunction(scaleform, "SET_ANALOG_STICK_INPUT")
PushScaleformMovieFunctionParameterFloat(0.0)
PushScaleformMovieFunctionParameterFloat(0.0)
PushScaleformMovieFunctionParameterFloat(bvar)
PushScaleformMovieFunctionParameterBool(false)
PopScaleformMovieFunctionVoid()
--this is the mouse left click
if IsControlJustPressed(1, 237) then
if HasNamedScaleformMovieLoaded("web_browser") then
PushScaleformMovieFunctionParameterFloat(16.0)
--this is what enables the mouse right click
PushScaleformMovieFunction(scaleform, "SET_INPUT_EVENT")
PushScaleformMovieFunctionParameterFloat(16.0)
PopScaleformMovieFunctionVoid()
else
PopScaleformMovieFunctionVoid()
end
end
end
end
----------------------------------------------------
----------------------------------------------------
--this should be in a loop
--this gives you some info about current site and stuff
if HasScaleformMovieLoaded(scaleform) then
getcurentwebsitid = GetCurrentWebsiteId()
getcurentwebsitPage = Citizen.InvokeNative(0xE3B05614DCE1D014, getcurentwebsitid)
getcurentPage = Citizen.InvokeNative(0x01A358D9128B7A86)
else
getcurentwebsitid = nil
getcurentwebsitPage = nil
getcurentPage = nil
end