Always "Talking Live"
#1

I'm always talking live...



Then when I join SANews and type /live the "Live Conversation Ends".
So pretty much by default all players are talking live, help please!

pawn Код:
CMD:live(playerid, params[]) {
    if(AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] < 4)
        return SendClientMessage(playerid,COLOR_WHITE, "You can't use this command while on-duty as admin.");

    if(PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9) {
        if(shutdown == 1) return SendClientMessage(playerid, COLOR_WHITE, "The news system is currently shut down." );
        if(TalkingLive[playerid] != INVALID_PLAYER_ID) {
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Live conversation ended.");
            SendClientMessage(TalkingLive[playerid], COLOR_LIGHTBLUE, "* Live conversation ended.");
            TogglePlayerControllable(playerid, 1);
            TogglePlayerControllable(TalkingLive[playerid], 1);
            TalkingLive[TalkingLive[playerid]] = INVALID_PLAYER_ID;
            TalkingLive[playerid] = INVALID_PLAYER_ID;
            return 1;
        }

        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /live [player]");

        if (IsPlayerConnected(giveplayerid)) {
            if (ProxDetectorS(5.0, playerid, giveplayerid)) {
                if(PlayerInfo[giveplayerid][pLiveBanned] == 1) return SendClientMessage(playerid, COLOR_GREY, "That player is interview banned.");
                if(PlayerCuffed[giveplayerid] >= 1 || PlayerCuffed[playerid] >= 1) {
                    SendClientMessage(playerid, COLOR_GRAD2, "You are unable to do this right now.");
                } else {
                    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot talk live with yourself!"); return 1; }
                    format(string, sizeof(string), "* You offered %s to have a live conversation.", GetPlayerNameEx(giveplayerid));
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "* %s offered you to have a live conversation, type /accept live to accept.", GetPlayerNameEx(playerid));
                    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                    LiveOffer[giveplayerid] = playerid;
                }
            } else return SendClientMessage(playerid, COLOR_GREY, "That player isn't near you.");
        } else return SendClientMessage(playerid, COLOR_GREY, "Invalid player specified.");
    } else SendClientMessage(playerid, COLOR_GREY, "   You are not a News Reporter!");
    return 1;
}
pawn Код:
if(TalkingLive[playerid] != INVALID_PLAYER_ID) {
        if(PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9) {
            format(string, sizeof(string), "Live News Reporter %s: %s", GetPlayerNameEx(playerid), text);
            ICNews(COLOR_LIGHTGREEN,string);
        } else {
            format(string, sizeof(string), "Live Interview Guest %s: %s", GetPlayerNameEx(playerid), text);
            ICNews(COLOR_LIGHTGREEN,string);
        }
        return 0;
    }
Reply


Messages In This Thread
Always "Talking Live" - by Grooty - 08.09.2013, 15:55
Re: Always "Talking Live" - by Jstylezzz - 08.09.2013, 16:33
Re: Always "Talking Live" - by Grooty - 08.09.2013, 16:39
Re: Always "Talking Live" - by Luis- - 08.09.2013, 16:41
Re: Always "Talking Live" - by Grooty - 08.09.2013, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)