Category:Scripting Callbacks

From Indian Ocean Roleplay Wiki
Jump to navigation Jump to search

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.

This category currently contains no pages or media.