Team Errors. Please help!
#7

You're doing bad in your code.
Remove ; from those stocks


pawn Код:
stock SetPlayerTeamFromClass(playerid, classid) // line 700
{
    switch(classid)
    {
        case 0..7: gTeam[playerid] = TEAM_COPS;
        case 8..57: gTeam[playerid] = TEAM_CIVILIAN;
    }
}

stock SetPlayerToTeamColour(playerid)
{
    switch(gTeam[playerid])
    {
        case TEAM_COPS: SetPlayerColor(playerid, COPS_COLOR);
        case TEAM_CIVILIAN: SetPlayerColor(playerid, CIVIL_COLOR);
    }
}
Remove the parameter classid from the function SetPlayerTeamToColour and this must be just like this since you're defining all in the stocks

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1553.0560,-1360.1155,329.4693);
    SetPlayerCameraPos(playerid, 1546.7925,-1360.0486,329.4628);
    SetPlayerCameraLookAt(playerid, 1546.7925,-1360.0486,329.4628);
    SetPlayerFacingAngle(playerid, 90);
    SetPlayerTeamFromClass(playerid, classid); // Line 224
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColour(playerid); // Line 488
    return 1;
}
Reply


Messages In This Thread
Team Errors. Please help! - by Th3UnKnOwN - 29.12.2014, 20:32
Re: Team Errors. Please help! - by SickAttack - 29.12.2014, 20:42
Re: Team Errors. Please help! - by Th3UnKnOwN - 29.12.2014, 20:51
Re: Team Errors. Please help! - by SickAttack - 29.12.2014, 21:28
Re: Team Errors. Please help! - by ikkentim - 29.12.2014, 22:43
Re: Team Errors. Please help! - by Th3UnKnOwN - 02.01.2015, 03:44
Re: Team Errors. Please help! - by UploaD - 02.01.2015, 05:23

Forum Jump:


Users browsing this thread: 2 Guest(s)