Custom radio message problem
#1

I have a police radio script on my Cops'N'Robbers server that works fine with /r [message].
But im trying to script a custom message script with /dr [message], but that isn't working, i would like it to show like: "Dispatch: (text)".
But the normal radio works like this: "(faction which is LSPD) (name): (text)".
And the dispatch message comes out like this: "Dispatch: (name)".

Basically, instead of showing the text, it shows the name of the player that uses it, which is me.
So how do i switch it to say the text i put in?

Код:
CMD:dr(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) && !IsAHp(playerid) && !IsAFBI(playerid) && !IsALSEMS(playerid) && !IsAHSF(playerid) && !IsASWAT(playerid) && !IsASATF(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LSPD/Government/FBI/LSEMS/HSF Officer.");
	if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dr [text]");
	//if(AntiAdv(playerid, params)) return 1;
	if(PlayerInfo[playerid][pFacDiv]){format(string, sizeof(string), "** Dispatch: %s", NORPN(playerid), params);}
	else {format(string, sizeof(string), "** Dispatch: %s", NORPN(playerid), params);}
	SendPlayerFactionMessage(playerid, 0, COLOR_RADIO, string);
	if(IsACop(playerid)) Log("logs/SAPD.log", string);
	else if(IsAGov(playerid)) Log ("logs/GOV.log", string);
	else if(IsAFBI(playerid)) Log ("logs/FBI.log", string);
	else if(IsALSEMS(playerid)) Log ("logs/LSEMS.log", string);
	else if(IsAHSF(playerid)) Log ("logs/HSF.log", string);
	else if(IsASWAT(playerid)) Log ("logs/SWAT.log", string);
	else if(IsASATF(playerid)) Log ("logs/SATF.log", string);
	return 1;
}
Reply


Messages In This Thread
Custom radio message problem - by CalvinC - 22.11.2014, 15:36
Re: Custom radio message problem - by Ryz - 22.11.2014, 15:48
Re: Custom radio message problem - by Capua - 22.11.2014, 15:50
Re: Custom radio message problem - by CalvinC - 22.11.2014, 16:09

Forum Jump:


Users browsing this thread: 2 Guest(s)