07.02.2017, 07:38
Greeting..
I have problems with destroy object ..
Creates nice, but when I will destroy, just destroya one object why?
Creating three, again destroya only one ..
Code
How to destroya all?
I have problems with destroy object ..
Creates nice, but when I will destroy, just destroya one object why?
Creating three, again destroya only one ..
Code
Код:
#define MAX_BARICADES 200
new baricade[MAX_BARICADES];
//
// creates baricades
//
orgPd_baricade(playerid, modelid) {
new Float:x,
Float:y,
Float:z,
i;
game_GetViewPosition(playerid, x, y, z, 4.6);
baricade[i] = CreateDynamicObject(modelid, x, y, z, 0.00000, 0.00000, 0.00000);
EditDynamicObject(playerid, baricade[i]);
INFO("Baricade Created.");
return 1;
}
//
//DEL baricade
//
CMD:deleteall(playerid, params[]){
new i;
for (i = 0; i < MAX_BARICADES; i++) {
if (baricade[i] == NULL)
continue;
DestroyDynamicObject(baricade[i]);
break;
}
INFO("Delete all baricades");
return 1;
}


