11.09.2013, 08:53
You're welcome, but
you should consider this. It should look like
then adjust the loop too
Quote:
After you delete the object of course you will want to reset that object reference to -1 to be reused.
|
pawn Код:
DestroyObject(oObjectID[playerid][slot]);
oObjectID[playerid][slot] = -1;
pawn Код:
for(new i = 0; i < MAX_OBJECTS_PP; i++)
{
if(oObjectID[playerid][i] != -1)
{
oObjectID[playerid][i] = CreateObject(objectid, pos[0], pos[1], pos[2], 0.0, 0.0, pos[3]);
break;
}
}