27.11.2011, 15:20
Hi i am getting this error when i want to give a spawn message can you help me ?
public OnPlayerSpawn(playerid)
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
SetPlayerToTeamColour(playerid);
return 1;
}
if(team[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You are a civillian try to survive the apocalypse");
}
if(team[playerid] == 2)
{
SendClientMessage(playerid, COLOR_WHITE, "You are a zombie try to kill the civillians");
return 1;
}
Getting error at if(team[playerid] == 2) and if(team[playerid] == 1) and return 1; ((invalid function or declaration)) dont know what to replace it with
public OnPlayerSpawn(playerid)
{
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
SetPlayerToTeamColour(playerid);
return 1;
}
if(team[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You are a civillian try to survive the apocalypse");
}
if(team[playerid] == 2)
{
SendClientMessage(playerid, COLOR_WHITE, "You are a zombie try to kill the civillians");
return 1;
}
Getting error at if(team[playerid] == 2) and if(team[playerid] == 1) and return 1; ((invalid function or declaration)) dont know what to replace it with