Advertisement
Guest User

GTA V .NET get speed limit

a guest
Oct 28th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.79 KB | None | 0 0
  1. //made by w35 of LCPDFR.com. slight modifications by me
  2. public static int GetSpeedLimit(string streetName)
  3. {
  4.     Ped character = Game.Player.Character;
  5.     Vector3 pos = character.Position;
  6.     int result = 45;
  7.    
  8.     if (!str.Contains("Los Santos Freeway") && !str.Contains("Los Santos Fwy") && !str.Contains("Del Perro") && !str.Contains("Olympic") && !str.Contains("La Puerta"))
  9.     {
  10.         if (!str.Contains("Great Ocean") && !str.Contains("Tongva Dr") && !str.Contains("Senora Fwy") && !str.Contains("Palomino Fwy") && !str.Contains("Senora Freeway") && !str.Contains("Palomino Freeway") && !str.Contains("Elysian Fields") && !str.Contains("Route") && !str.Contains("Droga") && !str.Contains("68"))
  11.         {
  12.             if (str.Contains("Senora Rd"))
  13.             {
  14.                 if (str.Contains("County"))
  15.                 {
  16.                     result = 60;
  17.                 }
  18.                 else
  19.                 {
  20.                     result = 35;
  21.                 }
  22.             }
  23.             else if (!str.Contains("Panorama Dr"))
  24.             {
  25.                 if (!str.Contains("Joshua Rd"))
  26.                 {
  27.                     if (str.Contains("Baytree Canyon Rd"))
  28.                     {
  29.                         if (pos.X <= 426.0f && pos.Y <= 2123.0f && pos.Y >= 1698.0f)
  30.                         {
  31.                             result = 35;
  32.                         }
  33.                         else
  34.                         {
  35.                             result = 50;
  36.                         }
  37.                     }
  38.                     else if (!str.Contains("County"))
  39.                     {
  40.                         if (str.Contains("City"))
  41.                         {
  42.                             result = 25;
  43.                         }
  44.                         else
  45.                         {
  46.                             result = 0;
  47.                         }
  48.                     }
  49.                     else
  50.                     {
  51.                         result = 35;
  52.                     }
  53.                 }
  54.                 else if (pos.Y >= 3483.0f)
  55.                 {
  56.                     result = 50;
  57.                 }
  58.                 else
  59.                 {
  60.                     result = 60;
  61.                 }
  62.             }
  63.             else
  64.             {
  65.                 result = 50;
  66.             }
  67.         }
  68.         else
  69.         {
  70.             if (str.Contains("City"))
  71.             {
  72.                 result = 45;
  73.             }
  74.             else
  75.             {
  76.                 result = 60;
  77.             }
  78.             if (str.Contains("68") && pos.X > 1566.0f)
  79.             {
  80.                 result = 50;
  81.             }
  82.         }
  83.     }
  84.     else if (!str.Contains("City"))
  85.     {
  86.         result = 60;
  87.     }
  88.    
  89.     return result;
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement