if(strcmp(cmd, "/mdc", true) == 0) //DIALOG MDC { if(IsPlayerConnected(playerid)) { if(!IsACop(playerid) && !IsASoldier(playerid) && !IsASWAT(playerid) && !IsAnAgent(playerid)) { SendClientMessage(playerid, GREY, " You are not a member of the law enforcement."); return 1; } new mdcstring[1024]; new location[MAX_ZONE_NAME]; new location2[MAX_ZONE_NAME]; new tmpcar = GetPlayerVehicleID(playerid); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SyntaxMessage(playerid, "/mdc [playerid/name]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsACopCar(tmpcar) || IsAFBICar(tmpcar) || IsPlayerInRangeOfPoint(playerid,100.0,253.9280,69.6094,1003.6406)) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, sendername, sizeof(sendername)); GetPlayer2DZone(giveplayerid, location, MAX_ZONE_NAME); new wanted = 0,hashome = 0,crimes = 0; if(PlayerInfo[giveplayerid][pWantedLevel] > 0) { wanted = 1; } if(HouseKey[giveplayerid] != -1 || HouseKey2[giveplayerid] != -1) { hashome = 1; } if(PlayerInfo[giveplayerid][pCrimes] > 0) { crimes = 1; } if(wanted == 1 && hashome == 0) { format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d", sendername, PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0], PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1], PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2], PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3], PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4], PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5], PlayerInfo[giveplayerid][pCrimes], PlayerInfo[giveplayerid][pArrested]); } if(wanted == 1 && hashome == 1) { Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]); Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]); format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d", sendername, PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0], PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1], PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2], PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3], PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4], PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5], location, location2, PlayerInfo[giveplayerid][pCrimes], PlayerInfo[giveplayerid][pArrested]); } if(wanted == 0 && hashome == 0 && crimes == 1) { format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d", sendername, PlayerInfo[giveplayerid][pCrimes], PlayerInfo[giveplayerid][pArrested]); } if(wanted == 0 && hashome == 1 && crimes == 0) { Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]); Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]); format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: No", sendername, location, location2); } if(wanted == 0 && hashome == 0 && crimes == 0) { format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: No", sendername); } if(wanted == 0 && hashome == 1 && crimes == 1) { Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]); Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]); format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes Committed: %d\nTimes Arrested: %d", sendername, location, location2, PlayerInfo[giveplayerid][pCrimes], PlayerInfo[giveplayerid][pArrested]); } ShowPlayerDialog(playerid,667,DIALOG_STYLE_MSGBOX,"Mobile Data Computer",mdcstring,"Ok","Cancel"); } } else { SendClientMessage(playerid, GREY, " That player is offline."); return 1; } } else { SendClientMessage(playerid, GREY, " You are not in a Police Vehicle or in the Police Department."); return 1; } } return 1; }
if(strcmp(cmdtext, "/mdc", true) == 0) //DIALOG MDC
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid) && !IsASoldier(playerid) && !IsASWAT(playerid) && !IsAnAgent(playerid))
{
SendClientMessage(playerid, GREY, " You are not a member of the law enforcement.");
return 1;
}
new mdcstring[1024];
new location[MAX_ZONE_NAME];
new location2[MAX_ZONE_NAME];
new tmpcar = GetPlayerVehicleID(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SyntaxMessage(playerid, "/mdc [playerid/name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsACopCar(tmpcar) || IsAFBICar(tmpcar) || IsPlayerInRangeOfPoint(playerid,100.0,253.9280,69.6094,1003.6406))
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
GetPlayer2DZone(giveplayerid, location, MAX_ZONE_NAME);
new wanted = 0,hashome = 0,crimes = 0;
if(PlayerInfo[giveplayerid][pWantedLevel] > 0)
{
wanted = 1;
}
if(HouseKey[giveplayerid] != -1 || HouseKey2[giveplayerid] != -1)
{
hashome = 1;
}
if(PlayerInfo[giveplayerid][pCrimes] > 0)
{
crimes = 1;
}
if(wanted == 1 && hashome == 0)
{
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
sendername,
PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
if(wanted == 1 && hashome == 1)
{
Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
sendername,
PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
location,
location2,
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
if(wanted == 0 && hashome == 0 && crimes == 1)
{
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
sendername,
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
if(wanted == 0 && hashome == 1 && crimes == 0)
{
Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: No",
sendername,
location,
location2);
}
if(wanted == 0 && hashome == 0 && crimes == 0)
{
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: No",
sendername);
}
if(wanted == 0 && hashome == 1 && crimes == 1)
{
Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes Committed: %d\nTimes Arrested: %d",
sendername,
location,
location2,
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
ShowPlayerDialog(playerid,667,DIALOG_STYLE_MSGBOX,"Mobile Data Computer",mdcstring,"Ok","Cancel");
}
}
else
{
SendClientMessage(playerid, GREY, " That player is offline.");
return 1;
}
}
else
{
SendClientMessage(playerid, GREY, " You are not in a Police Vehicle or in the Police Department.");
return 1;
}
}
return 1;
}
#include <zcmd>
CMD:mdc(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid) && !IsASoldier(playerid) && !IsASWAT(playerid) && !IsAnAgent(playerid))
{
SendClientMessage(playerid, GREY, " You are not a member of the law enforcement.");
return 1;
}
new mdcstring[1024];
new location[MAX_ZONE_NAME];
new location2[MAX_ZONE_NAME];
new tmpcar = GetPlayerVehicleID(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SyntaxMessage(playerid, "/mdc [playerid/name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsACopCar(tmpcar) || IsAFBICar(tmpcar) || IsPlayerInRangeOfPoint(playerid,100.0,253.9280,69.6094,1003.6406))
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
GetPlayer2DZone(giveplayerid, location, MAX_ZONE_NAME);
new wanted = 0,hashome = 0,crimes = 0;
if(PlayerInfo[giveplayerid][pWantedLevel] > 0)
{
wanted = 1;
}
if(HouseKey[giveplayerid] != -1 || HouseKey2[giveplayerid] != -1)
{
hashome = 1;
}
if(PlayerInfo[giveplayerid][pCrimes] > 0)
{
crimes = 1;
}
if(wanted == 1 && hashome == 0)
{
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
sendername,
PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
if(wanted == 1 && hashome == 1)
{
Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted for:\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\n - %s | Reporter: %s | Date: %s\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
sendername,
PlayerInfo[giveplayerid][pCrimeReason0],PlayerInfo[giveplayerid][pCrimeReporter0],PlayerInfo[giveplayerid][pCrimeDate0],
PlayerInfo[giveplayerid][pCrimeReason1],PlayerInfo[giveplayerid][pCrimeReporter1],PlayerInfo[giveplayerid][pCrimeDate1],
PlayerInfo[giveplayerid][pCrimeReason2],PlayerInfo[giveplayerid][pCrimeReporter2],PlayerInfo[giveplayerid][pCrimeDate2],
PlayerInfo[giveplayerid][pCrimeReason3],PlayerInfo[giveplayerid][pCrimeReporter3],PlayerInfo[giveplayerid][pCrimeDate3],
PlayerInfo[giveplayerid][pCrimeReason4],PlayerInfo[giveplayerid][pCrimeReporter4],PlayerInfo[giveplayerid][pCrimeDate4],
PlayerInfo[giveplayerid][pCrimeReason5],PlayerInfo[giveplayerid][pCrimeReporter5],PlayerInfo[giveplayerid][pCrimeDate5],
location,
location2,
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
if(wanted == 0 && hashome == 0 && crimes == 1)
{
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: Yes\nCrimes committed: %d\nTimes Arrested: %d",
sendername,
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
if(wanted == 0 && hashome == 1 && crimes == 0)
{
Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: No",
sendername,
location,
location2);
}
if(wanted == 0 && hashome == 0 && crimes == 0)
{
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nCriminal Record: No",
sendername);
}
if(wanted == 0 && hashome == 1 && crimes == 1)
{
Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseKey[giveplayerid]][HouseEnterX], HouseInfo[HouseKey[giveplayerid]][HouseEnterY], HouseInfo[HouseKey[giveplayerid]][HouseEnterZ]);
Get2DZone(location2, MAX_ZONE_NAME, HouseInfo[HouseKey2[giveplayerid]][HouseEnterX], HouseInfo[HouseKey2[giveplayerid]][HouseEnterY], HouseInfo[HouseKey2[giveplayerid]][HouseEnterZ]);
format(mdcstring, sizeof(mdcstring), "Name: %s\nWanted: No\nHouse Address: %s\nHouse Address 2: %s\nCriminal Record: Yes\nCrimes Committed: %d\nTimes Arrested: %d",
sendername,
location,
location2,
PlayerInfo[giveplayerid][pCrimes],
PlayerInfo[giveplayerid][pArrested]);
}
ShowPlayerDialog(playerid,667,DIALOG_STYLE_MSGBOX,"Mobile Data Computer",mdcstring,"Ok","Cancel");
}
else
{
SendClientMessage(playerid, GREY, " That player is offline.");
return 1;
}
}
else
{
SendClientMessage(playerid, GREY, " You are not in a Police Vehicle or in the Police Department.");
return 1;
}
}
}
return 1;
}
i didnt even see the code as its a downloaded gamemode and u probably have no idea what ur doing.
and if u do know what ur doing, then just do what i said and ull get it working in no time. |