07.06.2016, 13:36
Alright so there is one problem with this, it will delete the entire map for some reason.
It will only print the object ID that it has destroyed but it will destroy all CreateDynamicObject
PHP Code:
public OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x,Float:y,Float:z) {
for(new i = 0; i < sizeof(dInfo); i++) {
if(objectid == dInfo[i][DeerObject]) {
if(IsValidDynamicObject(dInfo[i][DeerObject])) {
new Float:Pos[3];
GetDynamicObjectPos(dInfo[i][DeerObject],Pos[0],Pos[1],Pos[2]);
new Float:rr = frandomEx(1.00,10.00);
CreateMeatObject(rr,Pos[0],Pos[1],Pos[2],0.0,0.0,0.0);
SetDynamicObjectPos(dInfo[i][DeerObject],0.0,0.0,2500.0);
DestroyDynamicObject(dInfo[i][DeerObject]);
printf("Breaking object ID: %i",objectid);
break;
}
}
}
printf("Breaking object ID: %i",objectid);
return 1;
}