Jump to content

Problema Timer comanda


AnDrEyUpS

Recommended Posts

Buna ziua am facut si eu o comanda ( startminigame1 ) si am incercat sa-i fac si un timer dar nu reusesc m-ar putea ajuta cineva?

Comanda ( startminigame1 ) 

 

CMD:startminigame1(playerid, params[]) {
    if(IsPlayerInRangeOfPoint(playerid,3.0,-2509.9736,-3149.0483,7.1309)) {
        if(pInfo[playerid][pCarLic] < 1) return SendClientMessage(playerid, COLOR_WHITE, "Nu ai licenta de condus.");
        if(pInfo[playerid][pWantedLevel] != 0) return SendClientMessage(playerid,COLOR_WHITE, "Nu poti intra in Minigame daca ai wanted."); {
            SetPlayerPos(playerid,-3136.0701,-2737.7593,534.5658);
            TogglePlayerControllable(playerid, 1);
            SetTimerEx("UnFreezeStation", 2000, false, "i", playerid);
            SetPlayerVirtualWorld(playerid, 0);
        }
    }
    else return SendClientMessage(playerid, COLOR_VERDE, "Nu esti la Minigame.");
    return 1; }

 

 

Timer-ul : SetTimerEx("TimerM", 9000, false, "i", playerid);

 

forward TimerM;

public TimerM;

SetTimerEx("TimerM", 9000, false, "i", playerid);

return 1;

}

 

Vreu sa fac acel timer deoarece playeri pot da incontinu  " startminigame1 "

 

Ma poate ajuta cineva?

Link to comment
Share on other sites

  • 3 months later...

Creeaza o variabila new InMiniGame[MAX_PLAYERS]; atunci cand playerul se teleporteaza in minigame sa o activezi. La comanda minigame1 sub setplayervirtualworld bagi InMiniGame[playerid] = 1; pentru a nu putea sa intre de mai multe ori.

La public SetTimerEx este nevoie doar de un timer si ala UnfreezeStation sau cum il ai tu acolo, acolo bagi TogglePlayerControllable(playerid, 1);

Si pentru aspect bagi tot la settimerex

GameTextForPlayer(playerid, 3000, "~r~Start!", 4);

Numai stiu exact parametri la gametextforplayer inlocuiesti tu ce si cum..

Nu stiu ce tip de minigame ai tu dar variabila trebuie resetata 

Sub OnPlayerConnect

InMiniGame[playerid] = 0;

Sub OnPlayerSpawn(asta doar pentru ca nu stiu ce tip de minigame este)

InMiniGame[playerid] = 0;

Daca nu te-am lamurit add pe discord Alow#8787

Sper ca te-am ajutat😊

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.