GangZones.
#1

Ok, the functions in this code do not need to be shown, because it has nothing to do with the problem, the functions work with no problem.

The main objective of what I'm trying to accomplish is making the gang-zones appear. Apparently, that was successful, but it appears to show it 1024 times. Looping doesn't really work like the way the function is reacting. The loop is just showing the gangzones each 1024, when it's supposed to show it once.

Just a notice, that it has nothing to do with the colors, I changed the transparency of the colors, and still failed. The code is below.

pawn Код:
for(new i = 0; i < TOTAL_GANGZONES; i ++ ) {
        if(i >= TOTAL_FACTIONS) break;
        GangZoneShowForPlayer(playerid, GangZoneStructure[i], ConvertZoneColor(FactionData[GangZoneData[i][gzFID]][fAreaColor]));
}
Reply
#2

What are you trying to do with "break;"? Stop the loop completely or skip the current value and continue on?
Reply
#3

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
What are you trying to do with "break;"? Stop the loop completely or skip the current value and continue on?
What i'm trying to do is not make the loop override the total amount of factions, if it does it will break the loop, even trying to remove that, the problem still occurs.
Reply
#4

What are the values for TOTAL_GANGZONES and TOTAL_FACTIONS ?
Reply
#5

TOTAL_GANGZONES - 1024
TOTAL_FACTIONS - 50

I only have two gangzones in my database.
Reply
#6

Quote:
Originally Posted by Carlton
Посмотреть сообщение
Looping doesn't really work like the way the function is reacting. The loop is just showing the gangzones each 1024, when it's supposed to show it once.
With the values you have provided only 50 gang zones will be shown for the player. If your seeing more then this you must be calling the loop more then once.
Reply
#7

Quote:
Originally Posted by Betamaster
Посмотреть сообщение
With the values you have provided only 50 gang zones will be shown for the player. If your seeing more then this you must be calling the loop more then once.
That's the only loop I use with TOTAL_GANGZONES
Reply
#8

This was fixed, the colors has to do something with it.
Reply
#9

Quote:
Originally Posted by Carlton
Посмотреть сообщение
This was fixed, the colors has to do something with it.
Quote:
Originally Posted by Carlton
that it has nothing to do with the colors
God damnit

Well, glad you got it fixed anyway, sorry I couldn't have offered more help.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)