Jump to content

Recommended Posts

Posted

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;
}

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