online players TEAMS - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: online players TEAMS (
/showthread.php?tid=652125)
online players TEAMS -
EvgeniyHostel1992 - 03.04.2018
Tell me how to save the number of online fractions in ONE variable?
I do:
new onlinelspd = 0;
new onlinefbi = 0;
new onlinearmy = 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?
Re: online players TEAMS -
Jstylezzz - 03.04.2018
You could use an enum.
PHP Code:
enum EMyFactions
{
LSPD,
FBI,
Army
}
new gMyFactionMemberCount[EMyFactions];
Then simply manipulate it like
PHP Code:
gMyFactionMemberCount[LSPD]++;