27.05.2014, 13:26
Well any version between R8 r14 to R38 (latest) will work.
---
That's bad. Except that it will try to get data from invalid rows, it will set the timer that will create pickups and 3D labels even if there are no rows. Plus it will create those even if these gangs don't exist and by not resetting the variables, it will mess the things up.
---
pawn Код:
forward loadGangs();
public loadGangs()
{
for(new i; i != MAX_GANG; i++)
{
cache_get_field_content(0,"g_name",gInfo[i][g_name],dbHandle);
cache_get_field_content(0,"g_motd",gInfo[i][g_motd],dbHandle);
cache_get_field_content(0,"g_leader",gInfo[i][g_leader],dbHandle);
gInfo[i][g_pos_hq][0] = cache_get_field_content_float(0,"g_hq_x",dbHandle);
gInfo[i][g_pos_hq][1] = cache_get_field_content_float(0,"g_hq_y",dbHandle);
gInfo[i][g_pos_hq][2] = cache_get_field_content_float(0,"g_hq_z",dbHandle);
gInfo[i][g_pos_hq_int][0] = cache_get_field_content_float(0,"g_hq_int_x",dbHandle);
gInfo[i][g_pos_hq_int][1] = cache_get_field_content_float(0,"g_hq_int_y",dbHandle);
gInfo[i][g_pos_hq_int][2] = cache_get_field_content_float(0,"g_hq_int_z",dbHandle);
}
SetTimer("loadAllGangs",2000,false);
return 1;
}