Jump to content

Adaugare sanse la un crate


AnDrEyUpS

Recommended Posts

Salutare tuturor din aceasta comunitate de sa:mp.

Am facut si eu un sistem clasic de crate in care dai /buycrate iti ia o anumita suma de bani si iti poate da niste premii ( fara textdraw, nu stiu sa-l fac ).

Am facut cu random de 4 premii si as vrea sa stiu cum sa le pot pune sanse la premii, ma puteti ajuta?

GameMode: bottles, folosesc ZCMD

Comanda: https://pastebin.com/rX9TCvRL

Link to comment
Share on other sites

Acum 13 minute, AnDrEyUpS a spus:

Salutare tuturor din aceasta comunitate de sa:mp.

Am facut si eu un sistem clasic de crate in care dai /buycrate iti ia o anumita suma de bani si iti poate da niste premii ( fara textdraw, nu stiu sa-l fac ).

Am facut cu random de 4 premii si as vrea sa stiu cum sa le pot pune sanse la premii, ma puteti ajuta?

GameMode: bottles, folosesc ZCMD

Comanda: https://pastebin.com/rX9TCvRL

Citat

CMD:opencrate(playerid, params[])
{
    if(pInfo[playerid][pScore] < 3) return SCM(playerid, COLOR_ERROR, "Nu ai nivelul neceser pentru a folosi aceasta comanda.");
    if(!IsPlayerInRangeOfPoint(playerid, 7.0,155.6681,-1966.2190,3.5834)) return SCM(playerid, COLOR_ERROR, "Nu esti la locatia potrivita.");
    new sanse = random(36);
    switch(sanse)
    {
        case 0..10:// 10% sanse
        {
            GiveMoney(playerid, 902000);
            SCM(playerid, COLOR_SUCCES, "Ai castigat: 902000$ din (Legendary Crate).");
        }
        case 11..20:// 9% sanse
        {
            GiveMoney(playerid, 1010000);
            SCM(playerid, COLOR_SUCCES, "Ai castigat: 1010000$ din (Legendary Crate).");
        }
        case 21..29://8%
        {
            GiveMoney(playerid, 1010000);
            SCM(playerid, COLOR_SUCCES, "Ai castigat: 1010000$ din (Legendary Crate).");
        }
        case 30..36://5%
        {
            GiveMoney(playerid, 2100000);
            SCM(playerid, COLOR_SUCCES, "Ai castigat: 2100000$ din (Legendary Crate).");
        }
    }
    return 1;
}

// modifici tu cum vr

 

YouTube : Click

Discord : CosminAK47#8524

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.