04.10.2015, 17:14
The use of the variable "pName" is totally wrong.
pawn Код:
stock SetPlayerTeamFromClass(playerid, classid)
{
new pName[MAX_PLAYER_NAME];
if(classid >= 0 && classid <= 2) strcat(pName, TEAM_NANANG);
else if(classid >= 3 && classid <= 5) strcat(pName, TEAM_FIERRO);
else if(classid >= 6 && classid <= 8) strcat(pName, TEAM_TRIAD);
else if(classid >= 9 && classid <= 11) strcat(pName, TEAM_BIKER);
else if(classid >= 12 && classid <= 14) strcat(pName, TEAM_MAFIA);
else if(classid >= 14 && classid <= 17) strcat(pName, TEAM_ARMY);
return pName;
}