Radio Command Help
#1

(9895) : error 029: invalid expression, assumed zero
(9895) : error 001: expected token: ";", but found "if"
(9897) : error 029: invalid expression, assumed zero
(9897) : error 001: expected token: ";", but found "if"



Код:
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);}
	SendPlayerFactionMessage(playerid, 0, COLOR_RADIO, string);
	else if (!IsAGov(playerid)) {format(string, sizeof(string), "** %s %s: %s", RPFRN(playerid), RPN(playerid), params);}
	SendPlayerFactionMessage(playerid, 0, COLOR_GREEN, string);
	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;
}
Reply


Messages In This Thread
Radio Command Help - by Adam_Hardy - 16.08.2012, 17:26
Re : Radio Command Help - by Adam_Hardy - 16.08.2012, 18:22

Forum Jump:


Users browsing this thread: 2 Guest(s)