06.10.2011, 17:36
Any one Help me How to make that system in dialogue?
COde:
When I use /mdc, dialogue appears.
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;
}