Jump to content

Cerere ajutor


Robi AL
 Share

Recommended Posts

Deci am si eu comenzile astea pentru factiunea news reporters si cand dau live cuiva si scriu [/startq] sau [/stopq] sau[ /question] sau [/acceptq], imi spune ca nu e nici un live. Oricarui player daca foloseste comnezile astea le spune ca nu este nici un live, va rog ajutati-ma.

 

 

Astea ar fi comenzile: http://pastebin.com/jcrid5EM

Edited by RobyAL
Link to comment
Share on other sites

O sa par cam nab acum, dar cum fac asta ?

 

Pui la început de tot [] (scri code intre ele) și la final de tot pui [] ( scri /code intre ele )

MD:acceptq(playerid, params[])

{

    new id, szMessage[256];

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)

    {

        if(startq == 0) return SCM(playerid, COLOR_TEAL, "Intrebarile nu sunt deschise.");

        if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "EXEMPLU:/acceptq [playerid]");

        format(szMessage, sizeof(szMessage), "Intrebare de la %s: %s", PlayerInfo[id][pNormalName], PlayerInfo[id][pLive]);

        OOCNews(COLOR_LIGHTGREEN, szMessage);

    }

    else return SCM(playerid, COLOR_WHITE, "Nu faci parte din news reporters.");

    return 1;

}

CMD:question(playerid, params[])

{

    new szMessage[256];

    if(PlayerInfo[playerid][pLevel] == 1) return SCM(playerid, COLOR_NEWS, "Nu poti pune o intrebare daca nu ai level 2.");

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(startq == 1)

    {

        if(sscanf(params, "s[128]", params)) return SCM(playerid, COLOR_WHITE, "EXEMPLU:/question <intrebare>");

        format(szMessage, sizeof(szMessage), "*Intrebare de la %s(%d): %s", PlayerInfo[playerid][pNormalName], playerid, params);

        SendFamilyMessage(9, COLOR_TEAL, szMessage);

        format(szMessage, sizeof(szMessage), "Ai trimis intrebarea, asteapta un reporter sa ti-o accepte!");

        SCM(playerid, COLOR_TEAL, szMessage);

        format(PlayerInfo[playerid][pLive],128,params);

    }

    else return SCM(playerid, COLOR_TEAL, "Reporterul nu poate primi intrebari momentan.");

    return 1;

}

CMD:startq(playerid, params[])

{

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)

    {

        startq = 1;

        SCM(playerid, COLOR_NEWS, "Acum poti primi intrebari. Foloseste /stopq pentru a opri intrebarile.");

    }

    return 1;

}

CMD:stopq(playerid, params[])

{

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)

    {

        startq = 0;

        SCM(playerid, COLOR_NEWS, "Nu mai poti primi intrebari.");

        foreach(Player, i)

        {

            PlayerInfo[i][pLive] = 0;

        }

    }

    return 1;

}
Link to comment
Share on other sites

Pui la început de tot [] (scri code intre ele) și la final de tot pui [] ( scri /code intre ele )

MD:acceptq(playerid, params[])

{

    new id, szMessage[256];

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)

    {

        if(startq == 0) return SCM(playerid, COLOR_TEAL, "Intrebarile nu sunt deschise.");

        if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "EXEMPLU:/acceptq [playerid]");

        format(szMessage, sizeof(szMessage), "Intrebare de la %s: %s", PlayerInfo[id][pNormalName], PlayerInfo[id][pLive]);

        OOCNews(COLOR_LIGHTGREEN, szMessage);

    }

    else return SCM(playerid, COLOR_WHITE, "Nu faci parte din news reporters.");

    return 1;

}

CMD:question(playerid, params[])

{

    new szMessage[256];

    if(PlayerInfo[playerid][pLevel] == 1) return SCM(playerid, COLOR_NEWS, "Nu poti pune o intrebare daca nu ai level 2.");

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(startq == 1)

    {

        if(sscanf(params, "s[128]", params)) return SCM(playerid, COLOR_WHITE, "EXEMPLU:/question <intrebare>");

        format(szMessage, sizeof(szMessage), "*Intrebare de la %s(%d): %s", PlayerInfo[playerid][pNormalName], playerid, params);

        SendFamilyMessage(9, COLOR_TEAL, szMessage);

        format(szMessage, sizeof(szMessage), "Ai trimis intrebarea, asteapta un reporter sa ti-o accepte!");

        SCM(playerid, COLOR_TEAL, szMessage);

        format(PlayerInfo[playerid][pLive],128,params);

    }

    else return SCM(playerid, COLOR_TEAL, "Reporterul nu poate primi intrebari momentan.");

    return 1;

}

