05.04.2014, 05:44
Try this one
pawn Код:
CMD:hbadge(playerid, params[]) {
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4) {
if(isnull(params)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hbadge [faction]");
SendClientMessage(playerid, COLOR_GRAD3, "|0 Normal |1 LSPD |2 FBI |3 LSFMD ");
}
else switch(strval(params)) {
case 0: {
SendClientMessage(playerid, COLOR_WHITE, "You have set your badge back to normal.");
SetPlayerColor(playerid,TEAM_HIT_COLOR);
}
case 1: {
SendClientMessage(playerid, COLOR_WHITE, "You have set your badge to LSPD.");
SetPlayerColor(playerid,TEAM_BLUE_COLOR);
}
case 2: {
SendClientMessage(playerid, COLOR_WHITE, "You have set your badge to FBI.");
SetPlayerColor(playerid,TEAM_FBI_COLOR);
}
case 3: {
SendClientMessage(playerid, COLOR_WHITE, "You have set your badge to LSFMD.");
SetPlayerColor(playerid, TEAM_MED_COLOR);
}
default: SendClientMessage(playerid, COLOR_GREY, "Invalid faction specified.");
}
}
return 1;
}