27.07.2012, 15:41
pawn Код:
//Insert this
new team[32];
switch(PlayerInfo[playerid][team]) {
case TEAM_ME:
{
team = "Team medic";
break;
}
case TEAM_SE:
{
team = "Team security";
break;
}
case TEAM_TE:
{
team = "Team terrorists";
break;
}
default:
{
team = "No team";
}
}
format(str, sizeof(str), "Name:[ %s ]\nLevel:[ %d ]\nMoney: [ %d ]\nCurrent gun: [ %s ]", name, score, money, current_gun);
//to
format(str, sizeof(str), "Name:[ %s ]\nLevel:[ %d ]\nMoney: [ %d ]\nCurrent gun: [ %s ]\nFraction: [ %s ]", name, score, money, current_gun, team);
I assume you have in playerinfo field which is enum for team. But I'm not 100% certain. Also if you have exact name team, then you'll get error about shadowing variable