mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-09-17 17:57:18 +02:00
Begin working on a demo script.
Should be simple and easy to start with.
This commit is contained in:
19
bin/demo/events/blip.nut
Normal file
19
bin/demo/events/blip.nut
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: BlipCreated
|
||||
*/
|
||||
SqCore.On().BlipCreated.Connect(function(/*SqBlip*/ blip, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: BlipDestroyed
|
||||
*/
|
||||
SqCore.On().BlipDestroyed.Connect(function(/*SqBlip*/ blip, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: BlipCustom
|
||||
*/
|
||||
SqCore.On().BlipCustom.Connect(function(/*SqBlip*/ blip, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
49
bin/demo/events/checkpoint.nut
Normal file
49
bin/demo/events/checkpoint.nut
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointCreated
|
||||
*/
|
||||
SqCore.On().CheckpointCreated.Connect(function(/*SqCheckpoint*/ checkpoint, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointDestroyed
|
||||
*/
|
||||
SqCore.On().CheckpointDestroyed.Connect(function(/*SqCheckpoint*/ checkpoint, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointCustom
|
||||
*/
|
||||
SqCore.On().CheckpointCustom.Connect(function(/*SqCheckpoint*/ checkpoint, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointStream
|
||||
*/
|
||||
SqCore.On().CheckpointStream.Connect(function(/*SqPlayer*/ client, /*SqCheckpoint*/ checkpoint, /*bool*/ is_deleted) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointEntered
|
||||
*/
|
||||
SqCore.On().CheckpointEntered.Connect(function(/*SqCheckpoint*/ checkpoint, /*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointExited
|
||||
*/
|
||||
SqCore.On().CheckpointExited.Connect(function(/*SqCheckpoint*/ checkpoint, /*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointWorld
|
||||
*/
|
||||
SqCore.On().CheckpointWorld.Connect(function(/*SqCheckpoint*/ checkpoint, /*int*/ old_world, /*int*/ new_world) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CheckpointRadius
|
||||
*/
|
||||
SqCore.On().CheckpointRadius.Connect(function(/*SqCheckpoint*/ checkpoint, /*float*/ old_radius, /*float*/ new_radius) {
|
||||
|
||||
});
|
6
bin/demo/events/custom.nut
Normal file
6
bin/demo/events/custom.nut
Normal file
@@ -0,0 +1,6 @@
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: CustomEvent
|
||||
*/
|
||||
SqCore.On().CustomEvent.Connect(function(/*int*/ group, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
19
bin/demo/events/keybind.nut
Normal file
19
bin/demo/events/keybind.nut
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: KeybindCreated
|
||||
*/
|
||||
SqCore.On().KeybindCreated.Connect(function(/*SqKeybind*/ keybind, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: KeybindDestroyed
|
||||
*/
|
||||
SqCore.On().KeybindDestroyed.Connect(function(/*SqKeybind*/ keybind, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: KeybindCustom
|
||||
*/
|
||||
SqCore.On().KeybindCustom.Connect(function(/*SqKeybind*/ keybind, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
55
bin/demo/events/object.nut
Normal file
55
bin/demo/events/object.nut
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectCreated
|
||||
*/
|
||||
SqCore.On().ObjectCreated.Connect(function(/*SqObject*/ object, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectDestroyed
|
||||
*/
|
||||
SqCore.On().ObjectDestroyed.Connect(function(/*SqObject*/ object, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectCustom
|
||||
*/
|
||||
SqCore.On().ObjectCustom.Connect(function(/*SqObject*/ object, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectStream
|
||||
*/
|
||||
SqCore.On().ObjectStream.Connect(function(/*SqPlayer*/ client, /*SqObject*/ object, /*bool*/ is_deleted) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectShot
|
||||
*/
|
||||
SqCore.On().ObjectShot.Connect(function(/*SqObject*/ object, /*SqPlayer*/ player, /*int*/ weapon_id) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectTouched
|
||||
*/
|
||||
SqCore.On().ObjectTouched.Connect(function(/*SqObject*/ object, /*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectWorld
|
||||
*/
|
||||
SqCore.On().ObjectWorld.Connect(function(/*SqObject*/ object, /*int*/ old_world, /*int*/ new_world) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectAlpha
|
||||
*/
|
||||
SqCore.On().ObjectAlpha.Connect(function(/*SqObject*/ object, /*int*/ old_alpha, /*int*/ new_alpha, /*int*/ time) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ObjectReport
|
||||
*/
|
||||
SqCore.On().ObjectReport.Connect(function(/*SqObject*/ object, /*bool*/ old_status, /*bool*/ new_status, /*bool*/ touched) {
|
||||
|
||||
});
|
73
bin/demo/events/pickup.nut
Normal file
73
bin/demo/events/pickup.nut
Normal file
@@ -0,0 +1,73 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupCreated
|
||||
*/
|
||||
SqCore.On().PickupCreated.Connect(function(/*SqPickup*/ pickup, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupDestroyed
|
||||
*/
|
||||
SqCore.On().PickupDestroyed.Connect(function(/*SqPickup*/ pickup, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupCustom
|
||||
*/
|
||||
SqCore.On().PickupCustom.Connect(function(/*SqPickup*/ pickup, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupStream
|
||||
*/
|
||||
SqCore.On().PickupStream.Connect(function(/*SqPlayer*/ client, /*SqPickup*/ pickup, /*bool*/ is_deleted) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupClaimed
|
||||
*/
|
||||
SqCore.On().PickupClaimed.Connect(function(/*SqPickup*/ pickup, /*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupCollected
|
||||
*/
|
||||
SqCore.On().PickupCollected.Connect(function(/*SqPickup*/ pickup, /*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupRespawn
|
||||
*/
|
||||
SqCore.On().PickupRespawn.Connect(function(/*SqPickup*/ pickup) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupWorld
|
||||
*/
|
||||
SqCore.On().PickupWorld.Connect(function(/*SqPickup*/ pickup, /*int*/ old_world, /*int*/ new_world) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupAlpha
|
||||
*/
|
||||
SqCore.On().PickupAlpha.Connect(function(/*SqPickup*/ pickup, /*int*/ old_alpha, /*int*/ new_alpha) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupAutomatic
|
||||
*/
|
||||
SqCore.On().PickupAutomatic.Connect(function(/*SqPickup*/ pickup, /*bool*/ old_status, /*bool*/ new_status) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupAutoTimer
|
||||
*/
|
||||
SqCore.On().PickupAutoTimer.Connect(function(/*SqPickup*/ pickup, /*int*/ old_timer, /*int*/ new_timer) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PickupOption
|
||||
*/
|
||||
SqCore.On().PickupOption.Connect(function(/*SqPickup*/ pickup, /*int*/ option_id, /*bool*/ value, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
427
bin/demo/events/player.nut
Normal file
427
bin/demo/events/player.nut
Normal file
@@ -0,0 +1,427 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerCreated
|
||||
*/
|
||||
SqCore.On().PlayerCreated.Connect(function(/*SqPlayer*/ player, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerDestroyed
|
||||
*/
|
||||
SqCore.On().PlayerDestroyed.Connect(function(/*SqPlayer*/ player, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerCustom
|
||||
*/
|
||||
SqCore.On().PlayerCustom.Connect(function(/*SqPlayer*/ player, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerStream
|
||||
*/
|
||||
SqCore.On().PlayerStream.Connect(function(/*SqPlayer*/ client, /*SqPlayer*/ player, /*bool*/ is_deleted) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerRequestClass
|
||||
*/
|
||||
SqCore.On().PlayerRequestClass.Connect(function(/*SqPlayer*/ player, offset) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerRequestSpawn
|
||||
*/
|
||||
SqCore.On().PlayerRequestSpawn.Connect(function(/*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerSpawn
|
||||
*/
|
||||
SqCore.On().PlayerSpawn.Connect(function(/*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerWasted
|
||||
*/
|
||||
SqCore.On().PlayerWasted.Connect(function(/*SqPlayer*/ player, /*int*/ reason) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerKilled
|
||||
*/
|
||||
SqCore.On().PlayerKilled.Connect(function(/*SqPlayer*/ player, /*SqPlayer*/ killer, /*int*/ reason, /*int*/ body_part, /*bool*/ team_kill) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerEmbarking
|
||||
*/
|
||||
SqCore.On().PlayerEmbarking.Connect(function(/*SqPlayer*/ player, /*SqVehicle*/ vehicle, /*int*/ slot) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerEmbarked
|
||||
*/
|
||||
SqCore.On().PlayerEmbarked.Connect(function(/*SqPlayer*/ player, /*SqVehicle*/ vehicle, /*int*/ slot) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerDisembark
|
||||
*/
|
||||
SqCore.On().PlayerDisembark.Connect(function(/*SqPlayer*/ player, /*SqVehicle*/ vehicle) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerRename
|
||||
*/
|
||||
SqCore.On().PlayerRename.Connect(function(/*SqPlayer*/ player, /*string*/ old_name, /*string*/ new_name) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerState
|
||||
*/
|
||||
SqCore.On().PlayerState.Connect(function(/*SqPlayer*/ player, /*int*/ old_state, /*int*/ new_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateNone
|
||||
*/
|
||||
SqCore.On().StateNone.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateNormal
|
||||
*/
|
||||
SqCore.On().StateNormal.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateAim
|
||||
*/
|
||||
SqCore.On().StateAim.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateDriver
|
||||
*/
|
||||
SqCore.On().StateDriver.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StatePassenger
|
||||
*/
|
||||
SqCore.On().StatePassenger.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateEnterDriver
|
||||
*/
|
||||
SqCore.On().StateEnterDriver.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateEnterPassenger
|
||||
*/
|
||||
SqCore.On().StateEnterPassenger.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateExit
|
||||
*/
|
||||
SqCore.On().StateExit.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: StateUnspawned
|
||||
*/
|
||||
SqCore.On().StateUnspawned.Connect(function(/*SqPlayer*/ player, /*int*/ old_state) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerAction
|
||||
*/
|
||||
SqCore.On().PlayerAction.Connect(function(/*SqPlayer*/ player, /*int*/ old_action, /*int*/ new_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionNone
|
||||
*/
|
||||
SqCore.On().ActionNone.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionNormal
|
||||
*/
|
||||
SqCore.On().ActionNormal.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionAiming
|
||||
*/
|
||||
SqCore.On().ActionAiming.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionShooting
|
||||
*/
|
||||
SqCore.On().ActionShooting.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionJumping
|
||||
*/
|
||||
SqCore.On().ActionJumping.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionLieDown
|
||||
*/
|
||||
SqCore.On().ActionLieDown.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionGettingUp
|
||||
*/
|
||||
SqCore.On().ActionGettingUp.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionJumpVehicle
|
||||
*/
|
||||
SqCore.On().ActionJumpVehicle.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionDriving
|
||||
*/
|
||||
SqCore.On().ActionDriving.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionDying
|
||||
*/
|
||||
SqCore.On().ActionDying.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionWasted
|
||||
*/
|
||||
SqCore.On().ActionWasted.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionEmbarking
|
||||
*/
|
||||
SqCore.On().ActionEmbarking.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ActionDisembarking
|
||||
*/
|
||||
SqCore.On().ActionDisembarking.Connect(function(/*SqPlayer*/ player, /*int*/ old_action) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerBurning
|
||||
*/
|
||||
SqCore.On().PlayerBurning.Connect(function(/*SqPlayer*/ player, /*bool*/ is_on_fire) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerCrouching
|
||||
*/
|
||||
SqCore.On().PlayerCrouching.Connect(function(/*SqPlayer*/ player, /*bool*/ is_crouching) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerGameKeys
|
||||
*/
|
||||
SqCore.On().PlayerGameKeys.Connect(function(/*SqPlayer*/ player, /*int*/ old_keys, /*int*/ new_keys) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerStartTyping
|
||||
*/
|
||||
SqCore.On().PlayerStartTyping.Connect(function(/*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerStopTyping
|
||||
*/
|
||||
SqCore.On().PlayerStopTyping.Connect(function(/*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerAway
|
||||
*/
|
||||
SqCore.On().PlayerAway.Connect(function(/*SqPlayer*/ player, /*bool*/ is_away) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerMessage
|
||||
*/
|
||||
SqCore.On().PlayerMessage.Connect(function(/*SqPlayer*/ player, /*string*/ message) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerCommand
|
||||
*/
|
||||
SqCore.On().PlayerCommand.Connect(function(/*SqPlayer*/ player, /*string*/ message) {
|
||||
g_Cmd.Run(player, command); // Forward this command to the command manager
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerPrivateMessage
|
||||
*/
|
||||
SqCore.On().PlayerPrivateMessage.Connect(function(/*SqPlayer*/ player, /*SqPlayer*/ target_player, /*string*/ message) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerKeyPress
|
||||
*/
|
||||
SqCore.On().PlayerKeyPress.Connect(function(/*SqPlayer*/ player, /*SqKeybind*/ bind) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerKeyRelease
|
||||
*/
|
||||
SqCore.On().PlayerKeyRelease.Connect(function(/*SqPlayer*/ player, /*SqKeybind*/ bind) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerSpectate
|
||||
*/
|
||||
SqCore.On().PlayerSpectate.Connect(function(/*SqPlayer*/ player, /*SqPlayer*/ target_player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerUnspectate
|
||||
*/
|
||||
SqCore.On().PlayerUnspectate.Connect(function(/*SqPlayer*/ player) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerCrashreport
|
||||
*/
|
||||
SqCore.On().PlayerCrashreport.Connect(function(/*SqPlayer*/ player, /*string*/ report) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerModuleList
|
||||
*/
|
||||
SqCore.On().PlayerModuleList.Connect(function(/*SqPlayer*/ player, /*string*/ list) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ClientScriptData
|
||||
*/
|
||||
SqCore.On().ClientScriptData.Connect(function(/*SqPlayer*/ player, /*SqBuffer*/ data, /*int*/ size) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerUpdate
|
||||
*/
|
||||
SqCore.On().PlayerUpdate.Connect(function(/*SqPlayer*/ player, /*int*/ update_type) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerHealth
|
||||
*/
|
||||
SqCore.On().PlayerHealth.Connect(function(/*SqPlayer*/ player, /*float*/ old_health, /*float*/ new_health) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerArmour
|
||||
*/
|
||||
SqCore.On().PlayerArmour.Connect(function(/*SqPlayer*/ player, /*float*/ old_armour, /*float*/ new_armour) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerWeapon
|
||||
*/
|
||||
SqCore.On().PlayerWeapon.Connect(function(/*SqPlayer*/ player, /*int*/ old_weapon, /*int*/ new_weapon) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerHeading
|
||||
*/
|
||||
SqCore.On().PlayerHeading.Connect(function(/*SqPlayer*/ player, /*float*/ old_heading, /*float*/ new_heading) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerPosition
|
||||
*/
|
||||
SqCore.On().PlayerPosition.Connect(function(/*SqPlayer*/ player, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerOption
|
||||
*/
|
||||
SqCore.On().PlayerOption.Connect(function(/*SqPlayer*/ player, /*int*/ option_id, /*bool*/ value, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerAdmin
|
||||
*/
|
||||
SqCore.On().PlayerAdmin.Connect(function(/*SqPlayer*/ player, /*bool*/ old_status, /*bool*/ new_status) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerWorld
|
||||
*/
|
||||
SqCore.On().PlayerWorld.Connect(function(/*SqPlayer*/ player, /*int*/ old_world, /*int*/ new_world, /*bool*/ secondary) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerTeam
|
||||
*/
|
||||
SqCore.On().PlayerTeam.Connect(function(/*SqPlayer*/ player, /*int*/ old_team, /*int*/ new_team) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerSkin
|
||||
*/
|
||||
SqCore.On().PlayerSkin.Connect(function(/*SqPlayer*/ player, /*int*/ old_skin, /*int*/ new_skin) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerMoney
|
||||
*/
|
||||
SqCore.On().PlayerMoney.Connect(function(/*SqPlayer*/ player, /*int*/ old_money, /*int*/ new_money) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerScore
|
||||
*/
|
||||
SqCore.On().PlayerScore.Connect(function(/*SqPlayer*/ player, /*int*/ old_score, /*int*/ new_score) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerWantedLevel
|
||||
*/
|
||||
SqCore.On().PlayerWantedLevel.Connect(function(/*SqPlayer*/ player, /*int*/ old_level, /*int*/ new_level) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerImmunity
|
||||
*/
|
||||
SqCore.On().PlayerImmunity.Connect(function(/*SqPlayer*/ player, /*int*/ old_immunity, /*int*/ new_immunity) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerAlpha
|
||||
*/
|
||||
SqCore.On().PlayerAlpha.Connect(function(/*SqPlayer*/ player, /*int*/ old_alpha, /*int*/ new_alpha, /*int*/ fade) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerEnterArea
|
||||
*/
|
||||
SqCore.On().PlayerEnterArea.Connect(function(/*SqPlayer*/ player, /*SqArea*/ area) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: PlayerLeaveArea
|
||||
*/
|
||||
SqCore.On().PlayerLeaveArea.Connect(function(/*SqPlayer*/ player, /*SqArea*/ area) {
|
||||
|
||||
});
|
55
bin/demo/events/server.nut
Normal file
55
bin/demo/events/server.nut
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ServerStartup
|
||||
*/
|
||||
SqCore.On().ServerStartup.Connect(function(/*...*/) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ServerShutdown
|
||||
*/
|
||||
SqCore.On().ServerShutdown.Connect(function(/*...*/) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ServerFrame
|
||||
*/
|
||||
SqCore.On().ServerFrame.Connect(function(/*float*/ elapsed_time) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: IncomingConnection
|
||||
*/
|
||||
SqCore.On().IncomingConnection.Connect(function(/*string*/ player_name, /*int*/ name_buffer_size, /*string*/ user_password, /*string*/ ip_address) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: EntityPool
|
||||
*/
|
||||
SqCore.On().EntityPool.Connect(function(/*int*/ entity_type, /*Sq[Entity]*/ entity, /*bool*/ is_deleted) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: EntityStream
|
||||
*/
|
||||
SqCore.On().EntityStream.Connect(function(/*SqPlayer*/ player, /*Sq[Entity]*/ entity, /*int*/ entity_type, /*bool*/ is_deleted) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ServerOption
|
||||
*/
|
||||
SqCore.On().ServerOption.Connect(function(/*int*/ option, /*bool*/ value, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ScriptReload
|
||||
*/
|
||||
SqCore.On().ScriptReload.Connect(function(/*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: ScriptLoaded
|
||||
*/
|
||||
SqCore.On().ScriptLoaded.Connect(function(/*...*/) {
|
||||
|
||||
});
|
127
bin/demo/events/vehicle.nut
Normal file
127
bin/demo/events/vehicle.nut
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleCreated
|
||||
*/
|
||||
SqCore.On().VehicleCreated.Connect(function(/*SqVehicle*/ vehicle, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleDestroyed
|
||||
*/
|
||||
SqCore.On().VehicleDestroyed.Connect(function(/*SqVehicle*/ vehicle, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleCustom
|
||||
*/
|
||||
SqCore.On().VehicleCustom.Connect(function(/*SqVehicle*/ vehicle, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleStream
|
||||
*/
|
||||
SqCore.On().VehicleStream.Connect(function(/*SqPlayer*/ client, /*SqVehicle*/ vehicle, /*bool*/ is_deleted) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleExplode
|
||||
*/
|
||||
SqCore.On().VehicleExplode.Connect(function(/*SqVehicle*/ vehicle) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleRespawn
|
||||
*/
|
||||
SqCore.On().VehicleRespawn.Connect(function(/*SqVehicle*/ vehicle) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleUpdate
|
||||
*/
|
||||
SqCore.On().VehicleUpdate.Connect(function(/*SqVehicle*/ vehicle, /*int*/ update_type) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleColor
|
||||
*/
|
||||
SqCore.On().VehicleColor.Connect(function(/*SqVehicle*/ vehicle, /*int*/ changed) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleHealth
|
||||
*/
|
||||
SqCore.On().VehicleHealth.Connect(function(/*SqVehicle*/ vehicle, /*float*/ old_health, /*float*/ new_health) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehiclePosition
|
||||
*/
|
||||
SqCore.On().VehiclePosition.Connect(function(/*SqVehicle*/ vehicle) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleRotation
|
||||
*/
|
||||
SqCore.On().VehicleRotation.Connect(function(/*SqVehicle*/ vehicle) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleOption
|
||||
*/
|
||||
SqCore.On().VehicleOption.Connect(function(/*SqVehicle*/ vehicle, /*int*/ option_id, /*bool*/ value, /*int*/ header, /*object*/ payload) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleWorld
|
||||
*/
|
||||
SqCore.On().VehicleWorld.Connect(function(/*SqVehicle*/ vehicle, /*int*/ old_world, /*int*/ new_world) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleImmunity
|
||||
*/
|
||||
SqCore.On().VehicleImmunity.Connect(function(/*SqVehicle*/ vehicle, /*int*/ old_immunity, /*int*/ new_immunity) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehiclePartStatus
|
||||
*/
|
||||
SqCore.On().VehiclePartStatus.Connect(function(/*SqVehicle*/ vehicle, /*int*/ part, /*int*/ old_status, /*int*/ new_status) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleTyreStatus
|
||||
*/
|
||||
SqCore.On().VehicleTyreStatus.Connect(function(/*SqVehicle*/ vehicle, /*int*/ tyre, /*int*/ old_status, /*int*/ new_status) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleDamageData
|
||||
*/
|
||||
SqCore.On().VehicleDamageData.Connect(function(/*SqVehicle*/ vehicle, /*int*/ old_data, /*int*/ new_data) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleRadio
|
||||
*/
|
||||
SqCore.On().VehicleRadio.Connect(function(/*SqVehicle*/ vehicle, /*int*/ old_radio, /*int*/ new_radio) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleHandlingRule
|
||||
*/
|
||||
SqCore.On().VehicleHandlingRule.Connect(function(/*SqVehicle*/ vehicle, /*int*/ rule, /*float*/ old_data, /*float*/ new_data) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleEnterArea
|
||||
*/
|
||||
SqCore.On().VehicleEnterArea.Connect(function(/*SqVehicle*/ vehicle, /*SqArea*/ area) {
|
||||
|
||||
});
|
||||
/* --------------------------------------------------------------------------------------------------------------------
|
||||
* Bind to global event: VehicleLeaveArea
|
||||
*/
|
||||
SqCore.On().VehicleLeaveArea.Connect(function(/*SqVehicle*/ vehicle, /*SqArea*/ area) {
|
||||
|
||||
});
|
Reference in New Issue
Block a user