Arrest per Keyboard
#3

Quote:
Originally Posted by Logic_
Посмотреть сообщение
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{    
    if(
newkeys == KEY_CROUCH)
    {
        if(
IsPlayerCop(playerid))
        {
            new 
FloatxFloat:yFloat:zFloatdistancepid INVALID_PLAYER_ID;
            
GetPlayerPos(pidxyz);
            for(new 
iGetPlayerPoolSize(); <= ji++)
            {
                if(!
IsPlayerConnected(i)) continue;
                
distance GetPlayerDistanceFromPoint(ixyz);
                if(
floatabs(distance) < 2)
                {
                    
pid i;
                    break;
                }
            }
            if(
pid != INVALID_PLAYER_ID)
            {
                
Arrest(pid);
                
// format a message maybe? and send it
            
}
            else
            {
                
SendClientMessage(playeridcolor"NOT IN RANGE");
            }
        }
    }
    return 
1;

^^.
thx but Its still saying "not in range" when I stand next to the player
Reply


Messages In This Thread
Arrest per Keyboard - by pulsare - 28.10.2017, 00:12
Re: Arrest per Keyboard - by Logic_ - 28.10.2017, 08:30
Re: Arrest per Keyboard - by pulsare - 28.10.2017, 12:59
Re: Arrest per Keyboard - by Arbico - 28.10.2017, 15:16
Re: Arrest per Keyboard - by pulsare - 28.10.2017, 15:29
Re: Arrest per Keyboard - by Bruno13 - 28.10.2017, 15:29
Re: Arrest per Keyboard - by pulsare - 28.10.2017, 16:20
Re: Arrest per Keyboard - by Logic_ - 28.10.2017, 17:10
Re: Arrest per Keyboard - by Lucases - 28.10.2017, 17:11
Re: Arrest per Keyboard - by pulsare - 28.10.2017, 18:22

Forum Jump:


Users browsing this thread: 1 Guest(s)