Jump to content

animatie speciala quest


Recommended Posts

Salut, ma poate ajuta cineva sa pun animatie din aceea la quest cu Y langa obiect si apoi langa masina? 

linia: 

hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
    if(SpecialQuest[playerid]) {
        if(newkeys & KEY_YES) {
            if(IsPlayerInAnyVehicle(playerid))
                return true;

            new
                 Float:x, Float:y, Float:z;

            GetPlayerObjectPos(playerid, questObject[playerid], x, y, z);

            if(!PlayerToPoint(3.0, playerid, x, y, z))
                return true;

            PlayerInfo[playerid][quest_objects] ++;
            UpdateVar(playerid, "quest_objects", PlayerInfo[playerid][quest_objects]);

            RemovePlayerMapIcon(playerid, 50);
            DestroyPlayerObject(playerid, questObject[playerid]);
            
            if(CheckObjects(playerid) == QUEST_OBJECTS) {
                DestroyVehicle(questVehicle[playerid]);
                questVehicle[playerid] = 0;
                SpecialQuest[playerid] = 0;

                gString[0] = EOS;
                format(gString, sizeof(gString), "(( Info: %s a terminat quest-ul special si a primit un premiu! ))", GetName(playerid));
                SendClientMessageToAll(COLOR_CLIENT, gString);

                new 
                    rand_money = 2000000 + random(5000000),
                    rand_rp = 10 + random(30), 
                    rand_pp = 20 + random(20);

                GivePlayerCash(playerid, 1, rand_money);    
                PlayerInfo[playerid][pExp] += rand_rp;
                PlayerInfo[playerid][pPremiumPoints] += rand_pp;

                Update(playerid, pCashx);    
                Update(playerid, pRP);
                Update(playerid, pPremiumPointsx);

                gString[0] = EOS;
                format(gString, sizeof(gString), "Felicitari! Ai primit $%s, %d respect points si %d puncte premium", FormatNumber(rand_money), rand_rp, rand_pp);
                SCM(playerid, COLOR_YELLOW, gString);
            }
            else set_quest_point(playerid);
        }
    }
    return true;
}

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
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.

×
×
  • 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.