Jump to content

Question

Posted

Salut, am o comanda de quest, dar cand dau /aq add 50, adica sa adauge obiectele pentru quest.. nu merge, /aq add nu merge, rezolvare?

Aici comanda!

CMD:aq(playerid, params[])
{
    if(pInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_DARKGRAY, AdminError);
    if(sscanf(params, "s[11]", params)) return SendClientMessage(playerid, 0x8EC7DCFF, "Syntax: {FFFFFF}/aq [create / add / start / stop]");
    if(!strcmp(params, "create", true))
    {
        if(qActive) return SendClientMessage(playerid, COLOR_DARKGRAY, "A quest is already started.");
        pInfo[playerid][aVar][118] = 0, qCreator = playerid, qActive = true, SendClientMessage(playerid, COLOR_YELLOW, "[QUEST] You started to create a quest. You can add up to 50 pickups.");
        return 1;
    }
    if(!strcmp(params, "add", true))
    {
        if(!qActive) return SendClientMessage(playerid, COLOR_DARKGRAY, "No quest available.");
        if(qCreator != playerid) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not the quest creator.");
        if(pInfo[playerid][aVar][118] == 50) return SendClientMessage(playerid, COLOR_DARKGRAY, "Maximum pickups for quest is 50.");
        GetPlayerPos(playerid, rVehPos[0], rVehPos[1], rVehPos[2]);
        Quest[ pInfo[playerid][aVar][118] ][C1][0] = rVehPos[0], Quest[ pInfo[playerid][aVar][118] ][C1][1] = rVehPos[1], Quest[ pInfo[playerid][aVar][118] ][C1][2] = rVehPos[2];
        format(stmsg[playerid], 100, "[QUEST] Pickup #%d was added at %0.2f, %0.2f, %0.2f. (Total pickups: %d)", pInfo[playerid][aVar][118], rVehPos[0], rVehPos[1], rVehPos[2], pInfo[playerid][aVar][118]+1),
            SendClientMessage(playerid, COLOR_YELLOW, stmsg[playerid]), pInfo[playerid][aVar][118]++;
    }
    if(!strcmp(params, "start", true))
    {
        if(!qActive) return SendClientMessage(playerid, COLOR_DARKGRAY, "No quest available.");
        if(qCreator != playerid) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not the quest creator.");
        ShowPlayerDialog(playerid, DIALOG_QUESTLOC, DIALOG_STYLE_INPUT, "Pickup location", "Scrie mai jos locatia/locatiile unde pot fi gasite cadourile ascunse de tine.\n\nExemplu:\nLos Santos\nLas Venturas\nSan Fierro\nLS/LV/SF\nLS/LV\nLV/SF\n\nScrie numele intreg al unui oras doar daca toate sunt ascunse acolo.", "Next", "Cancel");
        return 1;
    }
    if(!strcmp(params, "stop", true))
    {
        if(!qActive) return SendClientMessage(playerid, COLOR_DARKGRAY, "No quest available.");
        for(new i = 0; i < qCount; i++) DestroyDynamicPickup(Quest[i][qID]), qPick[Quest[i][qID]] = false;
        qActive = false, SendClientMessageToAll(COLOR_YELLOW, "[QUEST] Quest-ul a fost dezactivat.");
    }
    return 1;
}

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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. For more details you can also review our Terms of Use and Privacy Policy.