Something
public text v1 · immutableHere is how to call another function in the script.
Public OnPlayerSpawn(playerid)
{
SetPlayerRandomStartSpawn(playerid);
}
//Now here is the other function...Put this at the end of a function
public SetPlayerRandomStartSpawn(playerid)
{
new rand = random(sizeof(gRandomSpawns));
SetPlayerPos(playerid, gRandomSpawns[rand][0], gRandomSpawns[rand][1], gRandomSpawns[rand][2]); // Warp the player to starting place
return 1;
}
Then you simply refer to another function.