Jump to content
  • 0

Problema comanda...


Question

Posted

Salut samperistilor, din nou am venit cu o intrebare de a mea.

Sa incep cu inceputul:

Deci am facut si eu comanda /ticket pe dialog.

Comanda aici:

CMD:ticket(playerid,params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "Nu esti logat!");
        if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "Nu esti un Politist.");
        if(OnDuty[playerid] == 0)return SendClientMessage(playerid, COLOR_ERROR, "Nu esti ON-DUTY.");
        new giveplayerid;
        if(sscanf(params, "uis[100]",giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}Syntax: /ticket <Name/Playerid>");
        if(IsACop(giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Nu poti oferi amenda unui politist!");
        if(giveplayerid != INVALID_PLAYER_ID)
          {
            if (ProxDetectorS(50.0, playerid, giveplayerid))
            {
                new s0[250],s1[250],s2[250],s3[250],s4[250],s5[250],s6[250],s7[250],s8[250],s9[250],s10[250],s11[250],s12[250],maxim[MAX_STRING];
                format(s0,250,"Tipuri de amenzi:");
                 format(s1,250,"1.Parcat Neregulamentar");
                format(s2,250,"2.Condus Neregulamentar");
                format(s3,250,"3.Deranjarea Traficului");
                format(s4,250,"4.Detinere/Folosire Hydraulice");
                format(s5,250,"5.Detinere/Folosire NOS");
                format(s6,250,"6.Materiale fara Licenta");
                format(s7,250,"7.Faruri Oprite");
                format(s8,250,"8.Incalcare Limita Viteza(Sub 50km/h)");
                format(s9,250,"9.Incalcare Limita Viteza(Peste 50km/h)");
                format(s10,250,"10.Vanzare arme");
                format(s11,250,"11.Pesti fara Licenta");
                format(s12,250,"12.Mers pe partea carosabila");
                format(maxim,sizeof(maxim),"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12);
                ShowPlayerDialog(playerid,DIALOG_TICKET1, DIALOG_STYLE_TABLIST_HEADERS,"Ticket List:",maxim,"Select","Cancel");
                TicketMoney[playerid] = giveplayerid;
            }
            else return SCM(playerid, COLOR_YELLOW2, "Acel player nu este langa tine.");
        }
    }
    else return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    return 1;
}

 

Si problema este in joc adica cand dau /ticket id , imi apare asa:

https://imgur.com/a/LYkJR

 

Intrebarea este urmatoarea:

Dc nu apare toate randuri-le in comanda adica se opreste la "9.Incalcare Limita Viteza(Peste 50km/h)" cand ar mai trebui sa apara inca 3 amenzi.

Ce am facut gresit de nu apare toata lista?

g4JGBJX.gif.31953391ab64171df562293ad37a0875.gif.9d26b39cd3270634d9cf89dcb43fba87.gif

 

 

2 answers to this question

Recommended Posts

  • 0
Posted

aici unde ai declarat variabilele

  new s0[250],s1[250],s2[250],s3[250],s4[250],s5[250],s6[250],s7[250],s8[250],s9[250],s10[250],s11[250],s12[250],maxim[MAX_STRING];

Ai strigul maxim[MAX_STRING];

Inlocuieste cu maxim[500]; Desi este mare 500 tu ai nevoie la dialog

 

  • Thanks 1

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Guest
This topic is now closed to further replies.
×
×
  • 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.