OnPlayerKeyStateChange
#3

PHP Code:
if(newkeys KEY_SUBMISSION)
  
    {
       if(!
isLEO(playerid)) return 0;
        foreach(new 
Player)
        {
            new 
msg[100];
            if(
GetDistanceBetweenPlayers(playeridi) < 7.0 && Player[i][playerWanted] < && Player[i][playerWanted] != 0)
            {
                
format(msg100"/ticket %d"i);
                return 
OnPlayerCommandReceived(playeridmsg);
            }
            if(
GetDistanceBetweenPlayers(playeridi) < 7.0 && Player[i][playerWanted] > 5)
            {
                
format(msg100"/arrest %d"i);
                return 
OnPlayerCommandReceived(playeridmsg);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"No suspects in range.");
                break;
            }
        }
    }
    if(
newkeys KEY_SUBMISSION)
    {
       if(
IsNowTicketed[playerid] == false) return 0;
        new 
msg[78];
        
format(msg100"/payticket %d"TicketCop[playerid]);
        return 
OnPlayerCommandReceived(playeridmsg);
    } 
and you can use onplayercommandtext instead donno why you use commandreceived
Reply


Messages In This Thread
OnPlayerKeyStateChange - by Longover - 04.11.2018, 16:30
Re: OnPlayerKeyStateChange - by v1k1nG - 04.11.2018, 16:36
Re: OnPlayerKeyStateChange - by khRamin78 - 05.11.2018, 08:19

Forum Jump:


Users browsing this thread: 2 Guest(s)