24.09.2012, 13:24
Try this
pawn Код:
{
if(PlayerInfo[playerid][pRank] == 8) {
format(string, sizeof(string), "Director %s (radio): %s, over.", sendername, result);
}
if(PlayerInfo[playerid][pRank] == 7) {
format(string, sizeof(string), "Deputy Director %s (radio): %s, over.", sendername, result);
}
if(PlayerInfo[playerid][pRank] == 6) {
format(string, sizeof(string), "Assi. Director %s (radio): %s, over.", sendername, result);
}
if(PlayerInfo[playerid][pRank] == 5) {
format(string, sizeof(string), "Division Chief %s (radio): %s, over.", sendername, result); }
if(PlayerInfo[playerid][pRank] == 4) {
format(string, sizeof(string), "Special Agent in Charge %s(radio): %s, over.", sendername, result); }
if(PlayerInfo[playerid][pRank] == 3) {
format(string, sizeof(string), "Special Agent %s(radio): %s, over.", sendername, result); }
if(PlayerInfo[playerid][pRank] == 2) {
format(string, sizeof(string), "Agent %s(radio): %s, over.", sendername, result); }
if(PlayerInfo[playerid][pRank] == 1) {
format(string, sizeof(string), "Cadet %s(radio): %s, over.", sendername, result); }
else
{
format(string, sizeof(string), "[Unknown] %s (radio): %s, over.", sendername, result);
}
ProxDetector(7.5, playerid, string,COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SentMessage[playerid] = 1;
SendRadioMessage(2, TEAM_RADIO_COLOR, string);
SendRadioMessage(pFbi, TEAM_RADIO_COLOR, string);
SentMessage[playerid] = 0;
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (radio): (%s)",d,m,y,h,mi,s, sendername, result);
RadioChatLog(string);
return 1;
}