18.10.2016, 18:05
I have a MAX_WEAPONS which is set to 1000.
However, when a weapon is deleted it leaves an ID missing, so while there may be 10 weapons, it might be rows 990 to 1000 that are in the game, therefore leaving 990 slots free but it would return no weapon slots.
How do I load it to make sure that MAX_WEAPONS is filled but the ID is stored in the variables without their being 1000.
However, when a weapon is deleted it leaves an ID missing, so while there may be 10 weapons, it might be rows 990 to 1000 that are in the game, therefore leaving 990 slots free but it would return no weapon slots.
pawn Код:
forward LoadWeapons();
public LoadWeapons()//This is loading weapons, simple as.
{
new QueryString[128];
//mysql_query( "SELECT id, VehModel,VehOwner, VehColour1, VehColour2, VehPlate, VehSpawnX, VehSpawnY, VehSpawnZ, VehSpawnAngle, VehFuel, VehCash,VehWep1,VehWepA1,VehWep2,VehWepA2, VehArmour,VehFaction,VehFRank, VehOwned, VehFactioned, VehWeed, VehCoke, VehBizID, VehForSale,VehPrice FROM vehicles");
//mysql_store_result();
new weaponid;
new rows, fields;
cache_get_data(rows, fields);
for(new y; y != rows; y++)
{
cache_get_row(y, wwid, QueryString);
weaponid = strval(QueryString);
cache_get_row(y, wWepModel, QueryString);
WepModel[weaponid] = strval( QueryString);