Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.01 KB | None | 0 0
  1. forward WorldBounds();
  2. public WorldBounds()
  3. {
  4.     static Float: g_f[3], iPlayerTick;
  5.     foreach(Player, i)
  6.     {
  7.         if (pInfo[i][Spawned])
  8.         {
  9.             for (new x = 0; x < MAX_WORLD_BOUNDRIES; x++)
  10.             {
  11.                 if (g_pBounds[x][bIsActive])
  12.                 {
  13.                     if (!(IsPlayerInArea(i, g_pBounds[x][fMaxX], g_pBounds[x][fMinX], g_pBounds[x][fMaxY], g_pBounds[x][fMinY])))
  14.                     {
  15.                             switch(iPlayerTick)
  16.                             {
  17.                                 case 0: // Their first "tick" outside of LS
  18.                                 {
  19.                                         SendClientMessage(i, COLOR_RED, "You have 10 seconds to return to Los Santos.");
  20.                                 }
  21.                            
  22.                                 case 10: // 10 seconds is up
  23.                                 {
  24.                             // ???
  25.                                 }
  26.                             }
  27.                             iPlayerTick++;
  28.                         }
  29.                         else
  30.                         {
  31.                                 // They've returned back inside the world boundries, reset this.
  32.                         if (iPlayerTick > 0)
  33.                         {
  34.                             iPlayerTick = 0;
  35.                         }
  36.                         }
  37.                 }
  38.             }
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement