06.10.2011, 18:13
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;
}