[Tutorial] Single command multiple task
#7

IsPlayerInRangeOfPoint has only 5 arguments and not 7!:
PHP код:
IsPlayerInRangeOfPoint(playeridFloat:radiusFloat:xFloat:yFloat:z); 
You've declared the array to have an unknown amount of indexes (you resolve the unknown part by creating the indexes yourself) and with an unknown amount of sub-indexes. This seems very redundant since the purpose limits you to have only 3 values. Thus, gRange can only have 3 values:
Код:
X-coordinate
Y-coordinate
Z-coordinate
A player's position can have 4 coordinates (including facing angle):
Код:
X-coordinate
Y-coordinate
Z-coordinate
A-coordinate
But why would you need the facing angle for IsPlayerInRangeOfPoint? The function doesn't even accept it as an argument. So, to fix your problem:

PHP код:
new Float:gRange[][3] = 

    {
141.04659,1970.46704,21.30360}, 
    {
141.89529,1963.32434,18.85600}, 
    {
213.60159,1850.90369,12.89270}, 
    {
256.99011,1845.92261,9.53800}, 
    {
248.82294,1842.09045,9.00760
};
// This has to be in your loop:
if(IsPlayerInRangeOfPoint(playerid5.0gRange[i][0], gRange[i][1], gRange[i][2])) 
Reply


Messages In This Thread
Single command multiple task - by JohnBlaze1971 - 03.04.2016, 15:13
Re: Single command multiple task - by Vanter - 03.04.2016, 15:14
Re: Single command multiple task - by fuckingcruse - 03.04.2016, 15:50
Re: Single command multiple task - by AndySedeyn - 03.04.2016, 15:51
Re: Single command multiple task - by fuckingcruse - 03.04.2016, 15:53
Re: Single command multiple task - by Kasis - 05.04.2016, 11:46
Re: Single command multiple task - by AndySedeyn - 05.04.2016, 12:01
Re: Single command multiple task - by Kasis - 05.04.2016, 14:24
Re: Single command multiple task - by AndySedeyn - 05.04.2016, 14:25
Re: Single command multiple task - by Kasis - 05.04.2016, 14:48

Forum Jump:


Users browsing this thread: 2 Guest(s)