28.12.2014, 20:58
Ahmad45123 forgot to replace one function, try this:
pawn Код:
CMD:fingerprint(playerid, params[]) {
new
iTarget,
szSex[7],
szMessage[128];
if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 5 || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2) {
if(sscanf(params, "u", iTarget))
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /fingerprint [playerid/partofname]");
if(!IsPlayerConnected(iTarget))
return SendClientMessage(playerid, COLOR_GREY, "The specified player is not connected.");
if(GetDistanceBetweenPlayers(iTarget, playerid) > 5)
return SendClientMessage(playerid, COLOR_GREY, "You're too far away.");
if(PlayerInfo[iTarget][pCrimes] == 0)
return SendClientMessage(playerid, COLOR_GREY, "IAFIS has found no matches for the scanned fingerprint.");
SendClientMessage(playerid, COLOR_GREY, "-----------------------------------------");
if(PlayerInfo[iTarget][pSex] == 1)
szSex = "Male";
else
szSex = "Female";
format(szMessage, sizeof(szMessage), "Name: %s (age: %d, sex: %s)", GetPlayerNameEx(iTarget), PlayerInfo[iTarget][pAge], szSex);
SendClientMessage(playerid, COLOR_WHITE, szMessage);
if(PlayerInfo[iTarget][pHouse] != INVALID_HOUSE_ID) {
new
szZone[MAX_ZONE_NAME];
GetLocation(HouseInfo[PlayerInfo[iTarget][pHouse]][hExteriorX], HouseInfo[PlayerInfo[iTarget][pHouse]][hExteriorY], szZone, MAX_ZONE_NAME);
format(szMessage, sizeof(szMessage), "House: %d %s", PlayerInfo[iTarget][pHouse], szZone);
SendClientMessage(playerid, COLOR_WHITE, szMessage);
} else if(PlayerInfo[iTarget][pHouse2] != INVALID_HOUSE_ID) {
new
szZone[MAX_ZONE_NAME];
GetLocation(HouseInfo[PlayerInfo[iTarget][pHouse2]][hExteriorX], HouseInfo[PlayerInfo[iTarget][pHouse2]][hExteriorY], szZone, MAX_ZONE_NAME);
format(szMessage, sizeof(szMessage), "House (2): %d %s", PlayerInfo[iTarget][pHouse2], szZone);
SendClientMessage(playerid, COLOR_WHITE, szMessage);
}
format(szMessage, sizeof(szMessage), "Prior convictions: %d", PlayerInfo[iTarget][pCrimes]);
SendClientMessage(playerid, COLOR_WHITE, szMessage);
format(szMessage, sizeof(szMessage), "Prior arrests: %d", PlayerInfo[iTarget][pArrested]);
SendClientMessage(playerid, COLOR_WHITE, szMessage);
SendClientMessage(playerid, COLOR_GREY, "-----------------------------------------");
}
return 1;
}