Skip to content

Commit 31a4311

Browse files
ChemicalCreationssacr1ficez
authored andcommitted
added resource: Chemical Ladder v2.0 (ladders)
1 parent 6ba5a88 commit 31a4311

File tree

5 files changed

+2214
-0
lines changed

5 files changed

+2214
-0
lines changed

[gameplay]/ladders/README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Chemical_Ladders
2+
Make working ladders in MTA
3+
Allows ladders to be climbed in Multi-Theft Auto
4+
Usage:
5+
enter - enter or exit ladders
6+
jump - jump of ladders (left/right changes directly)
7+
crouch - slides down ladders
8+
sprint - enter trough ladders with platforms
9+
10+
Video v2 - https://youtu.be/K3JhbzGyQto
11+
Video v1 - https://youtu.be/-XVog1RXpxI
12+
13+
14+
For more cool free mods:
15+
Visit https://ko-fi.com/chemicalcreations
16+
Share your thoughts https://discord.com/invite/FxHCc7j or HMU
17+
Help the code https://github.com/ChemicalCreations/Chemical_Ladders
18+
19+
---- Server Events ----
20+
"onLadderAdd" ++ root/surfaceElement (surface, ladder) -- when a new ladder is added (may be bypassed by onElementModelChange)
21+
"onLadderRemove" ++ root/surfaceElement (surface[, ladder]) -- when a new ladder is removed (may be bypassed by onElementModelChange)
22+
"onLadderClimbingStart" ++ root/surfaceElement (surface, ladder, ped, step) -- when a ladder is enterd by a ped
23+
"onLadderClimbingStop" ++ root/surfaceElement (surface, ladder, ped) -- when a ladder is exited by a ped
24+
"onPedLadderClimbingStart" ++ ped (surface, ladder, step) -- when a ped starts using a ladder
25+
"onPedLadderClimbingStop" ++ ped (surface, ladder, position) -- when a ped stops using a ladder
26+
"onPedLadderClimbingStep" ++ ped (surface, ladder) -- when a ped changes ladder step animation
27+
NOTE: Ladders are built for player elements and peds may not work or give unexpected results
28+
29+
---- Server Functions ----
30+
setPedClimbingLadder(ped, surface, ladder, pos) - server
31+
isPedClimbingLadder(ped) - shared
32+
getPedsOnLadder(surface) - shared
33+
setPedLadderClimbingEnabled(ped, enabled) - server
34+
isPedLadderClimbingEnabled(ped) - shared
35+
getLadderClosestToPosition(px, py, pz) - shared
36+
getLadders(surface) - shared
37+
setLadderEnabled(surface, ladder, active) - server
38+
setLadderProperties(surface, ladder, properties) - server
39+
getLadderProperties(surface, ladder) - shared
40+
addLadder(surface, sx, sy, sz, tx, ty, tz, rx, ry, rz, d, jumping, inside, sliding, water, exitShift) - server
41+
removeLadder(surface, ladder) - server
42+
43+
---- Client Events ----
44+
"onClientPedLadderClimbingStart" ++ ped (step) -- when a ped starts using a ladder
45+
"onClientPedLadderClimbingStop" ++ ped () -- when a ped stops using a ladder
46+
"onClientPedLadderClimbingStep" ++ ped (step) -- when a ped changes ladder step animation
47+
48+
---- Client Functions ----
49+
isPedClimbingLadder(ped) - shared
50+
getPedsOnLadder(surface) - shared
51+
isPedLadderClimbingEnabled(ped) - shared
52+
getLadderClosestToPosition(px, py, pz) - shared
53+
getLadders(surface) - shared
54+
getLadderProperties(surface, ladder) - shared
55+
56+
57+
58+
-- Table Layouts --
59+
60+
---- Table: climbs ----
61+
["SurfaceID"/ladderElement] = { -- Note: If surfaceID is an element, all positions are relative
62+
[ladderIndex] = { -- individual ladders of a surface
63+
sx=0 , sy=0, sz=0, -- ladder start position
64+
tx=0, ty=0, tz=0, -- ladder end position
65+
rx=0, ry=0, rz=0, -- ladder rotation
66+
d=1, -- distance from ladder it can be grabbed (not players grab point has a 0.3 offset)
67+
shift_exit = 0, -- distance to warp player upon ladder exit (Y axis relative to ladder) (doesn't affect all exits)
68+
water = false, -- will fall on ladder exit (change exit anim)
69+
sliding = true, -- allows sliding down ladders by hold "crouch" key
70+
inside = false, -- allows entering ladders' the "sprint" key (for ladders with platforms) (also allows entering from rear of ladder)
71+
jumping = true, -- allows jumping off ladders with the "jump" key
72+
dynamic = false, -- detects ground level to exit ladder
73+
}
74+
}
75+
76+
77+
---- Table: ladderModels ----
78+
Note: This table will automatically assign a ladder surface to all vehicles/objects created as the index models
79+
[ModelNumber/ModelName] -- { -- Note: Model Name is untested and would likely only support vehicle names atm
80+
[ladderIndex] = {ladderData} -- (See ladder data under "Table Layouts > climbs")
81+
}
82+
83+
84+
---- Table: anims ----
85+
["ladderAnim"] = {
86+
block = "dozer", -- animation block
87+
anim = "DOZER_Align_LHS", -- animation name
88+
anim_start = 350, -- anim start position
89+
anim_hold = 530, -- anim wait for player input position
90+
anim_end = 720, -- anim end position
91+
anim_fade = 120, -- ms to blend into next anim
92+
speed = 1, -- task speed multiplier
93+
anim_duration = 930, -- ms lenght of anim
94+
align = 130, -- max ms to align to ladder
95+
blend = 150, -- ms to blend into anim (for when starting to use a ladder)
96+
climb_up = "exit_l", -- next anim for going up (often to exit)
97+
climb_next = "climb_r", -- next animation to move along lader
98+
climb_down = "enter_l", -- next anim for going down (often to exit)
99+
climb_move = {{0, 250}, {0.04, 300}, {0.424, 430}, {0.494, 530}, {1.093, 720}}, -- used to move ped up/down ladder per time
100+
climb_angle = {{-90, 0}, {0, 170}}, -- used to apply rotation per time
101+
climb_adjust = {{0.0, 000, 300}, {0.243, 400}, {0.700, 800}}, -- used to move ped in/out per time (Y pos axis)
102+
climb_roll = {{0, 300}, {-22, 500}}, -- used to apply "X" rot axis tilt per time
103+
velocity = {x=0.0, y=0.0, z=0.0}, -- used to apply velocity to ped over time (replaces "climb_move" value with velocity)
104+
straight = true, -- used to disable some ped rotation adjustment (mainly in case of "X" axis leaning)
105+
},

0 commit comments

Comments
 (0)