07.06.2016, 19:38
Yeah I was testing something with the SetDynamicObjectPos so I left it there, forgot to remove it
Regarding the object id's, not sure mate.. It reads the ID correctly. It prints out that object ID 85 has been removed and after 1 sec it removes the entire map lol (all dynamic objects from the map)
EDIT: This is the code which spawns it
The first deer doesnt remove the map, only the second one does.
Map respawns when the deer respawns and then after X seconds it dissapears again.
Regarding the object id's, not sure mate.. It reads the ID correctly. It prints out that object ID 85 has been removed and after 1 sec it removes the entire map lol (all dynamic objects from the map)
EDIT: This is the code which spawns it
PHP Code:
public DeerRespawn() {
new SpawnTimes = 0;
for(new i = 0; i < sizeof(dInfo); i++) {
new rand = random(sizeof(DeerLocation));
DestroyDynamicObject(dInfo[i][DeerObject]);
dInfo[i][dx] = DeerLocation[rand][0];
dInfo[i][dy] = DeerLocation[rand][1];
dInfo[i][dz] = DeerLocation[rand][2];
dInfo[i][DeerObject] = CreateDynamicObject(19315,dInfo[i][dx],dInfo[i][dy],dInfo[i][dz],0.0,0.0,0.0);
printf("Deer %i spawned at %.2f,%.2f,%.2f",i,DeerLocation[rand][0],DeerLocation[rand][1],DeerLocation[rand][2]);
SpawnTimes += 1;
}
}
Map respawns when the deer respawns and then after X seconds it dissapears again.