Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fasted Loopings By SuYaNw / Garfield
- #include a_samp
- stock slPlayers;
- public OnPlayerConnect(playerid) return slPlayers++;
- public OnPlayerDisconnect(playerid, reason) return slPlayers--;
- #if defined _ALS_OnPlayerConnect
- #undef OnPlayerConnect
- #else
- #define _ALS_OnPlayerConnect
- #endif
- #define OnPlayerConnect sOnPlayerConnect
- #if defined _ALS_OnPlayerDisconnect
- #undef OnPlayerConnect
- #else
- #define _ALS_OnPlayerDisconnect
- #endif
- #define OnPlayerDisconnect sOnPlayerDisconnect
- sOnPlayerConnect(playerid);
- aOnPlayerDisconnect(playerid);
- #define sPlayers(%0,%1) \
- new bool:g___ = %1, c___;c___ = (g___ ? (slPlayers) : (GetMaxPlayers())); \
- for(new %0, getAdicional = c___ == 0 ? (c___ + 0x1) : (c___); %0 != _: (getAdicional); ++%0)
- // Test
- public OnFilterScriptInit()
- {
- //new PlayerTextDraw[MAX_PLAYERS];
- sPlayers(i, false)
- {
- //PlayerTextDraw[i] = CreateTextDraw(125.200, 100.000, "Hi ;)");
- printf("Modo: %s | Percorrer: %i", g___ ? ("All_Players") : ("GetMaxPlayers"), i);
- /* */
- }
- // printf("Modo: %s | Percorrer: %i", g___ ? ("All_Players") : ("GetMaxPlayers"), i);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement