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
#2

Try adding this under OnPlayerConnect:
pawn Код:
TalkingLive[playerid] = 0;
Reply
#3

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
Try adding this under OnPlayerConnect:
pawn Код:
TalkingLive[playerid] = 0;
It's not fixed :\
Thanks for replying!
Reply
#4

Try this;
pawn Код:
TalkingLive[playerid] = INVALID_PLAYER_ID;
On OnPlayerConnect.
Reply
#5

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Try this;
pawn Код:
TalkingLive[playerid] = INVALID_PLAYER_ID;
On OnPlayerConnect.
Fixed, thanks!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)