This page contains a list of all the callbacks available in SA:MP. Callbacks are triggered when an event happens, which is related to the name of the callback (e.g. OnPlayerSpawn is called when a player spawns). Callbacks also carry relevant values as parameters, for example; many callbacks have 'playerid' as a parameter to indicate the player for whom the event occurred.
NOTE: For certain callbacks, the value that is returned by the callback ('return x;') determines whether the callback will continue to be called in other scripts. For example; OnPlayerCommandText requires 0 to be returned if a command isn't found, so that the callback will search through the other loaded scripts for an existing command. Returning 1 signals that the command has been found and the callback does not require calling in other scripts. This is different for other callbacks such as OnPlayerConnect, in which 1 must be returned for it to be called in other scripts. This is not the case for any other callback.
Pages in category "Scripting Callbacks"
The following 78 pages are in this category, out of 78 total.
N
- NPC:OnClientMessage
- NPC:OnNPCConnect
- NPC:OnNPCDisconnect
- NPC:OnNPCEnterVehicle
- NPC:OnNPCExitVehicle
- NPC:OnNPCModeExit
- NPC:OnNPCModeInit
- NPC:OnNPCSpawn
- NPC:OnPlayerDeath
- NPC:OnPlayerStreamIn
- NPC:OnPlayerStreamOut
- NPC:OnPlayerText
- NPC:OnRecordingPlaybackEnd
- NPC:OnVehicleStreamIn
- NPC:OnVehicleStreamOut
O
- OnActorStreamIn
- OnActorStreamOut
- OnDialogResponse
- OnEnterExitModShop
- OnFilterScriptExit
- OnFilterScriptInit
- OnGameModeExit
- OnGameModeInit
- OnIncomingConnection
- OnObjectMoved
- OnPlayerClickMap
- OnPlayerClickPlayer
- OnPlayerClickPlayerTextDraw
- OnPlayerClickTextDraw
- OnPlayerCommandText
- OnPlayerConnect
- OnPlayerDeath
- OnPlayerDisconnect
- OnPlayerEditAttachedObject
- OnPlayerEditObject
- OnPlayerEnterCheckpoint
- OnPlayerEnterRaceCheckpoint
- OnPlayerEnterVehicle
- OnPlayerExitedMenu
- OnPlayerExitVehicle
- OnPlayerFinishedDownloading
- OnPlayerGiveDamage
- OnPlayerGiveDamageActor
- OnPlayerInteriorChange
- OnPlayerKeyStateChange
- OnPlayerLeaveCheckpoint
- OnPlayerLeaveRaceCheckpoint
- OnPlayerObjectMoved
- OnPlayerPickUpPickup
- OnPlayerPrivmsg
- OnPlayerRequestClass
- OnPlayerRequestDownload
- OnPlayerRequestSpawn
- OnPlayerSelectedMenuRow
- OnPlayerSelectObject
- OnPlayerSpawn
- OnPlayerStateChange
- OnPlayerStreamIn
- OnPlayerStreamOut
- OnPlayerTakeDamage
- OnPlayerTeamPrivmsg
- OnPlayerText
- OnPlayerUpdate
- OnPlayerWeaponShot
- OnRconCommand
- OnRconLoginAttempt
- OnTrailerUpdate
- OnUnoccupiedVehicleUpdate
- OnVehicleDamageStatusUpdate
- OnVehicleDeath
- OnVehicleMod
- OnVehiclePaintjob
- OnVehicleRespray
- OnVehicleSirenStateChange
- OnVehicleSpawn
- OnVehicleStreamIn
- OnVehicleStreamOut