11.05.2014, 15:13
for(new i = 0; i < sizeof(TurfInfo); i++)
{
Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
}// Zones
public LoadTurfs()
{
new sql[200], sqldata[600], idx, arrCoords[20][100];
format(sql,sizeof(sql),"SELECT * FROM `turfsdata` ORDER BY `idz`");
mysql_query(sql);
mysql_store_result();
while(mysql_fetch_row_format(sqldata, "|"))
{
split(sqldata, arrCoords, '|');
format(TurfInfo[idx][zOwner],63, arrCoords[0]);
format(TurfInfo[idx][zColor],19, arrCoords[1]);
TurfInfo[idx][zMinX] = floatstr(arrCoords[2]);
TurfInfo[idx][zMinY] = floatstr(arrCoords[3]);
TurfInfo[idx][zMaxX] = floatstr(arrCoords[4]);
TurfInfo[idx][zMaxY] = floatstr(arrCoords[5]);
TurfInfo[idx][zMoney] = strval(arrCoords[6]);
TurfInfo[idx][zBombed] = strval(arrCoords[7]);
TurfInfo[idx][zDrugs] = strval(arrCoords[8]);
TurfInfo[idx][zMats] = strval(arrCoords[9]);
TurfInfo[idx][zID] = strval(arrCoords[10]);
TurfInfo[idx][zLevel] = strval(arrCoords[11]);
TurfInfo[idx][zTurfLevel] = strval(arrCoords[12]);
TurfInfo[idx][zX] = floatstr(arrCoords[13]);
TurfInfo[idx][zY] = floatstr(arrCoords[14]);
TurfInfo[idx][zZ] = floatstr(arrCoords[15]);
TurfInfo[idx][zGet] = strval(arrCoords[16]);
format(TurfInfo[idx][zName], 63, arrCoords[17]);
idx++;
}
return 1;
}
{
Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
}// Zones
public LoadTurfs()
{
new sql[200], sqldata[600], idx, arrCoords[20][100];
format(sql,sizeof(sql),"SELECT * FROM `turfsdata` ORDER BY `idz`");
mysql_query(sql);
mysql_store_result();
while(mysql_fetch_row_format(sqldata, "|"))
{
split(sqldata, arrCoords, '|');
format(TurfInfo[idx][zOwner],63, arrCoords[0]);
format(TurfInfo[idx][zColor],19, arrCoords[1]);
TurfInfo[idx][zMinX] = floatstr(arrCoords[2]);
TurfInfo[idx][zMinY] = floatstr(arrCoords[3]);
TurfInfo[idx][zMaxX] = floatstr(arrCoords[4]);
TurfInfo[idx][zMaxY] = floatstr(arrCoords[5]);
TurfInfo[idx][zMoney] = strval(arrCoords[6]);
TurfInfo[idx][zBombed] = strval(arrCoords[7]);
TurfInfo[idx][zDrugs] = strval(arrCoords[8]);
TurfInfo[idx][zMats] = strval(arrCoords[9]);
TurfInfo[idx][zID] = strval(arrCoords[10]);
TurfInfo[idx][zLevel] = strval(arrCoords[11]);
TurfInfo[idx][zTurfLevel] = strval(arrCoords[12]);
TurfInfo[idx][zX] = floatstr(arrCoords[13]);
TurfInfo[idx][zY] = floatstr(arrCoords[14]);
TurfInfo[idx][zZ] = floatstr(arrCoords[15]);
TurfInfo[idx][zGet] = strval(arrCoords[16]);
format(TurfInfo[idx][zName], 63, arrCoords[17]);
idx++;
}
return 1;
}