Valid Dynamic Object
#1

Alright so I got a simple loop to check for valid objects from the 2d array. Now the problem is quite simple, it will detect objects that have been previously destroyed as valid.


PHP код:
new testobject[3];
CMD:test(playerid,params[]) {
    new 
Float:XFloat:YFloat:Z;
    for(new 
0sizeof(TestObject); i++) {
        if(
IsValidDynamicObject(TestObject[i])) {
            
GetDynamicObjectPos(TestObject[i], XYZ);
            if(
IsPlayerInRangeOfPoint(playerid5XYZ)) {
                
printf("in range of the object");
            }
        }
    }
    return 
true;

Testobject are 3 objects created under GameModeInit
Reply


Messages In This Thread
Valid Dynamic Object - by TwinkiDaBoss - 12.12.2015, 15:49
Re: Valid Dynamic Object - by Patrick - 12.12.2015, 15:58
Re: Valid Dynamic Object - by TwinkiDaBoss - 12.12.2015, 16:00
Re: Valid Dynamic Object - by Patrick - 12.12.2015, 16:09
Re: Valid Dynamic Object - by Jefff - 12.12.2015, 16:09
Re: Valid Dynamic Object - by TwinkiDaBoss - 12.12.2015, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)