forward AtmsLoad();
public AtmsLoad()
{
new rows = cache_num_rows();
if(rows)
{
new index = Iter_Free(i_ATM);
for(new i = 0; i < rows; i++)
{
cache_get_value_int(i, "ID", AtmInfo[index][aID]);
cache_get_value_float(i, "PosX", AtmInfo[index][aPosX]);
cache_get_value_float(i, "PosY", AtmInfo[index][aPosY]);
cache_get_value_float(i, "PosZ", AtmInfo[index][aPosZ]);
cache_get_value_float(i, "Angle", AtmInfo[index][aAngle]);
cache_get_value_int(i, "VW", AtmInfo[index][aVW]);
cache_get_value_int(i, "Interior", AtmInfo[index][aInt]);
AtmInfo[i][AtmExist] = true;
Iter_Add(i_ATM, index);
CreateAtm(index);
}
printf("ATMs loaded: %d", rows);
}
return 1;
}
forward AtmsLoad();
public AtmsLoad()
{
new rows = cache_num_rows();
if(rows)
{
for(new i = 0; i < rows; i++)
{
new index = Iter_Free(i_ATM);
cache_get_value_int(i, "ID", AtmInfo[index][aID]);
cache_get_value_float(i, "PosX", AtmInfo[index][aPosX]);
cache_get_value_float(i, "PosY", AtmInfo[index][aPosY]);
cache_get_value_float(i, "PosZ", AtmInfo[index][aPosZ]);
cache_get_value_float(i, "Angle", AtmInfo[index][aAngle]);
cache_get_value_int(i, "VW", AtmInfo[index][aVW]);
cache_get_value_int(i, "Interior", AtmInfo[index][aInt]);
AtmInfo[i][AtmExist] = true;
Iter_Add(i_ATM, index);
CreateAtm(index);
}
printf("ATMs loaded: %d", rows);
}
return 1;
}
forward AtmsLoad();
public AtmsLoad()
{
new rows = cache_num_rows();
if(rows)
{
new index = Iter_Free(i_ATM);
for(new i = 0; i < rows; i++)
{
cache_get_value_int(i, "ID", AtmInfo[index][aID]);
cache_get_value_float(i, "PosX", AtmInfo[index][aPosX]);
cache_get_value_float(i, "PosY", AtmInfo[index][aPosY]);
cache_get_value_float(i, "PosZ", AtmInfo[index][aPosZ]);
cache_get_value_float(i, "Angle", AtmInfo[index][aAngle]);
cache_get_value_int(i, "VW", AtmInfo[index][aVW]);
cache_get_value_int(i, "Interior", AtmInfo[index][aInt]);
AtmInfo[i][AtmExist] = true;
Iter_Add(i_ATM, index);
CreateAtm(index);
}
printf("ATMs loaded: %d", rows);
}
return 1;
}
CreateAtm(id)
{
new string[120];
format(string, sizeof(string), ""SERVERBLUE"ID: "WHITE"%d\n"SERVERBLUE"ATM\n"WHITE"To use ATM press 'Y'", AtmInfo[id][aID]);
AtmLabel[id] = CreateDynamic3DTextLabel(string, 0x1D9F00AA, AtmInfo[id][aPosX], AtmInfo[id][aPosY], AtmInfo[id][aPosZ]+0.1, 25.0, _, _, _, 0, 0, _, _);
AtmObject[id] = CreateDynamicObject(ATM_OBJECT, AtmInfo[id][aPosX], AtmInfo[id][aPosY], AtmInfo[id][aPosZ], 0.0, 0.0, AtmInfo[id][aAngle], AtmInfo[id][aVW], AtmInfo[id][aInt], _, _);
return 1;
}
So you are suggesting this??
Код:
code Problem is that ID 0 is treated as ID 1 ID 1 is treated as ID 2 ID 2 is treated as ID 3... |