04.12.2009, 17:20
Quote:
Originally Posted by mavtias
Quote:
You are smart, because If you do not return 1; the code will repeat itself, in most cases. So add return 1; ![]() |
In callbacks (events) some returns have an important value as it tells the Pawn VM what to do like allow other scripts to process the same callback or like in texts it controls if or not you see the message:
pawn Код:
@ OnPlayerCommandText(......)
{
return 1; //no message, the command is processed
return 0; //SUC message, the command wasn't valid or was unable to be processed
}
@ OnPlayerText(......)
{
return 1; //message, the chat is processed
return 0; //no message, this script won't process the chat
}