15.03.2012, 16:40
Then you should have a global array like this
and read objects like:
Then you can delete them by:
pawn Код:
#define MY_OBJECTS 50 // The max. number of objects you could have in the temp map
new tempMapObjects[MY_OBJECTS];
pawn Код:
new
tempMapData[e_ObjectData], i;
while(i < MY_OBJECTS && mysql_fetch_row_format(query,"|"))
{
sscanf(query, "p<|>e<dffffffs[128]fd>", tempMapData);
tempMapObjects[i++] = CreateObject(tempMapData[model], tempMapData[Xpos], tempMapData[Ypos], tempMapData[Zpos], tempMapData[RX], tempMapData[RY], tempMapData[RZ], tempMapData[DrawDist]);
}
pawn Код:
for(new i; i < MY_OBJECTS; i++) { DestroyObject(tempMapObjects[i]); tempMapObjects[i] = 0; }