Help dialog dont working(PLS REP+++++)
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new w[128];
    if(dialogid == Dialog_Firme)
    {
        for(new f = 0; f <= Max_Firmi; f++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, InfoFirme[f][IzlazXFirme], InfoFirme[f][IzlazYFirme], InfoFirme[f][IzlazZFirme]))
            {
                if(!response) return SendClientMessage(playerid, -1, "Odustali ste!");
                if(strcmp(InfoFirme[f][VlasnikFirme],Ime(playerid), false ) == 0)
                {
                    switch(listitem)
                    {
                        case 0:
                        {
                            format(w,sizeof(w),"Novaca u firmi %i$ ",InfoFirme[f][PareVlasnika]);
                            SendClientMessage(playerid,-1,w);
                        }
                        case 1:
                        {
                            DestroyPickup(InfoFirme[f][PickupFirme]);
                            InfoFirme[f][PickupFirme] = CreatePickup(1273, 23, InfoFirme[f][IzlazXFirme], InfoFirme[f][IzlazYFirme], InfoFirme[f][IzlazZFirme]);
                            format(InfoFirme[f][VlasnikFirme], 24, "DRZAVA");
                            InfoFirme[f][FirmaNaProdaju] = 1;
                            GivePlayerMoney(playerid, InfoFirme[f][CenaFirme]/2);
                            format(w,sizeof(w),"Prodali ste firmu za %i$!",InfoFirme[f][CenaFirme]/2);
                            SendClientMessage(playerid,-1,w);
                            UpdateFirme(f);
                            format(Label, sizeof(Label), ""SVJETLOPLAVA"Bizz name:"ZUTA"%s \n"SVJETLOPLAVA"Vlasnik:"ZUTA"%s \n"SVJETLOPLAVA"Cena: "ZUTA"$%i\n "SVJETLOPLAVA"Level:"ZUTA"%i",InfoFirme[f][ImeFirme],InfoFirme[f][VlasnikFirme],InfoFirme[f][CenaFirme],InfoFirme[f][LevelFirme]);
                            Update3DTextLabelText(InfoFirme[f][LabelFirme],-1,Label);
                        }
                        case 2:
                        {
                            ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Take money","Koliko novaca zelite podignuti iz firme?!","Podigni","Odustani");
                        }
                        case 3:
                        {
                            ShowPlayerDialog(playerid,Dialog_Firme+2,DIALOG_STYLE_INPUT,"Ime firme","Unesite novo ime firme?!","Ok","Odustani");
                        }
                    }
                }
            }
        }
        return true;
    }
    if(dialogid == Dialog_Firme+1)
    {
        if(!response) return SendClientMessage(playerid, -1, "Odustali ste!");
        for(new f = 0; f <= Max_Firmi; f++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, InfoFirme[f][IzlazXFirme], InfoFirme[f][IzlazYFirme], InfoFirme[f][IzlazZFirme]))
            {
                if(strval(inputtext) > InfoFirme[f][PareVlasnika])
                {
                    format(w,sizeof(w),"Nemate toliko novaca u firmi,trenutno novaca %i$!",InfoFirme[f][PareVlasnika]);
                    SendClientMessage(playerid,-1,w);
                    ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Dizanje novaca","Koliko novaca zelite podignuti iz firme?!","Podigni","Odustani");
                    return true;
                }
                else
                {
                    Uplata(f,-strval(inputtext));
                    format(w,sizeof(w),"Izvadili ste %i$ sa racuna firme,na racunu ostalo jos %i$!",strval(inputtext),InfoFirme[f][PareVlasnika]);
                    SendClientMessage(playerid,-1,w);
                    GivePlayerMoney(playerid,strval(inputtext));
                }
            }
        }
    }
    if(dialogid == Dialog_Firme+2)
    {
        if(!response) return SendClientMessage(playerid, -1, "Odustali ste!");
        for(new f = 0; f <= Max_Firmi; f++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, InfoFirme[f][IzlazXFirme], InfoFirme[f][IzlazYFirme], InfoFirme[f][IzlazZFirme]))
            {
                format(InfoFirme[f][ImeFirme], 24, "%s", inputtext);
                UpdateFirme(f);
                format(w,sizeof(w),"Novo ime firme je %s!",InfoFirme[f][ImeFirme]);
                SendClientMessage(playerid,-1,w);
                format(Label, sizeof(Label), ""SVJETLOPLAVA"Ime firme:"ZUTA"%s \n"SVJETLOPLAVA"Vlasnik:"ZUTA"%s\n "SVJETLOPLAVA"Level:"ZUTA"%i",InfoFirme[f][ImeFirme],InfoFirme[f][VlasnikFirme],InfoFirme[f][LevelFirme]);
                Update3DTextLabelText(InfoFirme[f][LabelFirme],-1,Label);
            }
        }
    }
    return true;
}
Fixed this:
Код:
ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Take money,"Koliko no
to this:
Код:
ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Take money","Koliko no
Reply


Messages In This Thread
Help dialog dont working(PLS REP+++++) - by imnoob - 18.09.2012, 22:56
Re: Help dialog dont working(PLS REP+++++) - by XtremeR - 19.09.2012, 05:52
Re: Help dialog dont working(PLS REP+++++) - by imnoob - 19.09.2012, 18:08
Re: Help dialog dont working(PLS REP+++++) - by RedJohn - 19.09.2012, 18:16

Forum Jump:


Users browsing this thread: 6 Guest(s)