OnPlayerShootDynamicObject issue
#3

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

PHP Code:
public DeerRespawn() {
    new 
SpawnTimes 0;
        
    for(new 
0sizeof(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;
    }

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.
Reply


Messages In This Thread
OnPlayerShootDynamicObject issue - by TwinkiDaBoss - 07.06.2016, 13:36
Re: OnPlayerShootDynamicObject issue - by IstuntmanI - 07.06.2016, 14:13
Re: OnPlayerShootDynamicObject issue - by TwinkiDaBoss - 07.06.2016, 19:38
Re: OnPlayerShootDynamicObject issue - by TwinkiDaBoss - 07.06.2016, 19:58

Forum Jump:


Users browsing this thread: 1 Guest(s)