01.07.2011, 14:59
You have two else statements around line 84. I'm not sure exactly what line 84 is, but from what I can see the statement which reads:
else
{
gTeam[playerid] = TEAM_BALLA;
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
Needs to be changed too
else if(classid == 2)
{
gTeam[playerid] = TEAM_BALLA;
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
Because right now, when you have two else-statements they are both going to take effect under the same circumstances, meaning that your system won't function properly.
All together it should look like:
else
{
gTeam[playerid] = TEAM_BALLA;
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
Needs to be changed too
else if(classid == 2)
{
gTeam[playerid] = TEAM_BALLA;
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
Because right now, when you have two else-statements they are both going to take effect under the same circumstances, meaning that your system won't function properly.
All together it should look like:
Code:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 2531.1123,-899.7438,86.4038,183.2012); SetPlayerCameraPos(playerid, 2535.2781,-914.8342,86.3623,18.3863); SetPlayerCameraLookAt(playerid, 2531.1123,-899.7438,86.4038,183.2012); if(classid == 1) { gTeam[playerid] = TEAM_GROVE; SetPlayerColor(playerid, TEAM_GROVE_COLOR); } else if(classid == 2) { gTeam[playerid] = TEAM_BALLA; SetPlayerColor(playerid, TEAM_BALLA_COLOR); } else { gTeam[playerid] = TEAM_VAGOS; SetPlayerColor(playerid, TEAM_VAGOS_COLOR); } return 1; }