[Help] Dialogue Problem!!
#3

pawn Код:
if(strcmp(cmd, "/mdc", true) == 0)
    {
        new tmpcar = GetPlayerVehicleID(playerid);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mdc [playerid/PartOfName]");
            return 1;
        }
        giveplayerid = ReturnUser(tmp);
        GetPlayerName(giveplayerid, sendername, sizeof(sendername));
        GiveNameSpace(sendername);
        GetPlayerName(giveplayerid, sendername, sizeof(sendername));
        if(!IsACopCar(tmpcar) && !IsAnFbiCar(tmpcar))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "   You are not in a Sheriff's/FBI's vehicle!");
            return 1;
        }
        new stringphrr[16][128];
        format(string[0], 70, "Name: %s\n", sendername);
        format(string[1], 70, "Wanted Risk: %d\n", WantedLevel[giveplayerid]);
        if(PlayerInfo[giveplayerid][pHousekey] != 255) format(string[2], sizeof(string[0]), "   Address: %s ((HouseID: %d))", HouseInfo[PlayerInfo[giveplayerid][pHousekey]][hDiscription], PlayerInfo[giveplayerid][pHousekey]);
        if(PlayerInfo[giveplayerid][pArrested] > 0)
        {
            format(string[3], 70, "Criminal Record: True\nCrimes Commited: %d\n", PlayerInfo[giveplayerid][pCrimes]);
            format(string[4], 70, "Times Arrested: %d\n", PlayerInfo[giveplayerid][pArrested]);

        }
        else format(string[4], 70, "Criminal Record: False\n", PlayerInfo[giveplayerid][pArrested]);
        if(PlayerInfo[giveplayerid][pWarrant]==1) format(string[5], 70, "Warrant Issued: %s\n", PlayerInfo[giveplayerid][pWarrantReason]);
        if(PlayerInfo[giveplayerid][pTicket][0] > 0)
        {
            format(string[6], 70, "Unpaid Ticket: $%d | Reason: %s\n", PlayerInfo[giveplayerid][pTicket][0], PlayerInfo[giveplayerid][pTicketReason0]);
            format(string[7], 70, "Ticket Issued: %s\n", PlayerInfo[giveplayerid][pTicketDate0]);
        }
        if(PlayerInfo[giveplayerid][pTicket][1] > 0)
        {
            format(string[8], 70, "Unpaid Ticket: $%d | Reason: %s\n", PlayerInfo[giveplayerid][pTicket][1], PlayerInfo[giveplayerid][pTicketReason1]);
            format(string[9], 70, "Ticket Issued: %s\n", PlayerInfo[giveplayerid][pTicketDate1]);
        }
        if(PlayerInfo[giveplayerid][pTicket][2] > 0)
        {
            format(string[10], 70, "Unpaid Ticket: $%d | Reason: %s\n", PlayerInfo[giveplayerid][pTicket][2], PlayerInfo[giveplayerid][pTicketReason2]);
            format(string[11], 70, "Ticket Issued: %s\n", PlayerInfo[giveplayerid][pTicketDate2]);
        }
        if(PlayerInfo[giveplayerid][pTicket][3] > 0)
        {
            format(string[12], 70, "Unpaid Ticket: $%d | Reason: %s\n", PlayerInfo[giveplayerid][pTicket][3], PlayerInfo[giveplayerid][pTicketReason3]);
            format(string[13], 70, "Ticket Issued: %s\n", PlayerInfo[giveplayerid][pTicketDate3]);
        }
        if(PlayerInfo[giveplayerid][pTicket][4] > 0)
        {
            format(string[14], 70, "Unpaid Ticket: $%d | Reason: %s\n", PlayerInfo[giveplayerid][pTicket][4], PlayerInfo[giveplayerid][pTicketReason4]);
            format(string[15], 70, "Ticket Issued: %s\n", PlayerInfo[giveplayerid][pTicketDate4]);
        }
        format(string,256,"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
        string[0],string[1],string[2],string[3],string[4],
        string[5],string[6],string[7],string[8],string[9],
        string[10],string[11],string[12],string[13],string[14],
        string[15]);
        ShowPlayerDialog(playerid, /*CHANGEME*/, "______-=MOBILE DATA COMPUTER=-_______",string[0],"Ok","");
        return 1;
    }
change the /*CHANGEME*/ for a dialog id that you never uses
Reply


Messages In This Thread
[Help] Dialogue Problem!! - by umarmalik - 06.10.2011, 17:36
Re: [Help] Dialogue Problem!! - by Pharrel - 06.10.2011, 17:41
Re: [Help] Dialogue Problem!! - by Pharrel - 06.10.2011, 17:53
Re: [Help] Dialogue Problem!! - by umarmalik - 06.10.2011, 18:01
Re: [Help] Dialogue Problem!! - by Pharrel - 06.10.2011, 18:13
Re: [Help] Dialogue Problem!! - by umarmalik - 06.10.2011, 18:30
Re: [Help] Dialogue Problem!! - by Pharrel - 06.10.2011, 18:37
Re: [Help] Dialogue Problem!! - by umarmalik - 07.10.2011, 03:16

Forum Jump:


Users browsing this thread: 4 Guest(s)