02.01.2015, 05:23
You're doing bad in your code.
Remove ; from those stocks
Remove the parameter classid from the function SetPlayerTeamToColour and this must be just like this since you're defining all in the stocks
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);
}
}
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;
}