Get2DPosZone
#9

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;
}
Reply


Messages In This Thread
Get2DPosZone - by ViperAssasin11 - 27.12.2014, 21:36
Re: Get2DPosZone - by SickAttack - 27.12.2014, 21:57
Re: Get2DPosZone - by ViperAssasin11 - 27.12.2014, 22:33
Re: Get2DPosZone - by Ahmad45123 - 27.12.2014, 22:36
Re: Get2DPosZone - by SickAttack - 27.12.2014, 22:41
Re: Get2DPosZone - by ViperAssasin11 - 27.12.2014, 22:50
Re: Get2DPosZone - by SickAttack - 28.12.2014, 00:27
Re: Get2DPosZone - by ViperAssasin11 - 28.12.2014, 20:21
Re: Get2DPosZone - by SickAttack - 28.12.2014, 20:58

Forum Jump:


Users browsing this thread: 3 Guest(s)