CMD:startq(playerid, params[])

{

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)

    {

        startq = 1;

        SCM(playerid, COLOR_NEWS, "Acum poti primi intrebari. Foloseste /stopq pentru a opri intrebarile.");

    }

    return 1;

}

CMD:stopq(playerid, params[])

{

    if(startlive == 0) return SCM(playerid, COLOR_WHITE, "Nu este nici un live");
    if(startlive == 1) 

    if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)

    {

        startq = 0;

        SCM(playerid, COLOR_NEWS, "Nu mai poti primi intrebari.");

        foreach(Player, i)

        {

            PlayerInfo[i][pLive] = 0;

        }

    }

    return 1;

}

Asta ar fi rezolvarea?

 

Link to comment
Share on other sites

 else if(strcmp(x_job,"live",true) == 0)
        {
            if(LiveOffer[playerid] < 999)
            {
                if(LiveOffer[playerid] != id) return SCM(playerid,COLOR_WHITE,"This player has not offered you live.");
                if(IsPlayerConnected(LiveOffer[playerid]))
                {
                    if (ProxDetectorS(5.0, playerid, LiveOffer[playerid]))
                    {
                        new strs[128],namee[30];
                        GetPlayerName(playerid, namee, sizeof(namee));
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are now in a live interview! Respect the rules or you will get kicked!");
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Everything you say will be seen by everyone on the server!");
                        SendClientMessage(playerid, COLOR_DARKPINK, "Ai primit freeze. Te vei putea misca dupa ce se va termina live-ul.");
                        format(strs,sizeof(strs),"%s accepted live interview.", namee);
                        SendClientMessage(LiveOffer[playerid], COLOR_LIGHTBLUE, strs);
                        SendClientMessage(LiveOffer[playerid], COLOR_DARKPINK, "Ai primit freeze. Te vei putea misca dupa ce vei termina live-ul.");
                        TogglePlayerControllable(playerid, 0);
                        TogglePlayerControllable(LiveOffer[playerid], 0);
                        TalkingLive[playerid] = 1;
                        TalkingLive[LiveOffer[playerid]] = 1;
                        LiveOffer[playerid] = 999;
                        startlive = 1;
                        return 1;
                    }
                    else return SendClientMessage(playerid, COLOR_WHITE, "You are to far away from the News Reporter.");
                }
                else return SendClientMessage(playerid, COLOR_WHITE, "Error: Player not connected.");
            }
            else return SendClientMessage(playerid, COLOR_WHITE, "No-one gave you a live conversation offer.");
        }

Rezolvarea.

Link to comment
Share on other sites

 else if(strcmp(x_job,"live",true) == 0)
        {
            if(LiveOffer[playerid] < 999)
            {
                if(LiveOffer[playerid] != id) return SCM(playerid,COLOR_WHITE,"This player has not offered you live.");
                if(IsPlayerConnected(LiveOffer[playerid]))
                {
                    if (ProxDetectorS(5.0, playerid, LiveOffer[playerid]))
                    {
                        new strs[128],namee[30];
                        GetPlayerName(playerid, namee, sizeof(namee));
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are now in a live interview! Respect the rules or you will get kicked!");
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Everything you say will be seen by everyone on the server!");
                        SendClientMessage(playerid, COLOR_DARKPINK, "Ai primit freeze. Te vei putea misca dupa ce se va termina live-ul.");
                        format(strs,sizeof(strs),"%s accepted live interview.", namee);
                        SendClientMessage(LiveOffer[playerid], COLOR_LIGHTBLUE, strs);
                        SendClientMessage(LiveOffer[playerid], COLOR_DARKPINK, "Ai primit freeze. Te vei putea misca dupa ce vei termina live-ul.");
                        TogglePlayerControllable(playerid, 0);
                        TogglePlayerControllable(LiveOffer[playerid], 0);
                        TalkingLive[playerid] = 1;
                        TalkingLive[LiveOffer[playerid]] = 1;
                        LiveOffer[playerid] = 999;
                        startlive = 1;
                        return 1;
                    }
                    else return SendClientMessage(playerid, COLOR_WHITE, "You are to far away from the News Reporter.");
                }
                else return SendClientMessage(playerid, COLOR_WHITE, "Error: Player not connected.");
            }
            else return SendClientMessage(playerid, COLOR_WHITE, "No-one gave you a live conversation offer.");
        }

Rezolvarea.

 

Mersi mult de tot.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.