Skip to content

Commit df186ac

Browse files
Scraper: parse event page notes
1 parent 8e254d4 commit df186ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+287
-0
lines changed

events/Browser/onClientBrowserCreated.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ examples:
1313
- path: examples/onClientBrowserCreated-1.lua
1414
description: ''
1515
side: client
16+
notes:
17+
- type: info
18+
content: Calling loadBrowserURL right after createBrowser will not work normally
19+
due to the nature of the asynchronous browser interface.

events/Browser/onClientBrowserWhitelistChange.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ examples:
1414
- path: examples/onClientBrowserWhitelistChange-1.lua
1515
description: ''
1616
side: client
17+
notes:
18+
- type: info
19+
content: Attaching the event to a webbrowser won't work. Attach it to the root element
20+
instead.

events/Client/onConsole.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ examples:
1515
- path: examples/onConsole-1.lua
1616
description: ''
1717
side: server
18+
notes:
19+
- type: info
20+
content: The event will not be triggered if the message can be processed by an existing
21+
command handler

events/Colshape/onClientColShapeHit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ examples:
2323
description: This example outputs to the chatbox if the local user is in the same
2424
dimension as the collision shape or not.
2525
side: client
26+
notes:
27+
- type: info
28+
content: The hit won't be detected if the element that entered the colshape is a
29+
colshape or projectile.

events/Colshape/onColShapeHit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ examples:
2020
description: This example creates a hill area for aKing of the hillgamemode. When
2121
a player enters or leaves the area, it's announced in the chatbox.
2222
side: server
23+
notes:
24+
- type: info
25+
content: The hit won't be detected if the element that entered the colshape is a
26+
colshape.

events/Element/onClientElementStreamIn.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,18 @@ examples:
1414
description: This example shows you how to tell player that another player was streamed
1515
in and the distance between them and said player
1616
side: client
17+
notes:
18+
- type: info
19+
content: This event also triggers for a remote player that dies in front of local
20+
player, even if they respawn far away.. the moment they do so, this event will
21+
be triggered, and if you'd measure distance between local and said remote player
22+
(that spawned far away) during this event, it would output the distance at which
23+
they died in front of local player, e.g 2 metres. This is bug-prone behavior and
24+
likely incorrect, to be fixed in the future, but for now be aware. The 'low distance'
25+
aspect of this (which could worsen your results) is caused by the split second
26+
that their ped elements may 'flash' past its wasted location during the respawning
27+
process. For now you can work around these side effect (both, or the distance
28+
aspect.. results may vary based on randomness) by adding an isPedDead check inside
29+
the event, checking source (said remote player), as this delays the onClientElementIn
30+
until after full respawn has taken place. The below script example incorporates
31+
this workaround

events/Element/onClientElementStreamOut.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ examples:
1414
description: This example shows you how to tell player that another player was streamed
1515
out and the distance between them and said player
1616
side: client
17+
notes:
18+
- type: info
19+
content: Be aware that this event triggers for local player (as itself being the
20+
element that got streamed out) when said local player dies and respawns, as this
21+
is the removal & recreation of entity local ped.

events/Input/onClientClick.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ examples:
4848
displays in the position of the element telling you what kind of element you have
4949
clicked. It hides after 5 seconds.
5050
side: client
51+
notes:
52+
- type: info
53+
content: This event only triggers if the cursor is visible by showCursor

events/Input/onClientGUIClick.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ examples:
2828
the button is clicked with the left mouse button, it will output the message in
2929
the edit box into the chat box.
3030
side: client
31+
notes:
32+
- type: info
33+
content: The player who clicked the gui-element is always the localPlayer .
34+
- type: info
35+
content: If the GUI Element attached to this event has a parent element, this event
36+
will be triggered once the parent element of the attached element is clicked too.
37+
You can set the parameter propagate to false in the call to addEventHandler to
38+
prevent this.

events/Object/onClientObjectBreak.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ examples:
1414
description: This example prevents objects from beeing broken in interiors.
1515
side: client
1616
canceling: If this event is canceled, the object will not break.
17+
notes:
18+
- type: info
19+
content: This event is only triggered for objects that are streamed in

