Command not working
#1

Command Has no errors at all
When someone in jail all it shows is Registered Inmates, when it suppose to show the player in jail, someone help me please!
pawn Код:
CMD:inmates(playerid, params[]){

    new name[MAX_PLAYER_NAME + 1], strGender[7];
    new team = PlayerInfo[playerid][pMember];
    if(team != 1 && team != 5){
        return SendClientMessage(playerid, COLOR_GRAD2, "  You are not a part of LSPD/SANG");
    }
    if( ( PlayerInfo[playerid][pMember] == 1 && !IsPlayerInRangeOfPoint(playerid, 200.0, 246.7335, 76.6002, 1003.6406)) ||
        ( PlayerInfo[playerid][pMember] == 5 && !IsPlayerInRangeOfPoint(playerid, 10.0, 1760.3658, -1561.8541, 1641.1377) ) ){

        new facMember = PlayerInfo[playerid][pMember];
        if(facMember == 1) SendClientMessage(playerid, COLOR_GRAD2, "  You are not inside the PD!");
        else SendClientMessage(playerid, COLOR_GRAD2, "  You are not inside the control room of DeMorgan!");
        return 1;
    }
    SendClientMessage(playerid, 0x808000AA, "Registered Inmates:");
    for(new p = 0; p < MAX_PLAYERS; p++)
    {
        if(IsPlayerConnected(p))
        {
            // Changed, doesn't need the second check to be honest, let them view all the prisoners/jailed people
            if(PlayerInfo[p][pJailed] != 0 && PlayerInfo[p][pAdminJailed] != 1)
            {
                GetPlayerRPName(p, name, sizeof(name));
                if(PlayerInfo[p][pSex] == 1) strGender = "Male";
                else strGender = "Female";
                format(string, sizeof(string), "%s(%d) - Age: %d - Gender: %s - Phone: %d", name, p, PlayerInfo[p][pAge], strGender, PlayerInfo[p][pPnumber]);
                SendClientMessage(playerid, 0xF5DEB3AA, string);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Command not working - by San1 - 18.07.2013, 04:09
Re: Command not working - by dominik523 - 18.07.2013, 08:15
Re: Command not working - by Pk93 - 19.07.2013, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)