SHARE
TWEET

ShittyCode for SmirnoffBG

a guest Jan 22nd, 2020 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <amxmodx>
  2.  
  3. #if !defined MAX_PLAYERS
  4.     #define MAX_PLAYERS 32
  5. #endif
  6.  
  7. #define PREFIX                  "^x04[^x01PREFIX^x04] "
  8. #define SENDCHATMESSAGE(%1,%2)  ColorChat(%1, RED, %2)
  9. #define GETUSERTEAM(%1)         get_user_team(%1)
  10. #define GETUSERNAME(%1,%2,%3)   get_user_name(%1, %2, %3)
  11.  
  12. stock get_players_by_name(id, iPlayersParam[MAX_PLAYERS], &iCount, szString[50])
  13. {
  14.     new iPlayers[32], iPlayersNum
  15.     get_players(iPlayers, iPlayersNum)
  16.  
  17.     if (szString[0] == '@')
  18.     {
  19.         if (equal(szString, "@random"))
  20.         {
  21.             return iPlayers[random(iPlayersNum - 1)]
  22.         }
  23.  
  24.         const c_iASCIINumberFactor = 48
  25.         new iTeam = szString[1] - c_iASCIINumberFactor
  26.         for (--iPlayersNum; iPlayersNum >= 0; iPlayersNum--)
  27.         {
  28.             if (GETUSERTEAM(iPlayers[iPlayersNum]) == iTeam)
  29.             {
  30.                 iPlayersParam[iCount++] = iPlayers[iPlayersNum]
  31.             }
  32.         }
  33.     }
  34.  
  35.     for (--iPlayersNum; iPlayersNum >= 0; iPlayersNum--)
  36.     {
  37.         if (contain(GETUSERNAME(iPlayers[iPlayersNum]), szString))
  38.         {
  39.             iPlayersParam[iCount++] = iPlayers[iPlayersNum]
  40.         }
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top