events/Object/onClientObjectDamage.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ examples:
2020
description: 'This example outputs the theoretical and real loss:'
2121
side: client
2222
canceling: If this event is canceled, the object will not be damaged.
23+
notes:
24+
- type: info
25+
content: This event is only triggered for objects that are streamed in.

events/Other/onClientMinimize.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ examples:
1010
- path: examples/onClientMinimize-1.lua
1111
description: This example kills any player who minimizes the game.
1212
side: client
13+
notes:
14+
- type: info
15+
content: This event only triggers from fullscreen minimize. onClientRestore can
16+
trigger even if this event didn't. isMTAWindowFocused is a more reliable way to
17+
see if a player is minimized.

events/Other/onClientWorldSound.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ examples:
3030
gets played has been played using '/seesoundlist'.
3131
side: client
3232
canceling: If this event is canceled, the sound won't play at all.
33+
notes:
34+
- type: info
35+
content: Use setWorldSoundEnabled if you want to disable certain sounds conditionless.
36+
For example, you should only cancel player emitted sounds in this event, because
37+
when you cancel certain vehicle sounds, the game will try to play the same sound
38+
on the next frame.

events/Ped/onClientPedChoke.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ examples:
1818
description: This example disables choking effects from the tear gas grenades.
1919
side: client
2020
canceling: If this event is canceled, the ped will not be choked.
21+
meta:
22+
- needs_checking: Event is never triggered

events/Ped/onClientPedDamage.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ examples:
2424
description: This example cancels any damage done to peds
2525
side: client
2626
canceling: If this event is canceled, then any damaging effects to the ped will cease.
27+
notes:
28+
- type: info
29+
content: This event is only triggered for peds that are streamed in

events/Ped/onClientPedHeliKilled.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ examples:
1515
description: This example disables helicopter killing
1616
side: client
1717
canceling: If this event is canceled, the ped will not be killed
18+
notes:
19+
- type: info
20+
content: This event is only triggered for peds that are streamed in

events/Ped/onClientPedHitByWaterCannon.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ examples:
1414
description: This example says who got hit by a water cannon.
1515
side: client
1616
canceling: If this event is canceled, the ped will not be knocked down
17+
notes:
18+
- type: info
19+
content: This event is only triggered for peds that are streamed in

events/Ped/onClientPedStep.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ examples:
1414
- path: examples/onClientPedStep-1.lua
1515
description: ''
1616
side: client
17+
notes:
18+
- type: info
19+
content: This event is only triggered for peds that are streamed in

events/Ped/onClientPedWeaponFire.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ examples:
3232
- path: examples/onClientPedWeaponFire-1.lua
3333
description: ''
3434
side: client
35+
notes:
36+
- type: info
37+
content: This event is only triggered for peds that are streamed in
3538
incomplete: true

events/Ped/onPedDamage.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ examples:
1717
side: server
1818
canceling: Canceling this event has no effect. Cancel the client-side event onClientPedDamage
1919
instead.
20+
notes:
21+
- type: info
22+
content: This event is not triggered prior to r21247.

events/Pickup/onPickupUse.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ examples:
1818
side: server
1919
canceling: If this event is canceled, the player will not be given the item they picked
2020
up.
21+
notes:
22+
- type: tip
23+
content: '[[{{{image}}}|link=|]]'

events/Player/onClientPlayerDamage.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ examples:
2727
side: client
2828
canceling: If this event is canceled, then any damaging effects to the local player
2929
will cease.
30+
notes:
31+
- type: info
32+
content: This event is only triggered for players that are streamed in

events/Player/onClientPlayerHeliKilled.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ examples:
1515
description: This example disables helicopter killing
1616
side: client
1717
canceling: If this event is canceled, the player will not be killed
18+
notes:
19+
- type: info
20+
content: This event is only triggered for players that are streamed in

