05.03.2011, 22:09
pawn Код:
dcmd_mdc(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new playerb;
if(!IsACop(playerid) && !IsAAgent(playerid) && !IsANG(playerid)) return SendClientMessage(playerid, COLOR_GREY, " You are not a Cop !");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mdc [playerid/PartOfName]");
new tmpcar = GetPlayerVehicleID(playerid);
if(IsACopCar(tmpcar)||IsPlayerInRangeOfPoint(playerid,5.0,253.9280,69.6094,1003.6406))
{
new crime1[64], crime2[64], crime3[64], crime4[64], crime5[64], crime6[64];
new reporter1[32], reporter2[32], reporter3[32], reporter4[32], reporter5[32], reporter6[32];
new string[768];
format(crime1, 64, "%s", CrimeInfo[playerb][Crime1]); format(crime2, 64, "%s", CrimeInfo[playerb][Crime2]);
format(crime3, 64, "%s", CrimeInfo[playerb][Crime3]); format(crime4, 64, "%s", CrimeInfo[playerb][Crime4]);
format(crime5, 64, "%s", CrimeInfo[playerb][Crime5]); format(crime6, 64, "%s", CrimeInfo[playerb][Crime6]);
format(reporter1, 32, "%s", CrimeInfo[playerb][Reporter1]); format(reporter2, 32, "%s", CrimeInfo[playerb][Reporter1]);
format(reporter3, 32, "%s", CrimeInfo[playerb][Reporter3]); format(reporter4, 32, "%s", CrimeInfo[playerb][Reporter3]);
format(reporter5, 32, "%s", CrimeInfo[playerb][Reporter5]); format(reporter6, 32, "%s", CrimeInfo[playerb][Reporter6]);
format(string, sizeof(string), "Suspect: %s\nCrime 1 [%s]: %s\nCrime 2 [%s]: %s\nCrime 3 [%s]: %s\nCrime 4 [%s]: %s\nCrime 5 [%s]: %s\nCrime 5 [%s]: %s\nCrime 6 [%s]: %s", RPN(playerb),
reporter1, crime1, reporter2, crime2, reporter3, crime3, reporter4, crime4, reporter5, crime5, reporter6, crime6);
ShowPlayerDialog(playerid, 69187, DIALOG_STYLE_MSGBOX, "Mobile Data Computer", string, "Done", "Done");
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not in a Police Vehicle or in the Police Department.");
return 1;
}
}
return 1;
}