online players TEAMS
#1

Tell me how to save the number of online fractions in ONE variable?
I do:
new on‌linelspd = 0;
new on‌linefbi = 0;
new on‌linearmy = 0;

in the Authorization I check the player on the faction and add ++ to onlinelspd or onlinefbi for example
when I take out, I take it away;

how can I make it easier?
Reply
#2

You could use an enum.

PHP Code:
enum EMyFactions
{
    
LSPD,
    
FBI,
    
Army
}
new 
gMyFactionMemberCount[EMyFactions]; 
Then simply manipulate it like

PHP Code:
gMyFactionMemberCount[LSPD]++; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)