MMB ARREST
#4

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
Instead of getting the position of every player and compare if the cop is in range, do the opposite. Get the cop's position only once before the loop and then check if criminals are in range. Also avoid returning 0.
You're right, Then the code should be like this...

PHP код:
      new Float:XFloat:YFloat:Z;
             
GetPlayerPos(targetidXYZ);
foreach(new 
targetid Player)
{
      if(
IsPlayerInRangeOfPoint(targetid10XYZ)
     {
            
//Put your whole arrest code here..
     
}

Reply


Messages In This Thread
MMB ARREST - by Thanks - 23.07.2018, 15:26
Re: MMB ARREST - by JasonRiggs - 23.07.2018, 15:34
Re: MMB ARREST - by Calisthenics - 23.07.2018, 15:46
Re: MMB ARREST - by JasonRiggs - 23.07.2018, 16:49
Re: MMB ARREST - by Thanks - 24.07.2018, 09:09
Re: MMB ARREST - by JasonRiggs - 24.07.2018, 10:44
Re: MMB ARREST - by Thanks - 25.07.2018, 07:34
Re: MMB ARREST - by coool - 25.07.2018, 09:10
Re: MMB ARREST - by GTLS - 26.07.2018, 14:54

Forum Jump:


Users browsing this thread: 2 Guest(s)