22.06.2015, 13:13
pawn Код:
public OnGangZoneDataLoaded(gangId)
{
new zones = cache_num_rows(), id;
for (new i = 0; i < zones; i++) {
id = loadedGangZonesCount++;
zInfo[id][zOrmId] = orm_create("gang_zones");
orm_addvar_int(zInfo[id][zOrmId], zInfo[id][zId], "id");
orm_addvar_int(zInfo[id][zOrmId], zInfo[id][zGangId], "gang");
orm_addvar_float(zInfo[id][zOrmId], zInfo[id][zStartX], "start_x");
orm_addvar_float(zInfo[id][zOrmId], zInfo[id][zStartY], "start_y");
orm_addvar_float(zInfo[id][zOrmId], zInfo[id][zEndX], "end_x");
orm_addvar_float(zInfo[id][zOrmId], zInfo[id][zEndY], "end_y");
orm_addvar_float(zInfo[id][zOrmId], zInfo[id][zAttackX], "attack_x");
orm_addvar_float(zInfo[id][zOrmId], zInfo[id][zAttackY], "attack_y");
orm_addvar_float(zInfo[id][zOrmId], zInfo[id][zAttackZ], "attack_z");
orm_apply_cache(zInfo[id][zOrmId], i);
zInfo[id][zGameZoneId] = GangZoneCreate(zInfo[id][zStartX], zInfo[id][zStartY], zInfo[id][zEndX], zInfo[id][zEndY]);
zInfo[id][zPickupId] = CreatePickup(1313, 1, zInfo[id][zAttackX], zInfo[id][zAttackY], zInfo[id][zAttackZ]);
zPickups[zInfo[id][zPickupId]] = id;
zInfo[id][zUnderAttack] = false;
GangZoneShowForAll(zInfo[id][zGameZoneId], gInfo[zInfo[id][zGangId]][gColor]);
}
}
Does GangZoneShowForAll require calling on every spawn? or what?