02.02.2014, 18:12
In custom callbacks is not necessary to return values and it's not actually necessary to return a value to some of the callbacks (by samp) either.
You may see in SA-MP Wiki in some callbacks to say "This callback does not handle returns." and some other say what happens if we return a specific value. Let's take an example of OnPlayerCommandText callback. SA-MP Wiki says:
Returning 0 in some callbacks stops those callbacks from being called in other modes such as filterscripts etc.
Another example is OnPlayerText callback and returning 0 will disable the default chat.
You may see in SA-MP Wiki in some callbacks to say "This callback does not handle returns." and some other say what happens if we return a specific value. Let's take an example of OnPlayerCommandText callback. SA-MP Wiki says:
Quote:
Returning 0 informs the server that the command hasn't been processed by this script. OnPlayerCommandText will be called in other scripts until one returns 1. |
Another example is OnPlayerText callback and returning 0 will disable the default chat.