Jump to content
  • 0

Bug Slots Gamemode HPQ123


Negrici Rares

Question

3 answers to this question

Recommended Posts

  • 0

Pai foarte simplu privind structura de cod de la pacanele -> dublaje, undeva trebuie sa fie o variabila care sa aibe un random, fi sigur ca nu o sa pice mereu rosu probabil random-ul a fost gandit prost o sa iti dau un exemplu de mai jos cum ar trebui sa arate.

new sansa = 1 + random(1), nr;

if(sansa == 1) nr = 1; // aici va fi rosie daca ne uitam atent la variabila este 1 + random, acel random poate fi si 0 deci mereu va fi rosie daca random-ul va fi 0
else if(sansa == 2) nr = 2; // aici va fi neagra

Eventual ai putea modifica acea sansa dupa bunul tau plac, sau daca nu exista un sistem si este facut doar pe rosu, desi nu prea cred ai putea sa-l faci chiar tu dupa exemplu de mai sus.

  • Like 1
Link to comment
Share on other sites

  • 0

timer Pacanele[600](playerid) {
    if(TimerPacanele[playerid] > 0) {
        TimerPacanele[playerid] --;
        PlayerPlaySound(playerid, 5201, 0.0, 0.0, 0.0);
        for(new i = 0; i < 9; i++) Slot[i][playerid] = random(6), PacaneleString(playerid, i);
        if(TimerPacanele[playerid] == 0) {
            stop Pacanele(playerid);
            new string[300], AmPierdut = 0;
            for(new gg = 0; gg < 6; gg++) {
                if(Slot[0][playerid] == gg && Slot[4][playerid] == gg && Slot[8][playerid] == gg) AmPierdut = 1, GiveBet(playerid, gg, 1, 1);
                else if(Slot[3][playerid] == gg && Slot[4][playerid] == gg && Slot[6][playerid] == gg) AmPierdut = 1, GiveBet(playerid, gg, 2, 1);
                else if(Slot[0][playerid] == gg && Slot[3][playerid] == gg && Slot[6][playerid] == gg) AmPierdut = 1, GiveBet(playerid, gg, 1, 0);
                else if(Slot[1][playerid] == gg && Slot[4][playerid] == gg && Slot[7][playerid] == gg) AmPierdut = 1, GiveBet(playerid, gg, 2, 0);
                else if(Slot[2][playerid] == gg && Slot[5][playerid] == gg && Slot[8][playerid] == gg) AmPierdut = 1, GiveBet(playerid, gg, 3, 0);
            }
            format(string, sizeof(string), "~g~$%s", GetCashStr(playerid));
            PlayerTextDrawSetString(playerid, PacaneleTD[9], string);
            if(AmPierdut == 0) {
                format(string, sizeof(string), "Ai pierdut $%s.", FormatNumbers(BetPacanele[playerid]));
                SCM(playerid, COLOR_DARKNICERED, string);
                GameTextForPlayer(playerid, "~r~YOU LOSE", 1000, 6);
            }
        }
    }
    return true;
}

 

 

 

ma gandesc ca aici ar trebui sa modifi:        for(new i = 0; i < 9; i++) Slot[i][playerid] = random(6), PacaneleString(playerid, i);

Link to comment
Share on other sites

  • 0

sau ar trebui modificat aici ceva?

function Dublaje(playerid) {
    new string[128];
    for(new i = 0; i < 9; i++) PlayerTextDrawHide(playerid, SlotTD[i]);
    for(new i = 0; i < 11; i++) PlayerTextDrawHide(playerid, PacaneleTD[i]);
    IsPacanele[playerid] = 0;
    IsDublaj[playerid] ++;
    for(new i = 0; i < 7; i++) PlayerTextDrawShow(playerid, DublajTD[i]);
    format(string, sizeof(string), "You win: ~g~$%s~n~~w~~h~Press RED or BLACK to double your win.", FormatNumbers(TotalBet[playerid]));
    PlayerTextDrawSetString(playerid, DublajTD[2], string);
    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
Answer this question...

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