19.08.2012, 08:18
Hi. Why some callback's is return by return 0; ? like i found in one gm:
And why here need return?
And when need return 0; or just return in my own callbacks? when i settimer and forward it...
Code:
public OnPlayerDisconnect(playerid)
{
if(gPlayerVehicles[playerid]) {
// Make sure their vehicle is destroyed when they leave.
DestroyVehicle(gPlayerVehicles[playerid]);
gPlayerVehicles[playerid] = 0;
}
return 0;
}
Code:
public OnPlayerRequestClass(playerid, classid)
{
// put them straight into observer mode, effectively
// bypassing class selection.
TogglePlayerSpectating(playerid,1);
ObserverSwitchToNextVehicle(playerid);
TextDrawShowForPlayer(playerid, txtObsHelper);
// also force this dud spawn info upon them so that they
// have spawn information set.
SetSpawnInfo(playerid,0,0,
gSpawnPositions[playerid][0],
gSpawnPositions[playerid][1],
gSpawnPositions[playerid][2],
gSpawnPositions[playerid][3],
-1,-1,-1,-1,-1,-1);
return 0;
}
Code:
stock GetPlayerNameEx( playerid )
{
new
Name[ MAX_PLAYER_NAME ]
;
GetPlayerName( playerid,Name,MAX_PLAYER_NAME );
return Name;
}


)