31.01.2015, 19:58
(
Последний раз редактировалось DRIFT_HUNTER; 31.01.2015 в 21:05.
)
Create include and hook to a CreateDynamicObject function, keep track of maximum object id and objects count...
You can also hook to a DestroyDynamicObject function and if destroyed object is the last one (maximal id) then loop back and check for valid objects (first one valid object is new maximal id)
EDIT: just visited streamer topic to check natives. And these came to my mind
EDIT: Noticed insane mistake i made (rush), fixed it now
You can also hook to a DestroyDynamicObject function and if destroyed object is the last one (maximal id) then loop back and check for valid objects (first one valid object is new maximal id)
EDIT: just visited streamer topic to check natives. And these came to my mind
EDIT: Noticed insane mistake i made (rush), fixed it now
pawn Код:
new objectscount = CountDynamicObjects();
new i = 0;
while(objectscount > 0)
{
if(IsValidDynamicObject(i))
{
//Do what you need here, but i++ goes in the end of the IF function
objectscount--;
}
i++;
}