View Full Version : Command help

11/08/2013, 10:06 PM
Hello i wounder if someone could share their knowledge and tell me how to fix this :P

The commands works fine but When i offer someone a live conference and they accept it they should be talking in this format and all players should be able to see it.
If someone could help me it would be great!! and when they end the conversation they shud be talking like regular chat

format(msg, sizeof(msg), "[LIVE-NEWS] %s: %s", GetName(playerid), params);

CMD:live(playerid, params[])
new string[128], playerb, vehicle = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pFaction] != NEWS) return SCM(playerid, COLOR_GREY,"You are not a news reporter.");
if(!PlayerInCar(playerid)) return NotInNewsCarMSG(playerid);
if(!IsANEWSCar(vehicle)) return SCM(playerid, COLOR_INFO, "You are not in a News vehicle");
foreach(Player, i)
if(Live[i] && i != playerid) playerb = i;
Live[playerid] = 0;
Live[playerb] = 0;
LiveConference = 0;
SendClientMessage(playerid, COLOR_LIGHTRED, "You have ended the live news conference.");
SendClientMessage(playerb, COLOR_LIGHTRED, "The live news conference has ended.");
if(LiveRequest[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You have already offered someone a live news conference.");
if(LiveConference) return SendClientMessage(playerid, COLOR_GREY, "Another live news conference is already being held.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /live [playerid]");
if(playerb == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't offer yourself to a live news conference.");
if(LiveBy[playerb] != -1) return SendClientMessage(playerid, COLOR_GREY, "Player has been already offered a live news conference.");
LiveBy[playerb] = playerid;
LiveRequest[playerid] = 1;
format(string, sizeof(string), " You have offered %s a live news conference.", RPN(playerb));
SendClientMessage(playerid, COLOR_LIME, string);
format(string, sizeof(string), " News Reporter %s has offered you a live news conference. (/accept live) (/cancel live)", RPN(playerid));
SendClientMessage(playerb, COLOR_LIME, string);
return 1;

Here is the one in accept live

if(CompareStrings(option, "live"))
new playerb = LiveBy[playerid];
if(playerb == -1) return SendClientMessage(playerid, COLOR_GREY, "Nobody has offered you a live news conference.");
LiveBy[playerid] = -1;
LiveRequest[playerb] = 0;
Live[playerid] = 1;
Live[playerb] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are now on air, you can speak on live news using your normal chat.");
SendClientMessage(playerb, COLOR_LIGHTBLUE, "You are now on air, you can speak on live news using your normal chat. (/live to end the conference)");
return 1;