13.01.2012, 11:35
You need to set 'return true/false' only if you are using the value that you get from 'returns'.
Example:
Example:
pawn Код:
//Some stock: (It can be a callback too..)
stock DoSomethingTo(playerid)
{
if(!IsPlayerConnected(playerid)) return false;
SetPlayerBlaBla(...);
SetPlayerOther(...);
//...
return true;
}
//In this case, the stock will return true after executing your functions
//and making changes to a player.
//If the player isn't connected, it returns false.
//Now, you can make use of the returned value:
if(!DoSomethingTo(targetplayer)) SendClientMessage(playerid, -1, "Sorry, the player isn't connected.");
else SendClientMessage(playerid, -1, "Changes has taken place successfully!");