Creating object from MySQL [+rep?]
#9

Then you should have a global array like this

pawn Код:
#define MY_OBJECTS 50 // The max. number of objects you could have in the temp map
new tempMapObjects[MY_OBJECTS];
and read objects like:

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]);
}
Then you can delete them by:

pawn Код:
for(new i; i < MY_OBJECTS; i++) { DestroyObject(tempMapObjects[i]); tempMapObjects[i] = 0; }
Reply


Messages In This Thread
Creating object from MySQL [+rep?] - by Michael@Belgium - 11.03.2012, 10:55
Re: Creating object from MySQL [+rep?] - by Shabi RoxX - 11.03.2012, 11:06
Re: Creating object from MySQL [+rep?] - by Michael@Belgium - 11.03.2012, 11:35
Re: Creating object from MySQL [+rep?] - by Shabi RoxX - 11.03.2012, 11:39
Re: Creating object from MySQL [+rep?] - by Vince - 11.03.2012, 12:16
Re: Creating object from MySQL [+rep?] - by Michael@Belgium - 11.03.2012, 12:50
Re: Creating object from MySQL [+rep?] - by Michael@Belgium - 15.03.2012, 16:30
Re: Creating object from MySQL [+rep?] - by iPLEOMAX - 15.03.2012, 16:36
Re: Creating object from MySQL [+rep?] - by SimonItaly - 15.03.2012, 16:40
Re: Creating object from MySQL [+rep?] - by Michael@Belgium - 15.03.2012, 16:42

Forum Jump:


Users browsing this thread: 2 Guest(s)