events/Player/onClientPlayerHitByWaterCannon.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ examples:
1414
description: This example outputs a message when you are hit by a water cannon
1515
side: client
1616
canceling: If this event is canceled, the player will not be knocked down.
17+
notes:
18+
- type: info
19+
content: This event is only triggered for players that are streamed in

events/Player/onClientPlayerVoiceStart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ examples:
1212
description: This example outputs to the console the player that started talking.
1313
side: client
1414
canceling: This example outputs to the console the player that started talking.
15+
notes:
16+
- type: info
17+
content: This event triggers inconsistently ( https://github.com/multitheftauto/mtasa-blue/issues/1700
18+
). You should use onPlayerVoiceStart and trigger a custom client-sided event to
19+
get similar results, minus the cancelEvent effect.

events/Player/onClientPlayerVoiceStop.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ examples:
1212
description: This example outputs to the console the player that stopped talking.
1313
side: client
1414
canceling: This example outputs to the console the player that stopped talking.
15+
notes:
16+
- type: info
17+
content: This event triggers inconsistently ( https://github.com/multitheftauto/mtasa-blue/issues/1700
18+
). You should use onPlayerVoiceStart and trigger a custom client-sided event to
19+
get similar results, minus the cancelEvent effect.

events/Player/onClientPlayerWeaponFire.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,10 @@ examples:
5050
- path: examples/onClientPlayerWeaponFire-3.lua
5151
description: This example makes the Shotgun fire explosive rounds.
5252
side: client
53+
notes:
54+
- type: info
55+
content: This event is only triggered for players that are streamed in
56+
- type: info
57+
content: This does not trigger for any player's melee weapons or for remote player's
58+
projectile weapons or cameras
5359
incomplete: true

events/Player/onPlayerACInfo.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ examples:
3838
In order for this to work, it''s important that youdon''tadd SD #14 detection
3939
into mtaserver.conf, as this is a custom re-implementation.'
4040
side: server
41+
notes:
42+
- type: info
43+
content: Any resource using this event should call resendPlayerACInfo for each player
44+
in onResourceStart

events/Player/onPlayerCommand.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ examples:
2020
- path: examples/onPlayerCommand-2.lua
2121
description: Time limit specific commands.
2222
side: server
23+
notes:
24+
- type: info
25+
content: This event triggers regardless of whether the command exists in a script
26+
or is hardcoded. Also, typing anything in chat will execute the internal command
27+
"say", so this event will be triggered on every chat message as well. Therefore
28+
you should avoid excessive use of this function on busy servers, out of performance
29+
considerations.

events/Player/onPlayerMarkerHit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ examples:
1818
- path: examples/onPlayerMarkerHit-1.lua
1919
description: This example outputs when a player hits a marker.
2020
side: server
21+
notes:
22+
- type: info
23+
content: This event is triggered for players only. Attaching this event to a marker
24+
does nothing.

events/Player/onPlayerModInfo.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ examples:
4242
description: This example checks modified files against a list and prints a warning
4343
in the chatbox.
4444
side: server
45+
notes:
46+
- type: info
47+
content: Any resource using this event should call resendPlayerModInfo for each
48+
player in onResourceStart .

events/Player/onPlayerTeleport.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ examples:
3535
description: This example logs unexpected teleportation events.
3636
side: server
3737
canceling: Canceling this event has no effect.
38+
notes:
39+
- type: info
40+
content: 'The sensitivity threshold can be adjusted through the player_teleport_alert
41+
setting, which accepts values between 5 and 500 (default: 100).'

events/Player/onPlayerWeaponFire.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,8 @@ examples:
3737
- path: examples/onPlayerWeaponFire-1.lua
3838
description: This code creates explosions when the source players shoots.
3939
side: server
40+
notes:
41+
- type: info
42+
content: This event works only with weapons which have enabled bullet sync. See
43+
Weapons for more information.
4044
incomplete: true

events/Resource/onClientResourceFileDownload.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ examples:
2424
description: 'This example will output the file''s resource name/file name/size/state
2525
when downloading:'
2626
side: client
27+
notes:
28+
- type: warning
29+
content: This event is NOT related to downloadFile and onClientFileDownloadComplete
30+
!

