11.02.2014, 10:50
Код:
Код HTML:CMD:radio(playerid, params[]) { new string[128]; if(sscanf(params, "s[80]", params)) return SendClientMessage(playerid, -1, "USAGE: /radio [text]"); if(!PInfo[playerid][pCop]) return SendClientMessage(playerid, COLOR_RED, "Officers only."); new name[24]; format(string, sizeof(string), "(Radio) %s: %s",PlayerName(playerid),params); NearMessageSender(playerid, 7, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY); GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string), "[Radio] %s %s: %s, over.",copLevel(playerid), PlayerName(playerid),params); foreach(Player, i) { if(PInfo[i][pCop]) { SendClientMessage(i, COLOR_GREY, string); } } return 1; }
So like the playerid can only see the radio text once since he wrote something, so it wont show up twice?
Код HTML:
format(string, sizeof(string), "(Radio) %s: %s",PlayerName(playerid),params); NearMessageSender(playerid, 7, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);