You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IS_SERVER= (nottriggerServerEvent) -- do not touch — constant; helper bool which checks whether it's a server or client environment
8
+
9
+
GLUE_WEAPON_SLOTS= {} -- do not touch — constant; used to verify whether passed weapon slot is in valid range (0-12), this is used to restore currently held weapon, because MTA resets weapon slot on attach
10
+
GLUE_CLIENT_ATTACH_DATA_SIZE=6-- do not touch, unless you modify data sent from client via triggerServerEvent (onServerVehicleAttachElement)
11
+
GLUE_ELEMENT_TYPES_AND_EVENTS= { -- do not touch — constant; controls which events would be added for glue logic based on allowed element type
12
+
["player"] ="onPlayerWasted",
13
+
["vehicle"] ="onVehicleExplode",
14
+
}
15
+
16
+
GLUE_ALLOWED_ELEMENTS= {"player", "vehicle"} -- elements which could be attached to vehicle (supported: "player", "vehicle")
17
+
GLUE_VEHICLE_TYPES= { -- only relevant if GLUE_ALLOWED_ELEMENTS contains "vehicle", specifies which vehicle types are allowed to glue
18
+
"Automobile",
19
+
--"Plane",
20
+
"Bike",
21
+
"Helicopter",
22
+
--"Boat",
23
+
"Train",
24
+
"Trailer",
25
+
"BMX",
26
+
"Monster Truck",
27
+
"Quad",
28
+
}
29
+
30
+
GLUE_VEHICLE_WHITELIST= { -- only relevant if GLUE_ALLOWED_ELEMENTS contains "vehicle", ignores GLUE_VEHICLE_TYPES; specifies which vehicle models are allowed to glue
31
+
500, -- mesa
32
+
411, -- infernus
33
+
443, -- packer
34
+
487, -- maverick
35
+
}
36
+
37
+
GLUE_ATTACH_OVER_VEHICLE=false-- if true, vehicles will attach over the top of target vehicle. if false, vehicles will attach but will maintain original position (seamless, precise glue'ing)
38
+
GLUE_DETACH_ON_VEHICLE_EXPLOSION=true-- specifies whether attached elements would be automatically detached, when attachedTo vehicle explodes
39
+
GLUE_ATTACH_ON_TOP_OFFSETS= {0, 0, 1.5} -- only relevant if GLUE_ATTACH_OVER_VEHICLE is set to true, specifies static position for attaching vehicle over vehicle
40
+
GLUE_ATTACH_VEHICLE_MAX_DISTANCE=5-- specifies maximum distance for nearby vehicle to be glued (also serves anti-cheat purpose, so only nearby vehicle could be attached)
41
+
GLUE_ATTACH_PLAYER_MAX_DISTANCE=10-- ditto
42
+
43
+
GLUE_PREVENT_CONTROLS=false-- prevent players from shooting their guns while attached to vehicle
44
+
GLUE_PREVENT_CONTROLS_LIST= {"fire", "action"} -- only relevant GLUE_PREVENT_CONTROLS is set to true, specifies which controls will be toggled on/off
45
+
46
+
GLUE_SYNC_CORRECTION=true-- whether attached player positions should be sanity corrected by server, this exists to prevents positional desyncs (e.g: during vehicle teleporting on long distances), which causes player to behave like a ghost (roam freely around SA, while still appearing glued to vehicle for other players)
47
+
GLUE_SYNC_CORRECTION_INTERVAL=3500-- only relevant if GLUE_SYNC_CORRECTION is set to true, how often glued player position should be corrected, do not set it too low, otherwise you will face weapon aiming interruption (this was constant issue when this variable was set to 1000 before)
48
+
49
+
GLUE_MESSAGE_PREFIX="[Glue]:" -- shown in all glue messages
50
+
GLUE_MESSAGE_PREFIX_COLOR="#c68ff8" -- color used by prefix
51
+
GLUE_MESSAGE_HIGHLIGHT_COLOR="#c68ff8" -- color used in message highlights
52
+
GLUE_SHOW_ONE_TIME_HINT=true-- whether player should receive one-time (till resource restart) hint, regarding glue keybindings and settings, upon entering a vehicle
53
+
54
+
GLUE_ALLOW_ATTACH_TOGGLING=true-- should players be able to control attach lock on their vehicle (as a driver)
55
+
GLUE_ALLOW_DETACHING_ELEMENTS=true-- should players be able to detach already attached elements (as a driver)
56
+
57
+
GLUE_ATTACH_DETACH_KEY="X" -- used to attach/detach yourself/vehicle
58
+
GLUE_ATTACH_TOGGLE_KEY="C" -- only relevant if GLUE_ALLOW_ATTACH_TOGGLING is set to true; specifies whether players can disable attaching to vehicle which are driver of
59
+
GLUE_DETACH_ELEMENTS_KEY="B" -- only relevant if GLUE_ALLOW_DETACHING_ELEMENTS is set to true; controls vehicle drivers are able to detach elements currently attached to their vehicle
60
+
61
+
GLUE_ATTACH_DETACH_DELAY=300-- how often player can attach/detach yourself/vehicle
62
+
GLUE_ATTACH_TOGGLE_DELAY=300-- only relevant if GLUE_ALLOW_ATTACH_TOGGLING is set to true; how often player can toggle vehicle attach lock
63
+
GLUE_DETACH_ELEMENTS_DELAY=1000-- only relevant if GLUE_ALLOW_DETACHING_ELEMENTS is set to true; how often player can detach all currently attached elements
localglueHintAttachYourself=glueHintCanAttachPlayerandGLUE_MESSAGE_HIGHLIGHT_COLOR.."yourself#ffffff"..(glueHintCanAttachVehicleand" or " or"") or""
191
+
localglueHintAttachLock= (GLUE_ALLOW_ATTACH_TOGGLINGand"#ffffff'"..GLUE_MESSAGE_HIGHLIGHT_COLOR..GLUE_ATTACH_TOGGLE_KEY.."#ffffff' is used to disable/enable attaching to your vehicle. " or"")
192
+
localglueHintDetachElements= (GLUE_ALLOW_DETACHING_ELEMENTSand"#ffffff'"..GLUE_MESSAGE_HIGHLIGHT_COLOR..GLUE_DETACH_ELEMENTS_KEY.."#ffffff' to detach all currently attached elements." or"")
193
+
194
+
localglueHintA="Press '"..GLUE_MESSAGE_HIGHLIGHT_COLOR..GLUE_ATTACH_DETACH_KEY.."#ffffff' to attach "..glueHintAttachYourself..glueHintAttachVehicles.." to current vehicle."
0 commit comments