07.11.2012, 04:32
Honestly your one gave the same errors anyhow i fixed it doing something like this.
Код:
CMD:r(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!IsACop(playerid) && !IsAGov(playerid) && !IsAFBI(playerid) && !IsAMedic(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not in a faction!"); if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: (/r)adio [text]"); if(AntiAdv(playerid, params)) return 1; if(PlayerInfo[playerid][pFacDiv]){format(string, sizeof(string), "** [%s] %s %s: %s, over.", RPFDN(playerid), RPFRN(playerid), RPN(playerid), params);} format(string, sizeof(string), "** %s %s: %s, over.", RPFRN(playerid), RPN(playerid), params); if(PlayerInfo[playerid][pFac] == 1) SendPlayerFactionMessage(playerid, 0, COLOR_BBLUE, string); else if(PlayerInfo[playerid][pFac] == 6) SendPlayerFactionMessage(playerid, 0, COLOR_FBIRADIO, string); else if(PlayerInfo[playerid][pFac] == 4) SendPlayerFactionMessage(playerid, 0, COLOR_ORANGE, string); else if(PlayerInfo[playerid][pFac] == 5) SendPlayerFactionMessage(playerid, 0, COLOR_MEDICC, string); return 1; }