28.12.2012, 06:39
What is the difference between return 0; and return 1; ?
MyGateIsOpen = 1; //It is open
if(MyGateIsOpen == 1)
{
CloseGate;
MyGateIsOpen = 0; //It is now closed or false (without the use of booleans)
//...
public OnPlayerSpawn(playerid)
{
return 1; //The player has spawned
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 12) return 0; //Do not spawn player, player spawned with class = false
return 1; //Else let them spawn by returning 1
}