WHAT THE **** is wrong here?
#3

Try this code:
pawn Код:
if(newkeys == KEY_LOOK_BEHIND)
{
    if(gTeam[playerid] == TEAM_COPS)
    {
        for(new i = 0; i < MAX_PLAYERS; ++i)
        {
            if(IsPlayerConnected(i) && !IsPlayerNPC(i) && GetPlayerWantedLevel(i) > 0)
            {
                new
                    Float:i_Pos[3];

                GetPlayerPos(i, i_Pos[0], i_Pos[1], i_Pos[2]);
               
                if(IsPlayerInRangeOfPoint(playerid, 5, i_Pos[0], i_Pos[1], i_Pos[2]))
                {
                    new
                        i_NameWanted[MAX_PLAYER_NAME],
                        i_NameCop[MAX_PLAYER_NAME],
                        iStr[48 + 20];

                    TogglePlayerControllable(i, false);

                    GetPlayerName(i, i_NameWanted, MAX_PLAYER_NAME]);
                    GetplayerName(playerid, i_NameCop, MAX_PLAYER_NAME);
                   
                    format(iStr, sizeof(iStr), "%s(%d) has been cuffed by %s(%d)", i_NameWanted, i, i_NameCop, playerid);
                    SendClientMessageToAll(COLOR_GREY, iStr);
                   
                    GivePlayerMoney(playerid, 500);
                    return 1;
                }
                else SendClientMessage(playerid, COLOR_WHITE, "Nobody is close enough.");
            }
        }
    }
}
I cannot guarantee that it will work + I'm sleepy. Good night.
Reply


Messages In This Thread
WHAT THE **** is wrong here? - by Cjgogo - 22.05.2011, 08:11
Re: WHAT THE **** is wrong here? - by (SF)Noobanatior - 22.05.2011, 08:38
Re: WHAT THE **** is wrong here? - by [L3th4l] - 22.05.2011, 08:42
Re: WHAT THE **** is wrong here? - by Cjgogo - 22.05.2011, 08:59
Re: WHAT THE **** is wrong here? - by Haydz - 22.05.2011, 09:10
Re: WHAT THE **** is wrong here? - by boelie - 22.05.2011, 09:11
Re: WHAT THE **** is wrong here? - by xir - 22.05.2011, 09:18
Re: WHAT THE **** is wrong here? - by Cjgogo - 22.05.2011, 09:25

Forum Jump:


Users browsing this thread: 2 Guest(s)