05.08.2016, 13:54
Quote:
Check if the player's is admin inside the if statement about faction >= 0
pawn Код:
|
Everything within the dialog functions well, the only thing that fucks me up is the enum, let me show you.
Up top, I have this
Код:
#define MAX_FACTIONS (20)
Код:
new fData[MAX_FACTIONS][factions];
Код:
forward OnFactionLoad(); public OnFactionLoad() { new rows, fields, count = 0; cache_get_data(rows, fields, mysql); if(rows) { while(count < rows) { fData[count][fID] = cache_get_field_content_int(count, "fID"); cache_get_field_content(count, "fName", fData[count][fName], mysql, 30); and so on, all data gets loaded count++; } printf("%i factions loaded.", count); } else printf("No factions found."); factioncount = count; }
What my check does is
Код:
fData[pData[playerid][pFaction][fID]
Код:
fData[0][fID]
Код:
1

And my thing is that if a player isn't in a faction, the pFaction of that playerid is 0
How would I go and re-write/fix this?