Scripting Callbacks FR
From SA-MP Wiki
(Difference between revisions)
Revision as of 16:30, 5 January 2013 Connor Mead (Talk | contribs) ← Previous diff |
Revision as of 17:23, 5 January 2013 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | {{ScriptingFR}} | ||
- | This page contains an overview of all the callbacks available in SA:MP. Callbacks are called in the script by the server when something important happens, something closely related to the name of the callback (e.g. OnPlayerSpawn is called when a player spawns). Most callbacks have playerid as a parameter to indicate the player for whom the event occurred however not all do (as some aren't relevant to a player). | ||
- | |||
- | |||
- | '''Important''': When using these callbacks in a filterscript, make sure you '''return 1''', so it's available in other filterscripts too. When you don't return a value or return 0, other callbacks in filterscripts loaded at a later time aren't executed. | ||
- | |||
- | Returning a value doesn't matter in [[OnFilterScriptInit_FR|OnFilterScriptInit]] and [[OnFilterScriptExit_FR|OnFilterScriptExit]]. | ||
- | |||
- | [[OnPlayerCommandText_FR|OnPlayerCommandText]] uses the opposite: 1 is indicating "''command found''" to all scripts, 0 will show "''Unknown Command''". | ||
- | |||
- | [[Category:Scripting Documentation_FR]] |