Jump to content

[REZOLVAT] Adaugare deelay


wien
 Share

Recommended Posts

Salut, cum pot sa adaug deelay la comanda asta?

Aici e comanda, si am si la onplayercheckpoint

YCMD:startmission(playerid, params[], help) {
    if(PlayerInfo[playerid][pMissionFinish] == 1)
    return SCM(playerid, COLOR_LGREEN, "Ai facut deja misiunea.");
    missionsDeelay[playerid] = gettime() + 86400; // asa setezi
    if(missionsDeelay[playerid] > gettime()) return SCMEx(playerid, -1, "Asteapta %d secunde pentru a face misiunile din nou.", missionsDeelay[playerid] - gettime());
    if(PlayerInfo[playerid][pLevel] < 3) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai level 3.");
    if(PlayerInfo[playerid][pBoatLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de licenta de barca pentru a incepe quest-ul.");
    if(StartMission[playerid] != 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai inceput deja misiunea.");
    if(IsPlayerInRangeOfPoint(playerid, 10, 162.2594,2470.6362,16.4780) == 0) return SCM(playerid, -1, "Nu esti la locul de unde poti incepe misiunea. Foloseste /gps -> Mission Place");

    if(PlayerToPoint(10, playerid, 162.2594,2470.6362,16.4780)) {
        new string[350];
        format(string, sizeof(string), "(Mission) Deoarece ai inceput misiunea ai fost transportat intr-un alt VW. Trebuie sa o ajuti pe mama lui Carl deoarece e grav ranita.");
        SCM(playerid, COLOR_GREY, string);
        SetPlayerVirtualWorld(playerid, 1);
        CP[playerid] = 99;
        SetPlayerCheckpoint(playerid, 155.0384,2416.2817,17.3963, 1.5);
        ActorMisiune1 = CreateActor(9, 155.0554,2416.4827,17.3843, -1);
        SetActorInvulnerable(ActorMisiune1, true);
        SetActorVirtualWorld(ActorMisiune1, 1);
        ApplyActorAnimation(ActorMisiune1, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        }
    return true;
}

 

// onenterplayercheckpoint

else if(CP[playerid] == 99) {
        new i = playerid;
        CP[playerid] = 0;
        ApplyAnimation(playerid, "MEDIC","CPR",4.1,0,1,0,1,1);
        format(gString, sizeof(gString), "Deoarece ai ajutat-o pe mama lui Carl ai primit 1.500.000$, 30 Premium Points");
        SCM(playerid, COLOR_YELLOW, gString);
        format(gString, sizeof(gString), "(( {31d6e4}Mission{A9C4E4} - %s a terminat misiunea si a primit premiul special. ))", GetName(i));
        SCMTA(COLOR_CLIENT, gString);
        GameTextForPlayer(playerid, "mission passed~n~~w~   valoare +", 3000, 4); 
        GivePlayerMoney(playerid, 1500000);
        PlayerInfo[pPremiumPoints] += 30;
        Update(i, pCashx);
        Update(i, pPremiumPointsx);
        DisablePlayerCheckpoint(playerid);
        SetPlayerVirtualWorld(playerid, 0);
    }

Link to comment
Share on other sites

  • 3 weeks later...
  • 577777 locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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