[Help] Dialogue Problem!!
#1

Any one Help me How to make that system in dialogue?

COde:

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);
        if(!IsACopCar(tmpcar) && !IsAnFbiCar(tmpcar))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "   You are not in a Sheriff's/FBI's vehicle!");
            return 1;
        }
        SendClientMessage(playerid, TEAM_BLUE_COLOR,"______-=MOBILE DATA COMPUTER=-_______");
        GetPlayerName(giveplayerid, sendername, sizeof(sendername));
        format(string, 256, "Name: %s", sendername);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, 256, "Wanted Risk: %d", WantedLevel[giveplayerid]);
        SendClientMessage(playerid, COLOR_WHITE, string);
        if(PlayerInfo[giveplayerid][pHousekey] != 255)
        {
            format(string, sizeof(string), "   Address: %s ((HouseID: %d))", HouseInfo[PlayerInfo[giveplayerid][pHousekey]][hDiscription], PlayerInfo[giveplayerid][pHousekey]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        if(PlayerInfo[giveplayerid][pArrested] > 0)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Criminal Record: True");
            format(string, 256, "Crimes Commited: %d", PlayerInfo[giveplayerid][pCrimes]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, 256, "Times Arrested: %d", PlayerInfo[giveplayerid][pArrested]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }else {
            SendClientMessage(playerid, COLOR_WHITE, "Criminal Record: None");
        }
        if(PlayerInfo[giveplayerid][pWarrant]==1) {
            format(string, 256, "Warrant Issued: %s", PlayerInfo[giveplayerid][pWarrantReason]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        if(PlayerInfo[giveplayerid][pTicket][0] > 0)
        {
            format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][0], PlayerInfo[giveplayerid][pTicketReason0]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate0]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        if(PlayerInfo[giveplayerid][pTicket][1] > 0)
        {
            format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][1], PlayerInfo[giveplayerid][pTicketReason1]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate1]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        if(PlayerInfo[giveplayerid][pTicket][2] > 0)
        {
            format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][2], PlayerInfo[giveplayerid][pTicketReason2]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate2]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        if(PlayerInfo[giveplayerid][pTicket][3] > 0)
        {
            format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][3], PlayerInfo[giveplayerid][pTicketReason3]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate3]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        if(PlayerInfo[giveplayerid][pTicket][4] > 0)
        {
            format(string, 256, "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[giveplayerid][pTicket][4], PlayerInfo[giveplayerid][pTicketReason4]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, 256, "Ticket Issued: %s", PlayerInfo[giveplayerid][pTicketDate4]);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        SendClientMessage(playerid, TEAM_BLUE_COLOR,"_______________________________________");
        return 1;
    }
When I use /mdc, dialogue appears.
Reply
#2

dialogue? like

/mdc

Pharrel Says: hi jay
Jay Says: hi pharrel how are you?
Pharrel Says: better now!

is that what you mean?

(my english is a shit too but i cant resist)

@edit wait a little and i'll post for you!
Reply
#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
#4

Friend thanks for the Help, but I got some Errors.

Код:
C:\DOCUME~1\ADMINI~1\Desktop\09BC2~1.3D-\UNDERC~2\wwr\LiD-RP.pwn(37533) : error 001: expected token: "]", but found "-integer value-"
C:\DOCUME~1\ADMINI~1\Desktop\09BC2~1.3D-\UNDERC~2\wwr\LiD-RP.pwn(37533) : warning 215: expression has no effect
C:\DOCUME~1\ADMINI~1\Desktop\09BC2~1.3D-\UNDERC~2\wwr\LiD-RP.pwn(37533) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\ADMINI~1\Desktop\09BC2~1.3D-\UNDERC~2\wwr\LiD-RP.pwn(37533) : error 029: invalid expression, assumed zero
C:\DOCUME~1\ADMINI~1\Desktop\09BC2~1.3D-\UNDERC~2\wwr\LiD-RP.pwn(37533) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
if(PlayerInfo[giveplayerid][pHousekey] != 255) format(string[2], sizeof(string[0]), "   Address: %s ((HouseID: %d))", HouseInfo[PlayerInfo[giveplayerid][pHousekey]][hDiscription], PlayerInfo[giveplayerid][pHousekey]);
Reply
#5

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(stringphrr[0], 70, "Name: %s\n", sendername);
        format(stringphrr[1], 70, "Wanted Risk: %d\n", WantedLevel[giveplayerid]);
        if(PlayerInfo[giveplayerid][pHousekey] != 255) format(stringphrr[2], sizeof(stringphrr), "   Address: %s ((HouseID: %d))", HouseInfo[PlayerInfo[giveplayerid][pHousekey]][hDiscription], PlayerInfo[giveplayerid][pHousekey]);
        if(PlayerInfo[giveplayerid][pArrested] > 0)
        {
            format(stringphrr[3], 70, "Criminal Record: True\nCrimes Commited: %d\n", PlayerInfo[giveplayerid][pCrimes]);
            format(stringphrr[4], 70, "Times Arrested: %d\n", PlayerInfo[giveplayerid][pArrested]);

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

its done now I need help with the /*CHANGEME*/ stuff, What should I do with it.
Reply
#7

idk, put my favorite number... 69
Reply
#8

Friend I added your favorite number 69, Now I got some errors:
[code]
C:\DOCUME~1\ADMINI~1\Desktop\09BC2~1.3D-\GAMEMO~1\LiD-RP.pwn(37572) : error 035: argument type mismatch (argument 3)
C:\DOCUME~1\ADMINI~1\Desktop\09BC2~1.3D-\GAMEMO~1\LiD-RP.pwn(38734) : warning 219: local variable "tmpcar" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.[code]

pawn Код:
ShowPlayerDialog(playerid, 69, "______-=MOBILE DATA COMPUTER=-_______",stringphrr[0],"Ok","");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)