Help Please :D
#5

Quote:
Originally Posted by irinel1996
Посмотреть сообщение
To be honest, I think everything looks OK, give a try:
pawn Код:
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) && !IsAArmy(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer/Government Official.");
    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", RPFDN(playerid), RPFRN(playerid), RPN(playerid), params);
    }
    else if (!IsACop(playerid)) {
        format(string, sizeof(string), "** %s %s: %s", RPFRN(playerid), RPN(playerid), params);
    }
    else if (!IsAGov(playerid)) {
        format(string, sizeof(string), "** %s %s: %s", RPFRN(playerid), RPN(playerid), params);
    }
    else if (!IsAArmy(playerid)) {
        format(string, sizeof(string), "** %s %s: %s", RPFRN(playerid), RPN(playerid), params);
    }
    SendPlayerFactionMessage(playerid, 0, COLOR_ARMY, string);
    if(IsACop(playerid)) Log("logs/SAPD.log", string);
    else if(IsAGov(playerid)) Log ("logs/GOV.log", string);
    else if(IsAArmy(playerid)) Log ("logs/ARMY.log", string);
    return 1;
}
Ahh, by the way, if you change sizeof(string) to 128, would be better, better optimisation.

dude i want each faction radio with its color like NGRP
Reply


Messages In This Thread
Help Please :D - by Adam_Hardy - 17.08.2012, 12:22
Re: Help Please :D - by Admigo - 17.08.2012, 13:03
Re : Help Please :D - by Adam_Hardy - 17.08.2012, 13:45
Re: Help Please :D - by [DOG]irinel1996 - 17.08.2012, 13:50
Re : Re: Help Please :D - by Adam_Hardy - 17.08.2012, 13:55
Re: Help Please :D - by [DOG]irinel1996 - 17.08.2012, 14:02
Re : Re: Help Please :D - by Adam_Hardy - 17.08.2012, 14:06
Re: Help Please :D - by [DOG]irinel1996 - 17.08.2012, 14:07
Re : Help Please :D - by Adam_Hardy - 17.08.2012, 14:38

Forum Jump:


Users browsing this thread: 2 Guest(s)