events/Resource/onResourcePreStart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ examples:
1515
description: This code will output the name of any resource that is starting.
1616
side: server
1717
canceling: If this event is cancelled, the resource won't begin starting.
18+
notes:
19+
- type: info
20+
content: This event isn't triggered within the resource starting.

events/Server/onChatMessage.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ examples:
1919
- path: examples/onChatMessage-1.lua
2020
description: This example outputs all chat messages to debug view.
2121
side: server
22+
notes:
23+
- type: info
24+
content: It can be used to get the element responsible for a specific outputChatBox
25+
call via the second parameter.

events/Server/onShutdown.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ examples:
1919
description: ''
2020
side: server
2121
canceling: This event cannot be canceled.
22+
notes:
23+
- type: info
24+
content: There is no 100% guarantee that all the code and operations executed in
25+
this event will finish before the server is stopped. Therefore, avoid complex
26+
actions like triggers or exports, as there may not be enough time to complete
27+
the operations and execute the full code

events/Sound/onClientSoundBeat.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ examples:
1414
description: This code will change the vehicle color to a random value if the sound
1515
beats and the localPlayer is inside a vehicle
1616
side: client
17+
notes:
18+
- type: info
19+
content: This event does not work correctly pre 1.3.1-9-04627
20+
- type: info
21+
content: This event is triggered ahead of a sound beat the number passed is the
22+
play time at which the beat occurs

events/Vehicle/onClientVehicleCollision.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,7 @@ examples:
5050
- path: examples/onClientVehicleCollision-2.lua
5151
description: ''
5252
side: client
53+
notes:
54+
- type: info
55+
content: This event is only triggered for vehicles that are streamed in
5356
incomplete: true

events/Vehicle/onClientVehicleDamage.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ examples:
4040
side: client
4141
canceling: If this event is canceled, the vehicle health won't be reduced. Physical
4242
damage to the vehicle will remain.
43+
notes:
44+
- type: info
45+
content: This event is only triggered for vehicles that are streamed in

events/Vehicle/onClientVehicleExplode.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ examples:
1010
- path: examples/onClientVehicleExplode-1.lua
1111
description: This example will output some text to chat on vehicle explosion
1212
side: client
13+
notes:
14+
- type: info
15+
content: This event can not be cancelled.

events/Vehicle/onClientVehicleNitroStateChange.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ examples:
1313
- path: examples/onClientVehicleNitroStateChange-1.lua
1414
description: ''
1515
side: client
16+
notes:
17+
- type: info
18+
content: This event is only triggered for vehicles that are streamed in

events/Vehicle/onClientVehicleWeaponHit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ examples:
3131
- path: examples/onClientVehicleWeaponHit-1.lua
3232
description: ''
3333
side: client
34+
notes:
35+
- type: info
36+
content: This event is only triggered for elements that are streamed in

events/Vehicle/onTrailerAttach.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ examples:
1717
if you do not want people attaching trailers to vehicles
1818
side: server
1919
canceling: If this event is canceled, the trailer will detach from the truck again.
20+
notes:
21+
- type: warning
22+
content: Doesn't appear to work.
23+
meta:
24+
- needs_checking: Cancellation of event has no effect. detachTrailerFromVehicle in
25+
the event doesn't work either, 50 ms timer is effective.

events/Vehicle/onVehicleExplode.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ examples:
1919
- path: examples/onVehicleExplode-2.lua
2020
description: 'Example 2:This will show the name of any vehicle that blew up:'
2121
side: server
22+
notes:
23+
- type: info
24+
content: This event can not be canceled.

events/Weapon_creation/onClientWeaponFire.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ examples:
4242
description: This example prevents player damage from custom weapons.
4343
side: client
4444
canceling: If this event was canceled, then the weapon will not fire.
45+
notes:
46+
- type: info
47+
content: This event is ONLY for custom weapons that were created with createWeapon
48+
, for regular weapons use onClientPlayerWeaponFire .
49+
- type: info
50+
content: This event is only triggered for custom weapons that are streamed in

0 commit comments

Comments
 (0)