Help with Argument 3
#10

Currently, you have 3 positions to TruckingUnload array. In case you get more and you cannot check if a player is in range of position 1, if not, check position 2 etc. a loop would do the job for you.

PHP код:
for (new i!= sizeof (TruckingUnload); ++i)
{
    if(
IsPlayerInRangeOfPoint(playerid7.0TruckingUnload[i][0], TruckingUnload[i][1], TruckingUnload[i][2]))
    {
        
// in range.. "i" holds the index. For example, "i" is 2. So you're in range of the 3rd position (remember indexes start with 0)
        
break;
    }

Reply


Messages In This Thread
Help with Argument 3 - by Genmetal - 15.04.2015, 13:56
Re: Help with Argument 3 - by ATGOggy - 15.04.2015, 14:00
Re: Help with Argument 3 - by Genmetal - 15.04.2015, 14:09
Re: Help with Argument 3 - by Genmetal - 15.04.2015, 14:33
Re: Help with Argument 3 - by ATGOggy - 15.04.2015, 14:35
Re: Help with Argument 3 - by Genmetal - 15.04.2015, 14:40
Re: Help with Argument 3 - by J4Rr3x - 15.04.2015, 15:24
Re: Help with Argument 3 - by Konstantinos - 15.04.2015, 16:02
Re: Help with Argument 3 - by Genmetal - 15.04.2015, 17:02
Re: Help with Argument 3 - by Konstantinos - 15.04.2015, 17:09

Forum Jump:


Users browsing this thread: 1 Guest(s)