GangZoneShowForAll Not working as expected
#3

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]);
    }
}
I now realized every time this function OnGangZoneDataLoaded get called zone show for player, but only when it calls.

Does GangZoneShowForAll require calling on every spawn? or what?
Reply


Messages In This Thread
GangZoneShowForAll Not working as expected - by CoaPsyFactor - 22.06.2015, 13:05
Re: GangZoneShowForAll Not working as expected - by Sawalha - 22.06.2015, 13:08
Re: GangZoneShowForAll Not working as expected - by CoaPsyFactor - 22.06.2015, 13:13
Re: GangZoneShowForAll Not working as expected - by Larceny - 22.06.2015, 14:40
Re : GangZoneShowForAll Not working as expected - by KillerDVX - 22.06.2015, 17:13

Forum Jump:


Users browsing this thread: 1 Guest(s)