Code:
public OnGameModeInit()
{
CreateDynamicObject(3534, 2105.08276, 1003.17114, 45.41970, 0.0, 0.0, 0.0, 0, 0, -1); //objectid: 1
CreateDynamicObject(3534, 2110.11450, 1003.30292, 45.41975, 0.0, 0.0, 0.0, 0, 0, -1); //objectid: 2
CreateDynamicObject(3534, 2109.27148, 1001.49146, 45.41970, 0.0, 0.0, 0.0, 1, 0, -1); //remove this || objectid: 3
CreateDynamicObject(3534, 2106.31641, 1001.41577, 45.41970, 0.0, 0.0, 0.0, 0, 0, -1); //objectid: 4
CreateDynamicObject(3534, 2109.27148, 1004.59882, 45.41970, 0.0, 0.0, 0.0, 1, 0, -1); //remove this || objectid: 5
CreateDynamicObject(3534, 2106.31641, 1004.71191, 45.41970, 0.0, 0.0, 0.0, 0, 0, -1); //objectid: 6
return SetTimer("deleteMe", 1000, 0);
}
forward deleteMe();
public deleteMe()
{
for(new objectid = 1, j = Streamer_CountItems(STREAMER_TYPE_OBJECT, 1); objectid != j; objectid++)
{
if(!IsValidDynamicObject(objectid) || Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_WORLD_ID) != 1)
{
continue;
}
printf("DestroyDynamicObject(%d)", objectid);
DestroyDynamicObject(objectid);
}
return 1;
}