Advertisement
Guest User

San Fierro RPg / RealLife

a guest
May 6th, 2010
4,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 165.38 KB | None | 0 0
  1. //SAN FIERRO RPG GAMEMODE BY JAKKU
  2. //(C) COPYRIGHT 2010
  3. // DO NOT REMOVE THE CREDITS
  4. // DO NOT EDIT THE CODE
  5.  
  6.  
  7.  
  8. #include <a_samp>
  9. #include <core>
  10. #include <float>
  11. #include <dini>
  12. #include <dudb>
  13.  
  14. #pragma tabsize 0
  15.  
  16. //Some color defines =)
  17. #define COLOR_GREY 0xAFAFAFAA
  18. #define COLOR_RED 0xAA3333AA
  19. #define COLOR_YELLOW 0xFFFF00AA
  20. #define COLOR_POWDERBLUE 0xB0E0E6FF
  21. #define COLOR_WHITE 0xFFFFFFAA
  22. #define COLOR_BLUE 0x0000BBAA
  23. #define COLOR_LIGHTBLUE 0x33CCFFAA
  24. #define COLOR_ORANGE 0xFF9900AA
  25. #define COLOR_GOLD 0xFFD700FF
  26. #define COLOR_LIGHTGREEN 0x90EE90FF
  27. #define COLOR_OLIVE 0x808000FF
  28. #define COLOR_SALMON 0xFA8072FF
  29. #define COLOR_GREEN 0x00F20096
  30. #define COLOR_ORED 0xFF0000FF
  31. #define COLOR_MAGENTA 0xFF00FFFF
  32. #define COLOR_TEAL 0x008080FF
  33. #define COLOR_BROWN 0xFFBB7796
  34. #define TXT_MESSAGE_COST -2 //Text message cost
  35. #define MAX_ZONE_NAME 28
  36. #if defined _zones_included
  37. #endinput
  38. #endif
  39. #define _zones_included
  40. #pragma library samp
  41.  
  42. //Property-defines
  43. #define MAX_PROPERTIES 100 //Max amount of properties available (Don't change if you DON'T need more)
  44. #define MAX_PROPERTIES_PER_PLAYER 4 //How many props player can own at the same time
  45. #define ENABLE_MAP_ICON_STREAMER 1
  46. #define MAX_ZONE_NAME 28
  47. new PropertiesAmount;
  48. new InfoShowed[MAX_PLAYERS];
  49. new MP;
  50. enum propinfo
  51. {
  52.     PropName[64],
  53.     Float:PropX,
  54.     Float:PropY,
  55.     Float:PropZ,
  56.     PropIsBought,
  57.     PropUnbuyableTime,
  58.     PropOwner[MAX_PLAYER_NAME],
  59.     PropValue,
  60.     PropEarning,
  61.     PickupNr,
  62. }
  63. enum SAZONE_MAIN { //Betamaster
  64. SAZONE_NAME[28],
  65. Float:SAZONE_AREA[6]
  66. };
  67.  
  68. static const gSAZones[][SAZONE_MAIN] = {
  69.         //Zone name
  70.         {"The Big Ear",                 {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
  71.         {"Aldea Malvada",               {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
  72.         {"Angel Pine",                  {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
  73.         {"Arco del Oeste",              {-901.10,2221.80,0.00,-592.00,2571.90,200.00}},
  74.         {"Avispa Country Club",         {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00}},
  75.         {"Avispa Country Club",         {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00}},
  76.         {"Avispa Country Club",         {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00}},
  77.         {"Avispa Country Club",         {-2667.80,-302.10,-28.80,-2646.40,-262.30,71.10}},
  78.         {"Avispa Country Club",         {-2470.00,-355.40,0.00,-2270.00,-318.40,46.10}},
  79.         {"Avispa Country Club",         {-2550.00,-355.40,0.00,-2470.00,-318.40,39.70}},
  80.         {"Back o Beyond",               {-1166.90,-2641.10,0.00,-321.70,-1856.00,200.00}},
  81.         {"Battery Point",               {-2741.00,1268.40,-4.50,-2533.00,1490.40,200.00}},
  82.         {"Bayside",                     {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00}},
  83.         {"Bayside Marina",              {-2353.10,2275.70,0.00,-2153.10,2475.70,200.00}},
  84.         {"Beacon Hill",                 {-399.60,-1075.50,-1.40,-319.00,-977.50,198.50}},
  85.         {"Blackfield",                  {964.30,1203.20,-89.00,1197.30,1403.20,110.90}},
  86.         {"Blackfield",                  {964.30,1403.20,-89.00,1197.30,1726.20,110.90}},
  87.         {"Blackfield Chapel",           {1375.60,596.30,-89.00,1558.00,823.20,110.90}},
  88.         {"Blackfield Chapel",           {1325.60,596.30,-89.00,1375.60,795.00,110.90}},
  89.         {"Blackfield Intersection",     {1197.30,1044.60,-89.00,1277.00,1163.30,110.90}},
  90.         {"Blackfield Intersection",     {1166.50,795.00,-89.00,1375.60,1044.60,110.90}},
  91.         {"Blackfield Intersection",     {1277.00,1044.60,-89.00,1315.30,1087.60,110.90}},
  92.         {"Blackfield Intersection",     {1375.60,823.20,-89.00,1457.30,919.40,110.90}},
  93.         {"Blueberry",                   {104.50,-220.10,2.30,349.60,152.20,200.00}},
  94.         {"Blueberry",                   {19.60,-404.10,3.80,349.60,-220.10,200.00}},
  95.         {"Blueberry Acres",             {-319.60,-220.10,0.00,104.50,293.30,200.00}},
  96.         {"Caligula's Palace",           {2087.30,1543.20,-89.00,2437.30,1703.20,110.90}},
  97.         {"Caligula's Palace",           {2137.40,1703.20,-89.00,2437.30,1783.20,110.90}},
  98.         {"Calton Heights",              {-2274.10,744.10,-6.10,-1982.30,1358.90,200.00}},
  99.         {"Chinatown",                   {-2274.10,578.30,-7.60,-2078.60,744.10,200.00}},
  100.         {"City Hall",                   {-2867.80,277.40,-9.10,-2593.40,458.40,200.00}},
  101.         {"Come-A-Lot",                  {2087.30,943.20,-89.00,2623.10,1203.20,110.90}},
  102.         {"Commerce",                    {1323.90,-1842.20,-89.00,1701.90,-1722.20,110.90}},
  103.         {"Commerce",                    {1323.90,-1722.20,-89.00,1440.90,-1577.50,110.90}},
  104.         {"Commerce",                    {1370.80,-1577.50,-89.00,1463.90,-1384.90,110.90}},
  105.         {"Commerce",                    {1463.90,-1577.50,-89.00,1667.90,-1430.80,110.90}},
  106.         {"Commerce",                    {1583.50,-1722.20,-89.00,1758.90,-1577.50,110.90}},
  107.         {"Commerce",                    {1667.90,-1577.50,-89.00,1812.60,-1430.80,110.90}},
  108.         {"Conference Center",           {1046.10,-1804.20,-89.00,1323.90,-1722.20,110.90}},
  109.         {"Conference Center",           {1073.20,-1842.20,-89.00,1323.90,-1804.20,110.90}},
  110.         {"Cranberry Station",           {-2007.80,56.30,0.00,-1922.00,224.70,100.00}},
  111.         {"Creek",                       {2749.90,1937.20,-89.00,2921.60,2669.70,110.90}},
  112.         {"Dillimore",                   {580.70,-674.80,-9.50,861.00,-404.70,200.00}},
  113.         {"Doherty",                     {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00}},
  114.         {"Doherty",                     {-2173.00,-222.50,-0.00,-1794.90,265.20,200.00}},
  115.         {"Downtown",                    {-1982.30,744.10,-6.10,-1871.70,1274.20,200.00}},
  116.         {"Downtown",                    {-1871.70,1176.40,-4.50,-1620.30,1274.20,200.00}},
  117.         {"Downtown",                    {-1700.00,744.20,-6.10,-1580.00,1176.50,200.00}},
  118.         {"Downtown",                    {-1580.00,744.20,-6.10,-1499.80,1025.90,200.00}},
  119.         {"Downtown",                    {-2078.60,578.30,-7.60,-1499.80,744.20,200.00}},
  120.         {"Downtown",                    {-1993.20,265.20,-9.10,-1794.90,578.30,200.00}},
  121.         {"Downtown Los Santos",         {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90}},
  122.         {"Downtown Los Santos",         {1724.70,-1430.80,-89.00,1812.60,-1250.90,110.90}},
  123.         {"Downtown Los Santos",         {1463.90,-1290.80,-89.00,1724.70,-1150.80,110.90}},
  124.         {"Downtown Los Santos",         {1370.80,-1384.90,-89.00,1463.90,-1170.80,110.90}},
  125.         {"Downtown Los Santos",         {1724.70,-1250.90,-89.00,1812.60,-1150.80,110.90}},
  126.         {"Downtown Los Santos",         {1370.80,-1170.80,-89.00,1463.90,-1130.80,110.90}},
  127.         {"Downtown Los Santos",         {1378.30,-1130.80,-89.00,1463.90,-1026.30,110.90}},
  128.         {"Downtown Los Santos",         {1391.00,-1026.30,-89.00,1463.90,-926.90,110.90}},
  129.         {"Downtown Los Santos",         {1507.50,-1385.20,110.90,1582.50,-1325.30,335.90}},
  130.         {"East Beach",                  {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90}},
  131.         {"East Beach",                  {2632.80,-1668.10,-89.00,2747.70,-1393.40,110.90}},
  132.         {"East Beach",                  {2747.70,-1668.10,-89.00,2959.30,-1498.60,110.90}},
  133.         {"East Beach",                  {2747.70,-1498.60,-89.00,2959.30,-1120.00,110.90}},
  134.         {"East Los Santos",             {2421.00,-1628.50,-89.00,2632.80,-1454.30,110.90}},
  135.         {"East Los Santos",             {2222.50,-1628.50,-89.00,2421.00,-1494.00,110.90}},
  136.         {"East Los Santos",             {2266.20,-1494.00,-89.00,2381.60,-1372.00,110.90}},
  137.         {"East Los Santos",             {2381.60,-1494.00,-89.00,2421.00,-1454.30,110.90}},
  138.         {"East Los Santos",             {2281.40,-1372.00,-89.00,2381.60,-1135.00,110.90}},
  139.         {"East Los Santos",             {2381.60,-1454.30,-89.00,2462.10,-1135.00,110.90}},
  140.         {"East Los Santos",             {2462.10,-1454.30,-89.00,2581.70,-1135.00,110.90}},
  141.         {"Easter Basin",                {-1794.90,249.90,-9.10,-1242.90,578.30,200.00}},
  142.         {"Easter Basin",                {-1794.90,-50.00,-0.00,-1499.80,249.90,200.00}},
  143.         {"Easter Bay Airport",          {-1499.80,-50.00,-0.00,-1242.90,249.90,200.00}},
  144.         {"Easter Bay Airport",          {-1794.90,-730.10,-3.00,-1213.90,-50.00,200.00}},
  145.         {"Easter Bay Airport",          {-1213.90,-730.10,0.00,-1132.80,-50.00,200.00}},
  146.         {"Easter Bay Airport",          {-1242.90,-50.00,0.00,-1213.90,578.30,200.00}},
  147.         {"Easter Bay Airport",          {-1213.90,-50.00,-4.50,-947.90,578.30,200.00}},
  148.         {"Easter Bay Airport",          {-1315.40,-405.30,15.40,-1264.40,-209.50,25.40}},
  149.         {"Easter Bay Airport",          {-1354.30,-287.30,15.40,-1315.40,-209.50,25.40}},
  150.         {"Easter Bay Airport",          {-1490.30,-209.50,15.40,-1264.40,-148.30,25.40}},
  151.         {"Easter Bay Chemicals",        {-1132.80,-768.00,0.00,-956.40,-578.10,200.00}},
  152.         {"Easter Bay Chemicals",        {-1132.80,-787.30,0.00,-956.40,-768.00,200.00}},
  153.         {"El Castillo del Diablo",      {-464.50,2217.60,0.00,-208.50,2580.30,200.00}},
  154.         {"El Castillo del Diablo",      {-208.50,2123.00,-7.60,114.00,2337.10,200.00}},
  155.         {"El Castillo del Diablo",      {-208.50,2337.10,0.00,8.40,2487.10,200.00}},
  156.         {"El Corona",                   {1812.60,-2179.20,-89.00,1970.60,-1852.80,110.90}},
  157.         {"El Corona",                   {1692.60,-2179.20,-89.00,1812.60,-1842.20,110.90}},
  158.         {"El Quebrados",                {-1645.20,2498.50,0.00,-1372.10,2777.80,200.00}},
  159.         {"Esplanade East",              {-1620.30,1176.50,-4.50,-1580.00,1274.20,200.00}},
  160.         {"Esplanade East",              {-1580.00,1025.90,-6.10,-1499.80,1274.20,200.00}},
  161.         {"Esplanade East",              {-1499.80,578.30,-79.60,-1339.80,1274.20,20.30}},
  162.         {"Esplanade North",             {-2533.00,1358.90,-4.50,-1996.60,1501.20,200.00}},
  163.         {"Esplanade North",             {-1996.60,1358.90,-4.50,-1524.20,1592.50,200.00}},
  164.         {"Esplanade North",             {-1982.30,1274.20,-4.50,-1524.20,1358.90,200.00}},
  165.         {"Fallen Tree",                 {-792.20,-698.50,-5.30,-452.40,-380.00,200.00}},
  166.         {"Fallow Bridge",               {434.30,366.50,0.00,603.00,555.60,200.00}},
  167.         {"Fern Ridge",                  {508.10,-139.20,0.00,1306.60,119.50,200.00}},
  168.         {"Financial",                   {-1871.70,744.10,-6.10,-1701.30,1176.40,300.00}},
  169.         {"Fisher's Lagoon",             {1916.90,-233.30,-100.00,2131.70,13.80,200.00}},
  170.         {"Flint Intersection",          {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90}},
  171.         {"Flint Range",                 {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00}},
  172.         {"Fort Carson",                 {-376.20,826.30,-3.00,123.70,1220.40,200.00}},
  173.         {"Foster Valley",               {-2270.00,-430.20,-0.00,-2178.60,-324.10,200.00}},
  174.         {"Foster Valley",               {-2178.60,-599.80,-0.00,-1794.90,-324.10,200.00}},
  175.         {"Foster Valley",               {-2178.60,-1115.50,0.00,-1794.90,-599.80,200.00}},
  176.         {"Foster Valley",               {-2178.60,-1250.90,0.00,-1794.90,-1115.50,200.00}},
  177.         {"Frederick Bridge",            {2759.20,296.50,0.00,2774.20,594.70,200.00}},
  178.         {"Gant Bridge",                 {-2741.40,1659.60,-6.10,-2616.40,2175.10,200.00}},
  179.         {"Gant Bridge",                 {-2741.00,1490.40,-6.10,-2616.40,1659.60,200.00}},
  180.         {"Ganton",                      {2222.50,-1852.80,-89.00,2632.80,-1722.30,110.90}},
  181.         {"Ganton",                      {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90}},
  182.         {"Garcia",                      {-2411.20,-222.50,-0.00,-2173.00,265.20,200.00}},
  183.         {"Garcia",                      {-2395.10,-222.50,-5.30,-2354.00,-204.70,200.00}},
  184.         {"Garver Bridge",               {-1339.80,828.10,-89.00,-1213.90,1057.00,110.90}},
  185.         {"Garver Bridge",               {-1213.90,950.00,-89.00,-1087.90,1178.90,110.90}},
  186.         {"Garver Bridge",               {-1499.80,696.40,-179.60,-1339.80,925.30,20.30}},
  187.         {"Glen Park",                   {1812.60,-1449.60,-89.00,1996.90,-1350.70,110.90}},
  188.         {"Glen Park",                   {1812.60,-1100.80,-89.00,1994.30,-973.30,110.90}},
  189.         {"Glen Park",                   {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90}},
  190.         {"Green Palms",                 {176.50,1305.40,-3.00,338.60,1520.70,200.00}},
  191.         {"Greenglass College",          {964.30,1044.60,-89.00,1197.30,1203.20,110.90}},
  192.         {"Greenglass College",          {964.30,930.80,-89.00,1166.50,1044.60,110.90}},
  193.         {"Hampton Barns",               {603.00,264.30,0.00,761.90,366.50,200.00}},
  194.         {"Hankypanky Point",            {2576.90,62.10,0.00,2759.20,385.50,200.00}},
  195.         {"Harry Gold Parkway",          {1777.30,863.20,-89.00,1817.30,2342.80,110.90}},
  196.         {"Hashbury",                    {-2593.40,-222.50,-0.00,-2411.20,54.70,200.00}},
  197.         {"Hilltop Farm",                {967.30,-450.30,-3.00,1176.70,-217.90,200.00}},
  198.         {"Hunter Quarry",               {337.20,710.80,-115.20,860.50,1031.70,203.70}},
  199.         {"Idlewood",                    {1812.60,-1852.80,-89.00,1971.60,-1742.30,110.90}},
  200.         {"Idlewood",                    {1812.60,-1742.30,-89.00,1951.60,-1602.30,110.90}},
  201.         {"Idlewood",                    {1951.60,-1742.30,-89.00,2124.60,-1602.30,110.90}},
  202.         {"Idlewood",                    {1812.60,-1602.30,-89.00,2124.60,-1449.60,110.90}},
  203.         {"Idlewood",                    {2124.60,-1742.30,-89.00,2222.50,-1494.00,110.90}},
  204.         {"Idlewood",                    {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90}},
  205.         {"Jefferson",                   {1996.90,-1449.60,-89.00,2056.80,-1350.70,110.90}},
  206.         {"Jefferson",                   {2124.60,-1494.00,-89.00,2266.20,-1449.60,110.90}},
  207.         {"Jefferson",                   {2056.80,-1372.00,-89.00,2281.40,-1210.70,110.90}},
  208.         {"Jefferson",                   {2056.80,-1210.70,-89.00,2185.30,-1126.30,110.90}},
  209.         {"Jefferson",                   {2185.30,-1210.70,-89.00,2281.40,-1154.50,110.90}},
  210.         {"Jefferson",                   {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90}},
  211.         {"Julius Thruway East",         {2623.10,943.20,-89.00,2749.90,1055.90,110.90}},
  212.         {"Julius Thruway East",         {2685.10,1055.90,-89.00,2749.90,2626.50,110.90}},
  213.         {"Julius Thruway East",         {2536.40,2442.50,-89.00,2685.10,2542.50,110.90}},
  214.         {"Julius Thruway East",         {2625.10,2202.70,-89.00,2685.10,2442.50,110.90}},
  215.         {"Julius Thruway North",        {2498.20,2542.50,-89.00,2685.10,2626.50,110.90}},
  216.         {"Julius Thruway North",        {2237.40,2542.50,-89.00,2498.20,2663.10,110.90}},
  217.         {"Julius Thruway North",        {2121.40,2508.20,-89.00,2237.40,2663.10,110.90}},
  218.         {"Julius Thruway North",        {1938.80,2508.20,-89.00,2121.40,2624.20,110.90}},
  219.         {"Julius Thruway North",        {1534.50,2433.20,-89.00,1848.40,2583.20,110.90}},
  220.         {"Julius Thruway North",        {1848.40,2478.40,-89.00,1938.80,2553.40,110.90}},
  221.         {"Julius Thruway North",        {1704.50,2342.80,-89.00,1848.40,2433.20,110.90}},
  222.         {"Julius Thruway North",        {1377.30,2433.20,-89.00,1534.50,2507.20,110.90}},
  223.         {"Julius Thruway South",        {1457.30,823.20,-89.00,2377.30,863.20,110.90}},
  224.         {"Julius Thruway South",        {2377.30,788.80,-89.00,2537.30,897.90,110.90}},
  225.         {"Julius Thruway West",         {1197.30,1163.30,-89.00,1236.60,2243.20,110.90}},
  226.         {"Julius Thruway West",         {1236.60,2142.80,-89.00,1297.40,2243.20,110.90}},
  227.         {"Juniper Hill",                {-2533.00,578.30,-7.60,-2274.10,968.30,200.00}},
  228.         {"Juniper Hollow",              {-2533.00,968.30,-6.10,-2274.10,1358.90,200.00}},
  229.         {"K.A.C.C. Military Fuels",     {2498.20,2626.50,-89.00,2749.90,2861.50,110.90}},
  230.         {"Kincaid Bridge",              {-1339.80,599.20,-89.00,-1213.90,828.10,110.90}},
  231.         {"Kincaid Bridge",              {-1213.90,721.10,-89.00,-1087.90,950.00,110.90}},
  232.         {"Kincaid Bridge",              {-1087.90,855.30,-89.00,-961.90,986.20,110.90}},
  233.         {"King's",                      {-2329.30,458.40,-7.60,-1993.20,578.30,200.00}},
  234.         {"King's",                      {-2411.20,265.20,-9.10,-1993.20,373.50,200.00}},
  235.         {"King's",                      {-2253.50,373.50,-9.10,-1993.20,458.40,200.00}},
  236.         {"LVA Freight Depot",           {1457.30,863.20,-89.00,1777.40,1143.20,110.90}},
  237.         {"LVA Freight Depot",           {1375.60,919.40,-89.00,1457.30,1203.20,110.90}},
  238.         {"LVA Freight Depot",           {1277.00,1087.60,-89.00,1375.60,1203.20,110.90}},
  239.         {"LVA Freight Depot",           {1315.30,1044.60,-89.00,1375.60,1087.60,110.90}},
  240.         {"LVA Freight Depot",           {1236.60,1163.40,-89.00,1277.00,1203.20,110.90}},
  241.         {"Las Barrancas",               {-926.10,1398.70,-3.00,-719.20,1634.60,200.00}},
  242.         {"Las Brujas",                  {-365.10,2123.00,-3.00,-208.50,2217.60,200.00}},
  243.         {"Las Colinas",                 {1994.30,-1100.80,-89.00,2056.80,-920.80,110.90}},
  244.         {"Las Colinas",                 {2056.80,-1126.30,-89.00,2126.80,-920.80,110.90}},
  245.         {"Las Colinas",                 {2185.30,-1154.50,-89.00,2281.40,-934.40,110.90}},
  246.         {"Las Colinas",                 {2126.80,-1126.30,-89.00,2185.30,-934.40,110.90}},
  247.         {"Las Colinas",                 {2747.70,-1120.00,-89.00,2959.30,-945.00,110.90}},
  248.         {"Las Colinas",                 {2632.70,-1135.00,-89.00,2747.70,-945.00,110.90}},
  249.         {"Las Colinas",                 {2281.40,-1135.00,-89.00,2632.70,-945.00,110.90}},
  250.         {"Las Payasadas",               {-354.30,2580.30,2.00,-133.60,2816.80,200.00}},
  251.         {"Las Venturas Airport",        {1236.60,1203.20,-89.00,1457.30,1883.10,110.90}},
  252.         {"Las Venturas Airport",        {1457.30,1203.20,-89.00,1777.30,1883.10,110.90}},
  253.         {"Las Venturas Airport",        {1457.30,1143.20,-89.00,1777.40,1203.20,110.90}},
  254.         {"Las Venturas Airport",        {1515.80,1586.40,-12.50,1729.90,1714.50,87.50}},
  255.         {"Last Dime Motel",             {1823.00,596.30,-89.00,1997.20,823.20,110.90}},
  256.         {"Leafy Hollow",                {-1166.90,-1856.00,0.00,-815.60,-1602.00,200.00}},
  257.         {"Liberty City",                {-1000.00,400.00,1300.00,-700.00,600.00,1400.00}},
  258.         {"Lil' Probe Inn",              {-90.20,1286.80,-3.00,153.80,1554.10,200.00}},
  259.         {"Linden Side",                 {2749.90,943.20,-89.00,2923.30,1198.90,110.90}},
  260.         {"Linden Station",              {2749.90,1198.90,-89.00,2923.30,1548.90,110.90}},
  261.         {"Linden Station",              {2811.20,1229.50,-39.50,2861.20,1407.50,60.40}},
  262.         {"Little Mexico",               {1701.90,-1842.20,-89.00,1812.60,-1722.20,110.90}},
  263.         {"Little Mexico",               {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90}},
  264.         {"Los Flores",                  {2581.70,-1454.30,-89.00,2632.80,-1393.40,110.90}},
  265.         {"Los Flores",                  {2581.70,-1393.40,-89.00,2747.70,-1135.00,110.90}},
  266.         {"Los Santos International",    {1249.60,-2394.30,-89.00,1852.00,-2179.20,110.90}},
  267.         {"Los Santos International",    {1852.00,-2394.30,-89.00,2089.00,-2179.20,110.90}},
  268.         {"Los Santos International",    {1382.70,-2730.80,-89.00,2201.80,-2394.30,110.90}},
  269.         {"Los Santos International",    {1974.60,-2394.30,-39.00,2089.00,-2256.50,60.90}},
  270.         {"Los Santos International",    {1400.90,-2669.20,-39.00,2189.80,-2597.20,60.90}},
  271.         {"Los Santos International",    {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90}},
  272.         {"Marina",                      {647.70,-1804.20,-89.00,851.40,-1577.50,110.90}},
  273.         {"Marina",                      {647.70,-1577.50,-89.00,807.90,-1416.20,110.90}},
  274.         {"Marina",                      {807.90,-1577.50,-89.00,926.90,-1416.20,110.90}},
  275.         {"Market",                      {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90}},
  276.         {"Market",                      {952.60,-1310.20,-89.00,1072.60,-1130.80,110.90}},
  277.         {"Market",                      {1072.60,-1416.20,-89.00,1370.80,-1130.80,110.90}},
  278.         {"Market",                      {926.90,-1577.50,-89.00,1370.80,-1416.20,110.90}},
  279.         {"Market Station",              {787.40,-1410.90,-34.10,866.00,-1310.20,65.80}},
  280.         {"Martin Bridge",               {-222.10,293.30,0.00,-122.10,476.40,200.00}},
  281.         {"Missionary Hill",             {-2994.40,-811.20,0.00,-2178.60,-430.20,200.00}},
  282.         {"Montgomery",                  {1119.50,119.50,-3.00,1451.40,493.30,200.00}},
  283.         {"Montgomery",                  {1451.40,347.40,-6.10,1582.40,420.80,200.00}},
  284.         {"Montgomery Intersection",     {1546.60,208.10,0.00,1745.80,347.40,200.00}},
  285.         {"Montgomery Intersection",     {1582.40,347.40,0.00,1664.60,401.70,200.00}},
  286.         {"Mulholland",                  {1414.00,-768.00,-89.00,1667.60,-452.40,110.90}},
  287.         {"Mulholland",                  {1281.10,-452.40,-89.00,1641.10,-290.90,110.90}},
  288.         {"Mulholland",                  {1269.10,-768.00,-89.00,1414.00,-452.40,110.90}},
  289.         {"Mulholland",                  {1357.00,-926.90,-89.00,1463.90,-768.00,110.90}},
  290.         {"Mulholland",                  {1318.10,-910.10,-89.00,1357.00,-768.00,110.90}},
  291.         {"Mulholland",                  {1169.10,-910.10,-89.00,1318.10,-768.00,110.90}},
  292.         {"Mulholland",                  {768.60,-954.60,-89.00,952.60,-860.60,110.90}},
  293.         {"Mulholland",                  {687.80,-860.60,-89.00,911.80,-768.00,110.90}},
  294.         {"Mulholland",                  {737.50,-768.00,-89.00,1142.20,-674.80,110.90}},
  295.         {"Mulholland",                  {1096.40,-910.10,-89.00,1169.10,-768.00,110.90}},
  296.         {"Mulholland",                  {952.60,-937.10,-89.00,1096.40,-860.60,110.90}},
  297.         {"Mulholland",                  {911.80,-860.60,-89.00,1096.40,-768.00,110.90}},
  298.         {"Mulholland",                  {861.00,-674.80,-89.00,1156.50,-600.80,110.90}},
  299.         {"Mulholland Intersection",     {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90}},
  300.         {"North Rock",                  {2285.30,-768.00,0.00,2770.50,-269.70,200.00}},
  301.         {"Ocean Docks",                 {2373.70,-2697.00,-89.00,2809.20,-2330.40,110.90}},
  302.         {"Ocean Docks",                 {2201.80,-2418.30,-89.00,2324.00,-2095.00,110.90}},
  303.         {"Ocean Docks",                 {2324.00,-2302.30,-89.00,2703.50,-2145.10,110.90}},
  304.         {"Ocean Docks",                 {2089.00,-2394.30,-89.00,2201.80,-2235.80,110.90}},
  305.         {"Ocean Docks",                 {2201.80,-2730.80,-89.00,2324.00,-2418.30,110.90}},
  306.         {"Ocean Docks",                 {2703.50,-2302.30,-89.00,2959.30,-2126.90,110.90}},
  307.         {"Ocean Docks",                 {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90}},
  308.         {"Ocean Flats",                 {-2994.40,277.40,-9.10,-2867.80,458.40,200.00}},
  309.         {"Ocean Flats",                 {-2994.40,-222.50,-0.00,-2593.40,277.40,200.00}},
  310.         {"Ocean Flats",                 {-2994.40,-430.20,-0.00,-2831.80,-222.50,200.00}},
  311.         {"Octane Springs",              {338.60,1228.50,0.00,664.30,1655.00,200.00}},
  312.         {"Old Venturas Strip",          {2162.30,2012.10,-89.00,2685.10,2202.70,110.90}},
  313.         {"Palisades",                   {-2994.40,458.40,-6.10,-2741.00,1339.60,200.00}},
  314.         {"Palomino Creek",              {2160.20,-149.00,0.00,2576.90,228.30,200.00}},
  315.         {"Paradiso",                    {-2741.00,793.40,-6.10,-2533.00,1268.40,200.00}},
  316.         {"Pershing Square",             {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90}},
  317.         {"Pilgrim",                     {2437.30,1383.20,-89.00,2624.40,1783.20,110.90}},
  318.         {"Pilgrim",                     {2624.40,1383.20,-89.00,2685.10,1783.20,110.90}},
  319.         {"Pilson Intersection",         {1098.30,2243.20,-89.00,1377.30,2507.20,110.90}},
  320.         {"Pirates in Men's Pants",      {1817.30,1469.20,-89.00,2027.40,1703.20,110.90}},
  321.         {"Playa del Seville",           {2703.50,-2126.90,-89.00,2959.30,-1852.80,110.90}},
  322.         {"Prickle Pine",                {1534.50,2583.20,-89.00,1848.40,2863.20,110.90}},
  323.         {"Prickle Pine",                {1117.40,2507.20,-89.00,1534.50,2723.20,110.90}},
  324.         {"Prickle Pine",                {1848.40,2553.40,-89.00,1938.80,2863.20,110.90}},
  325.         {"Prickle Pine",                {1938.80,2624.20,-89.00,2121.40,2861.50,110.90}},
  326.         {"Queens",                      {-2533.00,458.40,0.00,-2329.30,578.30,200.00}},
  327.         {"Queens",                      {-2593.40,54.70,0.00,-2411.20,458.40,200.00}},
  328.         {"Queens",                      {-2411.20,373.50,0.00,-2253.50,458.40,200.00}},
  329.         {"Randolph Industrial Estate",  {1558.00,596.30,-89.00,1823.00,823.20,110.90}},
  330.         {"Redsands East",               {1817.30,2011.80,-89.00,2106.70,2202.70,110.90}},
  331.         {"Redsands East",               {1817.30,2202.70,-89.00,2011.90,2342.80,110.90}},
  332.         {"Redsands East",               {1848.40,2342.80,-89.00,2011.90,2478.40,110.90}},
  333.         {"Redsands West",               {1236.60,1883.10,-89.00,1777.30,2142.80,110.90}},
  334.         {"Redsands West",               {1297.40,2142.80,-89.00,1777.30,2243.20,110.90}},
  335.         {"Redsands West",               {1377.30,2243.20,-89.00,1704.50,2433.20,110.90}},
  336.         {"Redsands West",               {1704.50,2243.20,-89.00,1777.30,2342.80,110.90}},
  337.         {"Regular Tom",                 {-405.70,1712.80,-3.00,-276.70,1892.70,200.00}},
  338.         {"Richman",                     {647.50,-1118.20,-89.00,787.40,-954.60,110.90}},
  339.         {"Richman",                     {647.50,-954.60,-89.00,768.60,-860.60,110.90}},
  340.         {"Richman",                     {225.10,-1369.60,-89.00,334.50,-1292.00,110.90}},
  341.         {"Richman",                     {225.10,-1292.00,-89.00,466.20,-1235.00,110.90}},
  342.         {"Richman",                     {72.60,-1404.90,-89.00,225.10,-1235.00,110.90}},
  343.         {"Richman",                     {72.60,-1235.00,-89.00,321.30,-1008.10,110.90}},
  344.         {"Richman",                     {321.30,-1235.00,-89.00,647.50,-1044.00,110.90}},
  345.         {"Richman",                     {321.30,-1044.00,-89.00,647.50,-860.60,110.90}},
  346.         {"Richman",                     {321.30,-860.60,-89.00,687.80,-768.00,110.90}},
  347.         {"Richman",                     {321.30,-768.00,-89.00,700.70,-674.80,110.90}},
  348.         {"Robada Intersection",         {-1119.00,1178.90,-89.00,-862.00,1351.40,110.90}},
  349.         {"Roca Escalante",              {2237.40,2202.70,-89.00,2536.40,2542.50,110.90}},
  350.         {"Roca Escalante",              {2536.40,2202.70,-89.00,2625.10,2442.50,110.90}},
  351.         {"Rockshore East",              {2537.30,676.50,-89.00,2902.30,943.20,110.90}},
  352.         {"Rockshore West",              {1997.20,596.30,-89.00,2377.30,823.20,110.90}},
  353.         {"Rockshore West",              {2377.30,596.30,-89.00,2537.30,788.80,110.90}},
  354.         {"Rodeo",                       {72.60,-1684.60,-89.00,225.10,-1544.10,110.90}},
  355.         {"Rodeo",                       {72.60,-1544.10,-89.00,225.10,-1404.90,110.90}},
  356.         {"Rodeo",                       {225.10,-1684.60,-89.00,312.80,-1501.90,110.90}},
  357.         {"Rodeo",                       {225.10,-1501.90,-89.00,334.50,-1369.60,110.90}},
  358.         {"Rodeo",                       {334.50,-1501.90,-89.00,422.60,-1406.00,110.90}},
  359.         {"Rodeo",                       {312.80,-1684.60,-89.00,422.60,-1501.90,110.90}},
  360.         {"Rodeo",                       {422.60,-1684.60,-89.00,558.00,-1570.20,110.90}},
  361.         {"Rodeo",                       {558.00,-1684.60,-89.00,647.50,-1384.90,110.90}},
  362.         {"Rodeo",                       {466.20,-1570.20,-89.00,558.00,-1385.00,110.90}},
  363.         {"Rodeo",                       {422.60,-1570.20,-89.00,466.20,-1406.00,110.90}},
  364.         {"Rodeo",                       {466.20,-1385.00,-89.00,647.50,-1235.00,110.90}},
  365.         {"Rodeo",                       {334.50,-1406.00,-89.00,466.20,-1292.00,110.90}},
  366.         {"Royal Casino",                {2087.30,1383.20,-89.00,2437.30,1543.20,110.90}},
  367.         {"San Andreas Sound",           {2450.30,385.50,-100.00,2759.20,562.30,200.00}},
  368.         {"Santa Flora",                 {-2741.00,458.40,-7.60,-2533.00,793.40,200.00}},
  369.         {"Santa Maria Beach",           {342.60,-2173.20,-89.00,647.70,-1684.60,110.90}},
  370.         {"Santa Maria Beach",           {72.60,-2173.20,-89.00,342.60,-1684.60,110.90}},
  371.         {"Shady Cabin",                 {-1632.80,-2263.40,-3.00,-1601.30,-2231.70,200.00}},
  372.         {"Shady Creeks",                {-1820.60,-2643.60,-8.00,-1226.70,-1771.60,200.00}},
  373.         {"Shady Creeks",                {-2030.10,-2174.80,-6.10,-1820.60,-1771.60,200.00}},
  374.         {"Sobell Rail Yards",           {2749.90,1548.90,-89.00,2923.30,1937.20,110.90}},
  375.         {"Spinybed",                    {2121.40,2663.10,-89.00,2498.20,2861.50,110.90}},
  376.         {"Starfish Casino",             {2437.30,1783.20,-89.00,2685.10,2012.10,110.90}},
  377.         {"Starfish Casino",             {2437.30,1858.10,-39.00,2495.00,1970.80,60.90}},
  378.         {"Starfish Casino",             {2162.30,1883.20,-89.00,2437.30,2012.10,110.90}},
  379.         {"Temple",                      {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90}},
  380.         {"Temple",                      {1252.30,-1026.30,-89.00,1391.00,-926.90,110.90}},
  381.         {"Temple",                      {1252.30,-926.90,-89.00,1357.00,-910.10,110.90}},
  382.         {"Temple",                      {952.60,-1130.80,-89.00,1096.40,-937.10,110.90}},
  383.         {"Temple",                      {1096.40,-1130.80,-89.00,1252.30,-1026.30,110.90}},
  384.         {"Temple",                      {1096.40,-1026.30,-89.00,1252.30,-910.10,110.90}},
  385.         {"The Camel's Toe",             {2087.30,1203.20,-89.00,2640.40,1383.20,110.90}},
  386.         {"The Clown's Pocket",          {2162.30,1783.20,-89.00,2437.30,1883.20,110.90}},
  387.         {"The Emerald Isle",            {2011.90,2202.70,-89.00,2237.40,2508.20,110.90}},
  388.         {"The Farm",                    {-1209.60,-1317.10,114.90,-908.10,-787.30,251.90}},
  389.         {"The Four Dragons Casino",     {1817.30,863.20,-89.00,2027.30,1083.20,110.90}},
  390.         {"The High Roller",             {1817.30,1283.20,-89.00,2027.30,1469.20,110.90}},
  391.         {"The Mako Span",               {1664.60,401.70,0.00,1785.10,567.20,200.00}},
  392.         {"The Panopticon",              {-947.90,-304.30,-1.10,-319.60,327.00,200.00}},
  393.         {"The Pink Swan",               {1817.30,1083.20,-89.00,2027.30,1283.20,110.90}},
  394.         {"The Sherman Dam",             {-968.70,1929.40,-3.00,-481.10,2155.20,200.00}},
  395.         {"The Strip",                   {2027.40,863.20,-89.00,2087.30,1703.20,110.90}},
  396.         {"The Strip",                   {2106.70,1863.20,-89.00,2162.30,2202.70,110.90}},
  397.         {"The Strip",                   {2027.40,1783.20,-89.00,2162.30,1863.20,110.90}},
  398.         {"The Strip",                   {2027.40,1703.20,-89.00,2137.40,1783.20,110.90}},
  399.         {"The Visage",                  {1817.30,1863.20,-89.00,2106.70,2011.80,110.90}},
  400.         {"The Visage",                  {1817.30,1703.20,-89.00,2027.40,1863.20,110.90}},
  401.         {"Unity Station",               {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50}},
  402.         {"Valle Ocultado",              {-936.60,2611.40,2.00,-715.90,2847.90,200.00}},
  403.         {"Verdant Bluffs",              {930.20,-2488.40,-89.00,1249.60,-2006.70,110.90}},
  404.         {"Verdant Bluffs",              {1073.20,-2006.70,-89.00,1249.60,-1842.20,110.90}},
  405.         {"Verdant Bluffs",              {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90}},
  406.         {"Verdant Meadows",             {37.00,2337.10,-3.00,435.90,2677.90,200.00}},
  407.         {"Verona Beach",                {647.70,-2173.20,-89.00,930.20,-1804.20,110.90}},
  408.         {"Verona Beach",                {930.20,-2006.70,-89.00,1073.20,-1804.20,110.90}},
  409.         {"Verona Beach",                {851.40,-1804.20,-89.00,1046.10,-1577.50,110.90}},
  410.         {"Verona Beach",                {1161.50,-1722.20,-89.00,1323.90,-1577.50,110.90}},
  411.         {"Verona Beach",                {1046.10,-1722.20,-89.00,1161.50,-1577.50,110.90}},
  412.         {"Vinewood",                    {787.40,-1310.20,-89.00,952.60,-1130.80,110.90}},
  413.         {"Vinewood",                    {787.40,-1130.80,-89.00,952.60,-954.60,110.90}},
  414.         {"Vinewood",                    {647.50,-1227.20,-89.00,787.40,-1118.20,110.90}},
  415.         {"Vinewood",                    {647.70,-1416.20,-89.00,787.40,-1227.20,110.90}},
  416.         {"Whitewood Estates",           {883.30,1726.20,-89.00,1098.30,2507.20,110.90}},
  417.         {"Whitewood Estates",           {1098.30,1726.20,-89.00,1197.30,2243.20,110.90}},
  418.         {"Willowfield",                 {1970.60,-2179.20,-89.00,2089.00,-1852.80,110.90}},
  419.         {"Willowfield",                 {2089.00,-2235.80,-89.00,2201.80,-1989.90,110.90}},
  420.         {"Willowfield",                 {2089.00,-1989.90,-89.00,2324.00,-1852.80,110.90}},
  421.         {"Willowfield",                 {2201.80,-2095.00,-89.00,2324.00,-1989.90,110.90}},
  422.         {"Willowfield",                 {2541.70,-1941.40,-89.00,2703.50,-1852.80,110.90}},
  423.         {"Willowfield",                 {2324.00,-2059.20,-89.00,2541.70,-1852.80,110.90}},
  424.         {"Willowfield",                 {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90}},
  425.         {"Yellow Bell Station",         {1377.40,2600.40,-21.90,1492.40,2687.30,78.00}},
  426.         {"Los Santos",                  {44.60,-2892.90,-242.90,2997.00,-768.00,900.00}},
  427.         {"Las Venturas",                {869.40,596.30,-242.90,2997.00,2993.80,900.00}},
  428.         {"Bone County",                 {-480.50,596.30,-242.90,869.40,2993.80,900.00}},
  429.         {"Tierra Robada",               {-2997.40,1659.60,-242.90,-480.50,2993.80,900.00}},
  430.         {"Tierra Robada",               {-1213.90,596.30,-242.90,-480.50,1659.60,900.00}},
  431.         {"San Fierro",                  {-2997.40,-1115.50,-242.90,-1213.90,1659.60,900.00}},
  432.         {"Red County",                  {-1213.90,-768.00,-242.90,2997.00,596.30,900.00}},
  433.         {"Flint County",                {-1213.90,-2892.90,-242.90,44.60,-768.00,900.00}},
  434.         {"Whetstone",                   {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
  435. };
  436.  
  437. new PropInfo[MAX_PROPERTIES][propinfo];
  438. new PlayerProps[MAX_PLAYERS];
  439. new EarningsForPlayer[MAX_PLAYERS];
  440. new Logged[MAX_PLAYERS];
  441. new HaveWatch[MAX_PLAYERS];
  442. new HaveMobilePhone[MAX_PLAYERS];
  443. new HaveMusicPlayer[MAX_PLAYERS];
  444. new HaveAlcohol[MAX_PLAYERS];
  445. new HaveDrink[MAX_PLAYERS];
  446. new HaveSnack[MAX_PLAYERS];
  447. new HaveDrivingLic[MAX_PLAYERS];
  448. new DTimer[MAX_PLAYERS];
  449. new Spawned[MAX_PLAYERS];
  450. new JustDied[MAX_PLAYERS];
  451. new HaveCigarette[MAX_PLAYERS];
  452. new FishTimer[MAX_PLAYERS];
  453. new DinerExit;
  454. new HaveFish[MAX_PLAYERS];
  455. new JailTimer[MAX_PLAYERS];
  456. new PlayerDiner[MAX_PLAYERS];
  457. new FishingLicense[MAX_PLAYERS];
  458. new DinerIn[15];
  459. new Restaurant;
  460. new PlayerBank[MAX_PLAYERS];
  461.  
  462. new Text:SFRPg;
  463. new Market;
  464. new InfoDisplayed[MAX_PLAYERS];
  465. new CityhallGoIn;
  466. new DrivingSchoolLimit[MAX_PLAYERS];
  467. new Drivingschoolcar[MAX_PLAYERS];
  468. new Drivingschoolpickup;
  469. new DTestCompleted[MAX_PLAYERS];
  470. //
  471.  
  472.  
  473. #define INACTIVE_PLAYER_ID 255
  474. #define SPAWN_GAS_MIN  50 //Minimum amount of "Fuel" available when a vehicle spawns
  475. #define SPAWN_GAS_MAX  100 //Maximum amount of "Fuel" available when a vehicle spawns
  476.  
  477. #define NUMVALUES 4
  478.  
  479.  
  480. forward Speedometer();
  481. forward Wage();
  482. forward Random(min, max);
  483. forward ReFill(playerid);
  484. forward IsPlayerInFuelStation(playerid);
  485. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  486. forward ExitArea();
  487. forward DSLimit(playerid);
  488. forward Fishing(playerid);
  489. forward LocationUpdate();
  490.  
  491.  
  492. //Org Things
  493. new SFPD[5];
  494. new SFPDPick;
  495. new SFFDPick;
  496. new SFFD[3];
  497. new TriadCars[5];
  498. new TriadsPick;
  499. //
  500.  
  501. new ClothesShop[5];
  502. new ElectronicsDealer;
  503. new DoNOTDeleteThis;
  504. new BarPickup[2];
  505.  
  506. new IsLogged[MAX_PLAYERS];
  507. new pBank[MAX_PLAYERS];
  508. new Job[MAX_PLAYERS];
  509. new OrgLeader[MAX_PLAYERS];
  510. new Text:Speedom[MAX_PLAYERS];
  511. new ReFuelTimer[MAX_PLAYERS], OldFuel[MAX_PLAYERS];
  512. new Refueling[MAX_PLAYERS];
  513. new Float:Fuel[MAX_VEHICLES];
  514. new Wanted[MAX_PLAYERS];
  515. new ShowSpeed[MAX_PLAYERS];
  516. new IsInJail[MAX_PLAYERS];
  517. new Float:OldCoordsX[MAX_PLAYERS], Float:OldCoordsY[MAX_PLAYERS];
  518. new FirstSpawn[MAX_PLAYERS];
  519. new PlayerWage[MAX_PLAYERS];
  520. new Firstvisit[MAX_PLAYERS];
  521. new Float:LoginPosX[MAX_PLAYERS],Float:LoginPosY[MAX_PLAYERS],Float:LoginPosZ[MAX_PLAYERS];
  522. new AdminLevel[MAX_PLAYERS];
  523. new Muted[MAX_PLAYERS];
  524. new PlayerOwnSkin[MAX_PLAYERS];
  525. new Bankin[5];
  526. new Text:location[MAX_PLAYERS];
  527. new PFStyle[MAX_PLAYERS];
  528. new Gym;
  529.  
  530. //Vehicle names for speedometer
  531. new VehiclesName[][] = {
  532.     "Landstalker","Bravura","Buffalo","Linerunner","Perennial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
  533.     "Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
  534.     "Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
  535.     "Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
  536.     "Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
  537.     "Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina",
  538.     "Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
  539.     "Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer","Hotring Racer",
  540.     "Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","Roadtrain",
  541.     "Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
  542.     "Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
  543.     "Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
  544.     "Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
  545.     "Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer","Emperor",
  546.     "Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car","Police Car",
  547.     "Police Car","Police Ranger","Picador","S.W.A.T.","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer","Luggage Trailer",
  548.     "Stair Trailer","Boxville","Farm Plow","Utility Trailer"
  549. };
  550.  
  551.  
  552. forward SetupPlayerForClassSelection(playerid);
  553. forward StatsSave();
  554. forward ScoreUpgrade();
  555. forward Unjail(playerid);
  556.  
  557.  
  558.  
  559. //------------------------------------------------------------------------------------------------------
  560.  
  561. main()
  562. {
  563.         print("SAN FIERRO RPg- GAMEMODE");
  564.         print("Coded by Jakku");
  565.         print("Copyright (C) 2010");
  566. }
  567.  
  568. //------------------------------------------------------------------------------------------------------
  569.  
  570. public ExitArea()
  571. {
  572. for(new i = 0; i < MAX_PLAYERS; i++)
  573. {
  574. if (IsPlayerInRangeOfPoint(i,2.0,4023.0314,-5358.7080,1750.7492))
  575. {
  576. SetPlayerInterior(i, 0);
  577. SetPlayerPos(i,  -2761.8596,374.6866,5.3951);
  578. InfoDisplayed[i] = 0;
  579. }
  580. if (IsPlayerInRangeOfPoint(i,2.0,3994.6289,-5358.9160,1750.7192)) {
  581. if (InfoDisplayed[i] == 0) {
  582. ShowPlayerDialog(i, 7, DIALOG_STYLE_LIST, "Cityhall", "Fishing License\nBank Balance", "Ok", "Cancel");
  583. InfoDisplayed[i] = 1;
  584. }
  585. }
  586. if (IsPlayerInRangeOfPoint(i,2.0,4704.0083,-5835.2187,3382.0202))
  587. {
  588. PlayerBank[i] = 0;
  589. SetPlayerInterior(i, 0);
  590. SetPlayerPos(i,-1707.5295,786.3246,24.7343);
  591. }
  592. }
  593.  
  594. }
  595.  
  596. public LocationUpdate()
  597. {
  598. for(new i = 0; i < MAX_PLAYERS; i++)
  599. {
  600. if (IsLogged[i] == 1) {
  601. new string[50];
  602. new zone[28];
  603. GetPlayerZone(i, zone,MAX_ZONE_NAME);
  604. format(string, sizeof(string), "%s", zone);
  605. TextDrawSetString(location[i],string);
  606.  
  607. if (GetPlayerInterior(i) > 0) {
  608. TextDrawSetString(location[i],"~b~Inside a building");
  609. }
  610.  
  611. }
  612. }
  613. }
  614. public Fishing(playerid)
  615. {
  616. new rand = random(5);
  617. if (IsPlayerInRangeOfPoint(playerid, 20.0,-1313.3784,1296.0788,1.5658)) {
  618. if (rand == 2) {
  619. HaveFish[playerid] = 1;
  620. SendClientMessage(playerid, COLOR_YELLOW,"You have caught a fish!");
  621. }
  622. if (rand == 5) {
  623. HaveFish[playerid] = 1;
  624. SendClientMessage(playerid, COLOR_YELLOW,"You have caught a fish!");
  625. }
  626. if (rand == 3) {
  627. HaveFish[playerid] = 1;
  628. SendClientMessage(playerid, COLOR_YELLOW,"You have caught a fish!");
  629. }
  630. if (rand == 1) {
  631. SendClientMessage(playerid, COLOR_YELLOW,"You caught nothing at this time. Better luck next time!");
  632. }
  633. if (rand == 4) {
  634. SendClientMessage(playerid, COLOR_YELLOW,"You caught nothing at this time. Better luck next time!");
  635. }
  636. KillTimer(FishTimer[playerid]);
  637. }
  638. }
  639.  
  640. public DSLimit(playerid)
  641. {
  642. DrivingSchoolLimit[playerid] +=1;
  643. }
  644.  
  645. public OnVehicleSpawn(vehicleid)
  646. {
  647. Fuel[vehicleid] = Random(SPAWN_GAS_MIN, SPAWN_GAS_MAX);
  648. return true;
  649. }
  650.  
  651.  
  652. public StatsSave()
  653. {
  654. new file[128];
  655. for(new i = 0; i < MAX_PLAYERS; i++)
  656. {
  657. //
  658. if (IsLogged[i]) {
  659. new name[24];
  660. new Float:x,Float:y,Float:z;
  661. GetPlayerName(i, name,24);
  662. format(file,sizeof(file),"%s.ini",name);
  663. dini_Create(file);
  664. dini_IntSet(file,"Cash", GetPlayerMoney(i));
  665. dini_IntSet(file,"Score", GetPlayerScore(i));
  666. dini_IntSet(file,"Interior", GetPlayerInterior(i));
  667. dini_IntSet(file,"Bank", pBank[i]);
  668. dini_IntSet(file,"Org", Job[i]);
  669. dini_IntSet(file,"Org_leader", OrgLeader[i]);
  670. dini_IntSet(file,"Admin_level", AdminLevel[i]);
  671. dini_IntSet(file,"Earned_Wage", PlayerWage[i]);
  672. dini_IntSet(file,"Mobilephone", HaveMobilePhone[i]);
  673. dini_IntSet(file,"Musicplayer", HaveMusicPlayer[i]);
  674. dini_IntSet(file,"Watch", HaveWatch[i]);
  675. dini_IntSet(file,"AlcoholDrink", HaveAlcohol[i]);
  676. dini_IntSet(file,"Drink", HaveDrink[i]);
  677. dini_IntSet(file,"Driving_license", HaveDrivingLic[i]);
  678. dini_IntSet(file,"Have_fish", HaveFish[i]);
  679. dini_IntSet(file,"Snack", HaveSnack[i]);
  680. dini_IntSet(file,"Cigarette", HaveCigarette[i]);
  681. dini_IntSet(file,"Inside_diner", PlayerDiner[i]);
  682. dini_IntSet(file,"Inside_bank", PlayerBank[i]);
  683. dini_IntSet(file,"Fighting_style", PFStyle[i]);
  684. GetPlayerPos(i,x,y,z);
  685. dini_IntSet(file,"X",floatround(x));
  686. dini_IntSet(file,"Y",floatround(y));
  687. dini_IntSet(file,"Z",floatround(z));
  688. }
  689. }
  690. }
  691. public ScoreUpgrade()
  692. {
  693. for(new i = 0; i < MAX_PLAYERS; i++)
  694. {
  695. if (IsLogged[i]) {
  696. new string[170];
  697. SetPlayerScore(i,GetPlayerScore(i)+1);
  698. GivePlayerMoney(i,5000);
  699. format(string, sizeof(string), "Your score has been upgraded. You have earned $5000!");
  700. SendClientMessage(i, COLOR_YELLOW,string);
  701. }
  702. }
  703. }
  704. public Unjail(playerid)
  705. {
  706. if (IsInJail[playerid]) {
  707. SendClientMessage(playerid, COLOR_POWDERBLUE,"You have been unjailed");
  708. TogglePlayerControllable(playerid,1);
  709. IsInJail[playerid] = 0;
  710. KillTimer(JailTimer[playerid]);
  711. }
  712. }
  713. public Wage()
  714. {
  715. for(new i = 0; i < MAX_PLAYERS; i++)
  716. {
  717. if (Job[i]) {
  718. SendClientMessage(i, COLOR_POWDERBLUE,"You've earned from your organization");
  719. PlayerWage[i] +=150;
  720. }
  721. }
  722. }
  723.  
  724. //------------------------------------------------------------------------------------------------------
  725.  
  726. public OnPlayerPickUpPickup(playerid, pickupid)
  727. {
  728. new string[170];
  729.     new propid = -1;
  730.     for(new id; id<MAX_PROPERTIES; id++)
  731.     {
  732.         if(PropInfo[id][PickupNr] == pickupid)
  733.         {
  734.             propid = id;
  735.             break;
  736.         }
  737.     }
  738.     if(propid != -1)
  739.     {
  740.         new str[128];
  741.         new name[24];
  742.         GetPlayerName(playerid, name, 24);
  743.         new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
  744.         if(InfoShowed[playerid] == 0) {
  745.         if (ownerid == playerid) {
  746.         format(str, 128, "Welcome to your property %s!",name);
  747.         SendClientMessage(playerid, 0xFFFF00AA, str);
  748.         SendClientMessage(playerid, 0xFFFF00AA,"Type /propinfo for information about your property");
  749.         InfoShowed[playerid] = 1;
  750.         }
  751.         if(ownerid != playerid) {
  752.                         if(PropInfo[propid][PropUnbuyableTime] == 0)
  753.                 {
  754.                     format(str, 128, "You can buy this property for $%d! Type /buyprop to buy it or /propinfo for more information", PropInfo[propid][PropValue]);
  755.                     SendClientMessage(playerid, 0xFFFF00AA, str);
  756.                     GameTextForPlayer(playerid, "~g~Property for sale", 3500, 3);
  757.                     InfoShowed[playerid] = 1;
  758.                     return 1;
  759.                 }
  760.         format(str, 128, "Welcome to %s's property! Type /propinfo for information about this property",PropInfo[propid][PropOwner]);
  761.         SendClientMessage(playerid, 0xFFFF00AA, str);
  762.         GameTextForPlayer(playerid, "~r~Property owned", 3500, 3);
  763.         InfoShowed[playerid] = 1;
  764.         }
  765.         }
  766.  
  767.     }
  768. if (pickupid == SFPDPick) {
  769. if (Job[playerid] != 1) SendClientMessage(playerid, COLOR_POWDERBLUE,"Welcome to the HQ of San Fierro Police Department!");
  770. if (Job[playerid] == 1) {
  771.  
  772. format(string, sizeof(string), "Welcome back to your HQ. You have collected $%d wage!", PlayerWage[playerid]);
  773. GivePlayerMoney(playerid, PlayerWage[playerid]);
  774. PlayerWage[playerid] = 0;
  775. }
  776. }
  777. if (pickupid == SFFDPick) {
  778. if (Job[playerid] != 2) SendClientMessage(playerid, COLOR_POWDERBLUE,"Welcome to the HQ of San Fierro Fire Department!");
  779. if (Job[playerid] == 2) {
  780.  
  781. format(string, sizeof(string), "Welcome back to your HQ. You have collected $%d wage!", PlayerWage[playerid]);
  782. GivePlayerMoney(playerid, PlayerWage[playerid]);
  783. PlayerWage[playerid] = 0;
  784. }
  785. }
  786. if (pickupid == TriadsPick) {
  787. if (Job[playerid] != 3) SendClientMessage(playerid, COLOR_POWDERBLUE,"Welcome to the HQ of The Triads!");
  788. if (Job[playerid] == 3) {
  789. if (PlayerWage[playerid] > 0) return SendClientMessage(playerid, COLOR_GREEN,"Welcome back to your HQ. You have no wage to collect. Come back later");
  790. format(string, sizeof(string), "Welcome back to your HQ. You have collected $%d wage!", PlayerWage[playerid]);
  791. GivePlayerMoney(playerid, PlayerWage[playerid]);
  792. PlayerWage[playerid] = 0;
  793. }
  794. }
  795. if (pickupid == ClothesShop[0]) {
  796. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Victim", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
  797. }
  798. if (pickupid == ClothesShop[1]) {
  799. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "ZIP", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
  800. }
  801. if (pickupid == ClothesShop[2]) {
  802. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Binco", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
  803. }
  804. if (pickupid == ClothesShop[3]) {
  805. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Sub Urban", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
  806. }
  807. if (pickupid == DoNOTDeleteThis) {
  808. //If you delete this pickup, the property system won't work properly!! SO DON'T DELETE THIS
  809. }
  810. if (pickupid == ElectronicsDealer) {
  811. ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Electronics Dealer", "Mobile Phone - $1000\nWatch - $300\nMusic Player - $200", "Purchase", "Cancel");
  812. }
  813. if (pickupid == BarPickup[0]) {
  814. ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Boozer", "Whiskey - $10\nVodka - $5\nBeer - $5\nCoke - $2\nWater - $1", "Purchase", "Cancel");
  815. }
  816. if (pickupid == BarPickup[1]) {
  817. ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Boozer", "Whiskey - $10\nVodka - $5\nBeer - $5\nCoke - $2\nWater - $1", "Purchase", "Cancel");
  818. }
  819. if (pickupid == CityhallGoIn) {
  820. SetPlayerInterior(playerid,2);
  821. SetPlayerPos(playerid,4015.8823,-5358.7812,1750.7492);
  822. SendClientMessage(playerid, COLOR_YELLOW, "Welcome to the Cityhall!");
  823. }
  824. if (pickupid == Drivingschoolpickup) {
  825. ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Driving School", "Take Test - $1000\nObtain License - $300", "Ok", "Cancel");
  826. }
  827. if (pickupid == Market) {
  828. ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "24/7", "Snack - $5\nCigarette - $10", "Purchase", "Cancel");
  829. }
  830. if (pickupid == DinerExit) {
  831.  
  832. if (PlayerDiner[playerid] == 1)
  833. {
  834. PlayerDiner[playerid] = 0;
  835. SetPlayerInterior(playerid, 0);
  836. SetPlayerPos(playerid,-2275.7365,596.2686,39.3008);
  837. }
  838. if (PlayerDiner[playerid] == 2)
  839. {
  840. PlayerDiner[playerid] = 0;
  841. SetPlayerInterior(playerid, 0);
  842. SetPlayerPos(playerid,-2094.5588,715.2969,69.5625);
  843. }
  844. if (PlayerDiner[playerid] == 3)
  845. {
  846. PlayerDiner[playerid] = 0;
  847. SetPlayerInterior(playerid, 0);
  848. SetPlayerPos(playerid,-2426.1252,-136.2638,35.1718);
  849. }
  850. if (PlayerDiner[playerid] == 4)
  851. {
  852. PlayerDiner[playerid] = 0;
  853. SetPlayerInterior(playerid, 0);
  854. SetPlayerPos(playerid,-2520.8500,1216.7348,37.4283);
  855. }
  856.  
  857. //
  858. }
  859. for(new i=0; i<sizeof(DinerIn); i++)
  860. {
  861.  
  862. if (pickupid == DinerIn[i])
  863. {
  864. if (IsPlayerInRangeOfPoint(playerid, 10.0,-2279.2070,595.8998,39.2132))
  865. {
  866. SetPlayerDiner(playerid, 1);
  867. }
  868. if (IsPlayerInRangeOfPoint(playerid, 10.0,-2099.2145,715.3974,69.5625))
  869. {
  870. SetPlayerDiner(playerid, 2);
  871. }
  872. if (IsPlayerInRangeOfPoint(playerid, 10.0,-2430.6308,-136.2021,35.3203))
  873. {
  874. SetPlayerDiner(playerid, 3);
  875. }
  876. if (IsPlayerInRangeOfPoint(playerid, 10.0,-2523.4770,1216.2227,37.4283))
  877. {
  878. SetPlayerDiner(playerid, 4);
  879. }
  880. }
  881.  
  882.  
  883. }
  884.  
  885. for(new i=0; i<sizeof(Bankin); i++)
  886. {
  887. if (pickupid == Bankin[i])
  888. {
  889.  
  890. if (IsPlayerInRangeOfPoint(playerid, 10.0,-1704.2038,785.6531,25.5571))
  891. {
  892. SetPlayerBank(playerid, 1);
  893. }
  894.  
  895. }
  896.  
  897. }
  898.  
  899.  
  900.  
  901. if (pickupid == Restaurant)
  902. {
  903. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Diner", "Juice - $5\nHamburger - $10\nChocolate - $5", "Purchase", "Cancel");
  904. }
  905. if (pickupid == Gym)
  906. {
  907. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "Gym", "Elbow\nGrabkick\nKneehead", "Purchase", "Cancel");
  908. }
  909.  
  910. return 1;
  911. }
  912. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  913. {
  914.    
  915.     if(dialogid == 1 && response)
  916.     {
  917.        
  918.         switch(listitem)
  919.         {
  920.             case 0:
  921.             {
  922.                 if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
  923.                 if (PlayerOwnSkin[playerid] == 170) return SendClientMessage(playerid, COLOR_ORED, "You already own this skin!");
  924.                 SetPlayerSkin(playerid, 170);
  925.                 SendClientMessage(playerid, COLOR_YELLOW, "You have bought this skin for $50");
  926.                 GivePlayerMoney(playerid, -50);
  927.                 PlayerOwnSkin[playerid] = GetPlayerSkin(playerid);
  928.             }
  929.             case 1:
  930.             {
  931.                 if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
  932.                 if (PlayerOwnSkin[playerid] == 184) return SendClientMessage(playerid, COLOR_ORED, "You already own this skin!");
  933.                 SetPlayerSkin(playerid, 184);
  934.                 GivePlayerMoney(playerid, -50);
  935.                 SendClientMessage(playerid, COLOR_YELLOW, "You have bought this skin for $50");
  936.                 PlayerOwnSkin[playerid] = GetPlayerSkin(playerid);
  937.             }
  938.             case 2:
  939.             {
  940.                 if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
  941.                 if (PlayerOwnSkin[playerid] == 188) return SendClientMessage(playerid, COLOR_ORED, "You already own this skin!");
  942.                 SetPlayerSkin(playerid, 188);
  943.                 GivePlayerMoney(playerid, -50);
  944.                 SendClientMessage(playerid, COLOR_YELLOW, "You have bought this skin for $50");
  945.                 PlayerOwnSkin[playerid] = GetPlayerSkin(playerid);
  946.             }
  947.         }
  948.     }
  949.         if(dialogid == 2 && response)
  950.     {
  951.        
  952.         switch(listitem)
  953.         {
  954.             case 0:
  955.             {
  956.                 if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
  957.                 if (HaveMobilePhone[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
  958.                 GivePlayerMoney(playerid,-1000);
  959.                 HaveMobilePhone[playerid] = 1;
  960.                 SendClientMessage(playerid, COLOR_YELLOW,"You have bought a mobile phone for $1000");
  961.                 SendClientMessage(playerid, COLOR_YELLOW,"Type /phonehelp for a guide");
  962.             }
  963.             case 1:
  964.             {
  965.                 if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
  966.                 if (HaveWatch[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
  967.                 GivePlayerMoney(playerid,-300);
  968.                 HaveWatch[playerid] = 1;
  969.                 SendClientMessage(playerid, COLOR_YELLOW,"You have bought a watch for $300");
  970.                 SendClientMessage(playerid, COLOR_YELLOW,"The time will now appear in the right up of your screen");
  971.                 TogglePlayerClock(playerid, 1);
  972.             }
  973.             case 2:
  974.             {
  975.                 if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
  976.                 if (HaveMusicPlayer[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
  977.                 GivePlayerMoney(playerid,-200);
  978.                 HaveMusicPlayer[playerid] = 1;
  979.                 SendClientMessage(playerid, COLOR_YELLOW,"You have bought a music player for $200");
  980.                 SendClientMessage(playerid, COLOR_YELLOW,"Type /mp to use it");
  981.             }
  982.         }
  983.     }
  984.         if(dialogid == 3 && response)
  985.     {
  986.        
  987.         switch(listitem)
  988.         {
  989.             case 0:
  990.             {
  991.                 SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 1");
  992.                 PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
  993.             }
  994.             case 1:
  995.             {
  996.                 SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 2");
  997.                 PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
  998.             }
  999.             case 2:
  1000.             {
  1001.                 SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 3");
  1002.                 PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
  1003.             }
  1004.             case 3:
  1005.             {
  1006.                 SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 4");
  1007.                 PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
  1008.             }
  1009.             case 4:
  1010.             {
  1011.                 SendClientMessage(playerid, COLOR_YELLOW,"Stopped");
  1012.                 PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
  1013.             }
  1014.         }
  1015.     }
  1016.             if(dialogid == 4 && response)
  1017.     {
  1018.        
  1019.         switch(listitem)
  1020.         {
  1021.             case 0:
  1022.             //ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Boozer", "Whiskey - $10\nVodka - $5\nBeer - $5\nCoke - $2\nWater - $1", "Purchase", "Cancel");
  1023.             {
  1024.             if (HaveAlcohol[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have an alcohol drink! Use it first");
  1025.             SendClientMessage(playerid, COLOR_WHITE,"You have bought a bottle of Whiskey for $10");
  1026.             HaveAlcohol[playerid] = 1;
  1027.             GivePlayerMoney(playerid, -10);
  1028.             }
  1029.             case 1:
  1030.             {
  1031.             if (HaveAlcohol[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have an alcohol drink! Use it first");
  1032.             SendClientMessage(playerid, COLOR_WHITE,"You have bought a bottle of Vodka for $5");
  1033.             HaveAlcohol[playerid] = 1;
  1034.             GivePlayerMoney(playerid, -5);
  1035.             }
  1036.             case 2:
  1037.             {
  1038.             if (HaveAlcohol[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have an alcohol drink! Use it first");
  1039.             SendClientMessage(playerid, COLOR_WHITE,"You have bought a bottle of Beer for $5");
  1040.             HaveAlcohol[playerid] = 1;
  1041.             GivePlayerMoney(playerid, -5);
  1042.             }
  1043.             case 3:
  1044.             {
  1045.             if (HaveDrink[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have a drink! Use it first");
  1046.             SendClientMessage(playerid, COLOR_WHITE,"You have bought a glass of Coke for $2");
  1047.             GivePlayerMoney(playerid, -2);
  1048.             HaveDrink[playerid] = 1;
  1049.             }
  1050.             case 4:
  1051.             {
  1052.             if (HaveDrink[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have a drink! Use it first");
  1053.             SendClientMessage(playerid, COLOR_WHITE,"You have bought a glass of Water for $1");
  1054.             GivePlayerMoney(playerid, -1);
  1055.             HaveDrink[playerid] = 1;
  1056.             }
  1057.         }
  1058.     }
  1059.             if(dialogid == 5 && response)
  1060.     {
  1061.        
  1062.         switch(listitem)
  1063.         {
  1064.             case 0:
  1065.             {
  1066.                 if (HaveAlcohol[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
  1067.                 SendClientMessage(playerid, COLOR_YELLOW,"You took a bottle from your pocket");
  1068.                 SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  1069.                 HaveAlcohol[playerid] = 0;
  1070.             }
  1071.             case 1:
  1072.             {
  1073.                 if (HaveDrink[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
  1074.                 SendClientMessage(playerid, COLOR_YELLOW,"You took a cup from your pocket");
  1075.                 SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  1076.                 HaveDrink[playerid] = 0;
  1077.             }
  1078.             case 2:
  1079.             {
  1080.                 if (HaveFish[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
  1081.                 SendClientMessage(playerid, COLOR_YELLOW,"You took a fish from your pocket");
  1082.                 OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1083.                 HaveFish[playerid] = 0;
  1084.                 GivePlayerHealth(playerid, 10.0);
  1085.             }
  1086.             case 3:
  1087.             {
  1088.                 new Float:php;
  1089.                 GetPlayerHealth(playerid, php);
  1090.                 if (HaveCigarette[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
  1091.                 SendClientMessage(playerid, COLOR_YELLOW,"You took a cigarette from your pocket");
  1092.                 SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  1093.                 HaveCigarette[playerid] = 0;
  1094.                 GivePlayerHealth(playerid, -10.0);
  1095.             }
  1096.             case 4:
  1097.             {
  1098.                 new Float:php;
  1099.                 GetPlayerHealth(playerid, php);
  1100.                 if (HaveSnack[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
  1101.                 SendClientMessage(playerid, COLOR_YELLOW,"You took a snack from your pocket");
  1102.                 OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1103.                 HaveSnack[playerid] = 0;
  1104.                 GivePlayerHealth(playerid, 10.0);
  1105.             }
  1106.         }
  1107.     }
  1108.                 if(dialogid == 6 && response)
  1109.     {
  1110.        
  1111.         switch(listitem)
  1112.         {
  1113.             case 0:
  1114.             {
  1115.             if (DTimer[playerid]) return Nothing();
  1116.             if (HaveDrivingLic[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have your driving license!");
  1117.             SetPlayerInterior(playerid,0);
  1118.             Drivingschoolcar[playerid] = CreateVehicle(535,-2035.1599,-96.2303,34.9270,88.9819,69,1,-1);
  1119.             PutPlayerInVehicle(playerid, Drivingschoolcar[playerid],0);
  1120.             SetPlayerCheckpoint(playerid,-1875.4793,915.8572,35.0090,4.0);
  1121.             GivePlayerMoney(playerid, -1000);
  1122.             DTimer[playerid] = SetTimerEx("DSLimit", 1000, 1, "d", playerid);
  1123.             SendClientMessage(playerid, COLOR_GREEN,"Driving Test started, follow the red blip in your minimap. Don't hurry but don't drive too slow!");
  1124.             }
  1125.             case 1:
  1126.             {
  1127.             if (DTimer[playerid]) return Nothing();
  1128.             if (HaveDrivingLic[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have your driving license!");
  1129.             if (DTestCompleted[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You haven't completed the test yet!");
  1130.             HaveDrivingLic[playerid] = 1;
  1131.             SendClientMessage(playerid, COLOR_GREEN,"You have obtained your driving license!");
  1132.             GivePlayerMoney(playerid, -300);
  1133.             DTestCompleted[playerid] = 0;
  1134.             }
  1135.         }
  1136.     }
  1137.                     if(dialogid == 7 && response)
  1138.     {
  1139.        
  1140.         switch(listitem)
  1141.         {
  1142.             case 0:
  1143.             {
  1144.             if (FishingLicense[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have your fishing license!");
  1145.             if (3000 > GetPlayerMoney(playerid)) {
  1146.             SendClientMessage(playerid, COLOR_ORED,"Error: You need at least $3000!");
  1147.             InfoDisplayed[playerid] = 0;
  1148.             return 1;
  1149.             }
  1150.             FishingLicense[playerid] = 1;
  1151.             SendClientMessage(playerid, COLOR_GREEN,"You have bought a fishing license for $3000!");
  1152.             GivePlayerMoney(playerid, -3000);
  1153.             InfoDisplayed[playerid] = 0;
  1154.             }
  1155.             case 1:
  1156.             {
  1157.             new string[170];
  1158.             format(string, sizeof(string), "You currently have $%d in your bank!", pBank[playerid]);
  1159.             SendClientMessage(playerid, COLOR_YELLOW,string);
  1160.             InfoDisplayed[playerid] = 0;
  1161.             }
  1162.         }
  1163.     }
  1164.     if (dialogid == 7 && !response) InfoDisplayed[playerid] = 0;
  1165.  
  1166.     if(dialogid == 8 && response)
  1167.     {
  1168.        
  1169.         switch(listitem)
  1170.         {
  1171.             case 0:
  1172.             {
  1173.             if (HaveSnack[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
  1174.             if (5 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money to buy this item!");
  1175.             HaveSnack[playerid] = 1;
  1176.             GivePlayerMoney(playerid, -5);
  1177.             SendClientMessage(playerid, COLOR_GREEN,"You have bought a Snack for $5");
  1178.             }
  1179.             case 1:
  1180.             {
  1181.             if (HaveCigarette[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
  1182.             if (10 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money to buy this item!");
  1183.             HaveCigarette[playerid] = 1;
  1184.             GivePlayerMoney(playerid, -10);
  1185.             SendClientMessage(playerid, COLOR_GREEN,"You have bought a Cigarette for $5");
  1186.             }
  1187.         }
  1188.     }
  1189.         if(dialogid == 9 && response)
  1190.     {
  1191.        
  1192.         switch(listitem)
  1193.         {
  1194.             case 0:
  1195.             {
  1196.             new Float:HP;
  1197.             HP = GetPlayerHealth(playerid, HP);
  1198.             GivePlayerMoney(playerid, -5);
  1199.             SendClientMessage(playerid, COLOR_GREEN,"You have bought a Juice for $5");
  1200.             SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  1201.             GivePlayerHealth(playerid, 10.0);
  1202.             }
  1203.             case 1:
  1204.             {
  1205.             new Float:HP;
  1206.             HP = GetPlayerHealth(playerid, HP);
  1207.             GivePlayerMoney(playerid, -10);
  1208.             SendClientMessage(playerid, COLOR_GREEN,"You have bought a Hamburger for $10");
  1209.             OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1210.             GivePlayerHealth(playerid, 10.0);
  1211.             }
  1212.             case 2:
  1213.             {
  1214.             new Float:HP;
  1215.             HP = GetPlayerHealth(playerid, HP);
  1216.             GivePlayerMoney(playerid, -5);
  1217.             SendClientMessage(playerid, COLOR_GREEN,"You have bought a Chocolate for $5");
  1218.             OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  1219.             GivePlayerHealth(playerid, 10.0);
  1220.             }
  1221.         }
  1222.     }
  1223.             if(dialogid == 11 && response)
  1224.     {
  1225.        
  1226.         switch(listitem)
  1227.         {
  1228.             case 0:
  1229.             {
  1230.             if (PFStyle[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already know this style!");
  1231.             if (2500 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money!");
  1232.             PFStyle[playerid] = 1;
  1233.             SendClientMessage(playerid, COLOR_YELLOW,"You have learnt a fighting style ^Elbow^");
  1234.             SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
  1235.             }
  1236.             case 1:
  1237.             {
  1238.             if (PFStyle[playerid] == 2) return SendClientMessage(playerid, COLOR_ORED,"Error: You already know this style!");
  1239.             if (2500 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money!");
  1240.             PFStyle[playerid] = 2;
  1241.             SendClientMessage(playerid, COLOR_YELLOW,"You have learnt a fighting style ^Grabkick^");
  1242.             SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
  1243.             }
  1244.             case 2:
  1245.             {
  1246.             if (PFStyle[playerid] == 3) return SendClientMessage(playerid, COLOR_ORED,"Error: You already know this style!");
  1247.             if (2500 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money!");
  1248.             SendClientMessage(playerid, COLOR_YELLOW,"You have learnt a fighting style ^Kneehead^");
  1249.             PFStyle[playerid] = 3;
  1250.             SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
  1251.             }
  1252.         }
  1253.     }
  1254.     return 1;
  1255. }
  1256.  
  1257. //------------------------------------------------------------------------------------------------------
  1258.  
  1259.  
  1260.  
  1261. //------------------------------------------------------------------------------------------------------
  1262.  
  1263. stock GivePlayerHealth(playerid, Float:health)
  1264. {
  1265.     new Float:pHealth;
  1266.     GetPlayerHealth(playerid, pHealth);
  1267.     SetPlayerHealth(playerid, pHealth + health);
  1268. }
  1269.  
  1270. stock GetPlayerNameEx(playerid) {
  1271.   new name[24];
  1272.   GetPlayerName(playerid, name, 24);
  1273.   return name;
  1274. }
  1275.  
  1276. stock Nothing()
  1277. {
  1278. // :/
  1279. return 1;
  1280. }
  1281. stock GetPlayerZone(playerid, zone[], len) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
  1282. {
  1283.         new Float:x, Float:y, Float:z;
  1284.         GetPlayerPos(playerid, x, y, z);
  1285.         for(new i = 0; i != sizeof(gSAZones); i++ )
  1286.         {
  1287.                 if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
  1288.                 {
  1289.                     return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
  1290.                 }
  1291.         }
  1292.         return 0;
  1293. }
  1294.  
  1295.  
  1296.  
  1297.  
  1298. //---------------------------------------------------------------------------------------------------
  1299.  
  1300.  
  1301.  
  1302. stock IsPlayerInZone(playerid, zone[])
  1303. {
  1304.         new TmpZone[MAX_ZONE_NAME];
  1305.         GetPlayer3DZone(playerid, TmpZone, sizeof(TmpZone));
  1306.         for(new i = 0; i != sizeof(gSAZones); i++)
  1307.         {
  1308.                 if(strfind(TmpZone, zone, true) != -1)
  1309.                         return 1;
  1310.         }
  1311.         return 0;
  1312. }
  1313. //------------------------------------------------------------------------------------------------------
  1314.  
  1315. public OnPlayerExitVehicle(playerid, vehicleid)
  1316. {
  1317. if (vehicleid == Drivingschoolcar[playerid]) {
  1318. DestroyVehicle(Drivingschoolcar[playerid]);
  1319. GameTextForPlayer(playerid, "~r~Failed!",6000,1);
  1320. SendClientMessage(playerid, COLOR_ORED,"Driving Test - Failed!");
  1321. Drivingschoolcar[playerid] = 0;
  1322. DisablePlayerCheckpoint(playerid);
  1323. KillTimer(DTimer[playerid]);
  1324. DrivingSchoolLimit[playerid] = 0;
  1325. DTimer[playerid] = 0;
  1326. }
  1327. }
  1328.  
  1329.  
  1330. public OnPlayerConnect(playerid)
  1331. {
  1332. Firstvisit[playerid] = 0;
  1333. new Year, Month, Day;
  1334. getdate(Year, Month, Day);
  1335. new string[170];
  1336. new name[24];
  1337. new file[128];
  1338. GetPlayerName(playerid, name,24);
  1339. format(file,sizeof(file),"%s.ini",name);
  1340. if (!dini_Exists(file)) {
  1341. Firstvisit[playerid] = 1;
  1342. }
  1343. if (udb_Exists("donotuncomment.txt")) { } //If you uncomment this, you'll get "Symbol is never used:"ret_mempcy"- warning
  1344. pBank[playerid] = 0;
  1345. OrgLeader[playerid] = 0;
  1346. JustDied[playerid] = 0;
  1347. Job[playerid] = 0;
  1348. PlayerBank[playerid] = 0;
  1349. InfoDisplayed[playerid] = 0;
  1350. Drivingschoolcar[playerid] = false;
  1351. HaveMusicPlayer[playerid] = 0;
  1352. HaveWatch[playerid] = 0;
  1353. HaveMobilePhone[playerid] = 0;
  1354. FishingLicense[playerid] = 0;
  1355. DTimer[playerid] = 0;
  1356. PFStyle[playerid] = 0;
  1357. HaveSnack[playerid] = 0;
  1358. HaveFish[playerid] = 0;
  1359. DrivingSchoolLimit[playerid] = 0;
  1360. DTestCompleted[playerid] = 0;
  1361. TextDrawShowForPlayer(playerid,SFRPg);
  1362. HaveCigarette[playerid] = 0;
  1363. PlayerOwnSkin[playerid] = 0;
  1364. HaveDrivingLic[playerid] = 0;
  1365. IsInJail[playerid] = 0;
  1366. AdminLevel[playerid] = 0;
  1367. Spawned[playerid] = 1;
  1368. Muted[playerid] = 0;
  1369. HaveAlcohol[playerid] = 0;
  1370. HaveDrink[playerid] = 0;
  1371. PlayerDiner[playerid] = 0;
  1372. ShowSpeed[playerid] = 1;
  1373. PlayerWage[playerid]= 0;
  1374. FirstSpawn[playerid] = 1;
  1375. Wanted[playerid] = 0;
  1376. GetPlayerName(playerid, name,24);
  1377. format(string, sizeof(string), "**%s has joined the server",name);
  1378. SendClientMessageToAllEx(playerid, COLOR_GREY,string);
  1379. SendClientMessage(playerid, COLOR_YELLOW,"Welcome to San Fierro RPg server");
  1380. SendClientMessage(playerid, COLOR_ORANGE,"This gamemode is coded by Jakku (C) 2010");
  1381. SendClientMessage(playerid, COLOR_BROWN,"Type /help to get started on this server");
  1382. format(string, sizeof(string), "Date: %02d.%02d.%d", Day, Month, Year);
  1383. SendClientMessage(playerid, COLOR_GREEN,string);
  1384. PlayerOwnSkin[playerid] = dini_Int(file, "Own_skin");
  1385. PlayerProps[playerid] = 0;
  1386. Logged[playerid] = 0;
  1387. InfoShowed[playerid] = 0;
  1388. EarningsForPlayer[playerid] = 0;
  1389. new pName[MAX_PLAYER_NAME];
  1390. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  1391. for(new propid; propid < PropertiesAmount; propid++)
  1392. {
  1393. if(PropInfo[propid][PropIsBought] == 1)
  1394. {
  1395. if(strcmp(PropInfo[propid][PropOwner], pName, true)==0)
  1396. {
  1397. EarningsForPlayer[playerid] += PropInfo[propid][PropEarning];
  1398. PlayerProps[playerid]++;
  1399. }
  1400. }
  1401. }
  1402.  
  1403. if(PlayerProps[playerid] > 0)
  1404. {
  1405. new str[128];
  1406. format(str, 128, "You currently own %d properties!", PlayerProps[playerid]);
  1407. SendClientMessage(playerid, 0x8080FFAA, str);
  1408. }
  1409.  
  1410.  
  1411. //Icons
  1412. SetPlayerMapIcon(playerid, 1, -1620.0010,683.0117,7.1875, 30, 0);
  1413. SetPlayerMapIcon(playerid, 2, -2024.8890,67.1163,28.4371, 20, 0);
  1414. SetPlayerMapIcon(playerid, 3, -2243.1494,129.5778,35.3203, 56, 0);
  1415. SetPlayerMapIcon(playerid, 4, -2243.8564,-87.8855,35.3203, 48 ,0);
  1416. SetPlayerMapIcon(playerid, 5,-2552.7429,192.7399,6.1240,48,0);
  1417. SetPlayerMapIcon(playerid, 6,-1884.9554,863.3033,35.1718,45,0);
  1418. SetPlayerMapIcon(playerid, 7,-1696.5523,949.3828,24.8906,45,0);
  1419. SetPlayerMapIcon(playerid, 8,-2376.4199,910.9675,45.4453,45,0);
  1420. SetPlayerMapIcon(playerid, 9,-2493.7028,-29.5141,25.7656,45,0);
  1421. SetPlayerMapIcon(playerid, 10,-1313.3784,1296.0788,1.5658,9,0);
  1422. SetPlayerMapIcon(playerid, 11,-2658.5336,639.0750,14.4531,22,0);
  1423. SetPlayerMapIcon(playerid, 12,-2765.8862,375.5025,6.3346,12,0);
  1424.  
  1425. //DINER ICONS//
  1426. SetPlayerMapIcon(playerid, 13,-2279.2070,595.8998,39.2132,17,0);
  1427. SetPlayerMapIcon(playerid, 14,-2099.2145,715.3974,69.5625,17,0);
  1428. SetPlayerMapIcon(playerid, 15,-2430.6308,-136.2021,35.3203,17,0);
  1429. SetPlayerMapIcon(playerid, 16,-2523.4770,1216.2227,37.4283,17,0);
  1430. //
  1431.  
  1432. SetPlayerMapIcon(playerid, 17,-1704.2038,785.6531,25.5571,52,0);
  1433. SetPlayerMapIcon(playerid, 18,-2268.9274,-155.7561,35.3203,54,0);
  1434.  
  1435. //
  1436.  
  1437. return 1;
  1438. }
  1439.  
  1440. public Random(min, max)
  1441. {
  1442.     new a = random(max - min) + min;
  1443.     return a;
  1444. }
  1445. public Speedometer()
  1446. {
  1447.     for(new i = 0; i < MAX_PLAYERS; i++)
  1448.     {
  1449.                 new pState = GetPlayerState(i);
  1450.                 new pVeh = GetPlayerVehicleID(i);
  1451.                 new pModel = GetVehicleModel(pVeh);
  1452.         if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && pState == PLAYER_STATE_DRIVER && pModel != 509 && pModel != 510 && pModel != 481)
  1453.         {
  1454.             if(ShowSpeed[i] == 1)
  1455.             {
  1456.                 #define MULTIPLY_SPEED  4
  1457.                 new Float:x, Float:y, Float:z, Float:Dis, Float:health, string[256];
  1458.                 GetPlayerPos(i, x, y, z); GetVehicleHealth(GetPlayerVehicleID(i), health); new getthecar = GetPlayerVehicleID(i);
  1459.                 new VehicleModel = GetVehicleModel(GetPlayerVehicleID(i));
  1460.  
  1461.                 Dis = floatsqroot(floatpower(floatabs(floatsub(OldCoordsX[i],x)),2) + floatpower(floatabs(floatsub(OldCoordsY[i],y)),2));
  1462.                 if(Fuel[getthecar] <= 0){ RemovePlayerFromVehicle(i); SendClientMessage(i, COLOR_YELLOW, "Your vehicle has ran out of fuel! Have a nice walk");}
  1463.                 if(VehicleModel==509||VehicleModel==481||VehicleModel==510) {SetVehicleHealth(GetPlayerVehicleID(i), 1000); Fuel[getthecar] = 100;}
  1464.                 if(VehicleModel==520||VehicleModel==476||VehicleModel==593||VehicleModel==553||VehicleModel==513||VehicleModel==512||VehicleModel==577||VehicleModel==592||VehicleModel==511||VehicleModel==539||VehicleModel==464||VehicleModel==519 ||VehicleModel==538 ||VehicleModel==570) { Fuel[getthecar] = 100; }
  1465.                 new speed = (floatround(Dis)*MULTIPLY_SPEED);
  1466.  
  1467.                 if( speed == 0 ){
  1468.                 format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1469.  
  1470.                 } else if( speed >= 1 && speed <= 99 ){
  1471.                     format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1472.                     Fuel[getthecar] -= 0.02;
  1473.                 } else if( speed >= 100 && speed <= 179 ){
  1474.                     format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1475.                     Fuel[getthecar] -= 0.07;
  1476.                 } else if( speed >= 179 && speed <= 200 ){
  1477.                     format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1478.                     Fuel[getthecar] -= 0.07;
  1479.                 } else if( speed >= 200 && speed <= 230 ){
  1480.                     format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1481.                     Fuel[getthecar] -= 0.07;
  1482.                 } else if( speed >= 230 && speed <= 270 ){
  1483.                     format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1484.                     Fuel[getthecar] -= 0.07;
  1485.                 } else if( speed >= 270 && speed <= 300 ){
  1486.                     format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1487.                     Fuel[getthecar] -= 0.07;
  1488.                 } else {
  1489.                     format(string,sizeof(string),"~B~Vehicle: ~w~%s   ~B~Speed: ~Y~%dkm/h ~n~             ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
  1490.                     Fuel[getthecar] -= 0.08;
  1491.                 }
  1492.  
  1493.                 TextDrawSetString(Speedom[i],string);
  1494.  
  1495.                 TextDrawShowForPlayer(i, Speedom[i]);
  1496.                 OldCoordsX[i] = x; OldCoordsY[i] = y;
  1497.             } else { TextDrawHideForPlayer(i,Speedom[i]); }
  1498.         }
  1499.     }
  1500.     return true;
  1501. }
  1502. public ReFill(playerid)
  1503. {
  1504.     new string[200];
  1505.     new getthecar = GetPlayerVehicleID(playerid);
  1506.     new Float:x, Float:y, Float:z;
  1507.     if(IsPlayerConnected(playerid) && Fuel[getthecar] < 100){
  1508.         Fuel[getthecar] += 3;
  1509.         if(GetPlayerPos(playerid, x, y, z) != IsPlayerInFuelStation(playerid) || !IsPlayerInAnyVehicle(playerid) || Fuel[getthecar] >= 100){
  1510.             new RefueledAmount = floatround(Fuel[ getthecar]) - OldFuel[playerid];
  1511.             GivePlayerMoney(playerid, -RefueledAmount);
  1512.             format(string, sizeof(string),"Your refuel costs $%d. Have a nice day!", RefueledAmount);
  1513.             SendClientMessage(playerid, COLOR_YELLOW, string);
  1514.             KillTimer(ReFuelTimer[playerid]); Refueling[playerid] = 0;}
  1515.     }
  1516.     return true;
  1517. }
  1518. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  1519. {
  1520.     new Float:oldposx, Float:oldposy, Float:oldposz;
  1521.     new Float:tempposx, Float:tempposy, Float:tempposz;
  1522.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1523.     tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z);
  1524.     if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1525.     { return true; }
  1526.     return false;
  1527. }
  1528. public IsPlayerInFuelStation(playerid)
  1529. {
  1530.     if(PlayerToPoint(10,playerid,1595.5406, 2198.0520, 10.3863) || PlayerToPoint(10,playerid,2202.0649, 2472.6697, 10.5677) ||
  1531.     PlayerToPoint(10,playerid,2115.1929, 919.9908, 10.5266) || PlayerToPoint(10,playerid,2640.7209, 1105.9565, 10.5274) ||
  1532.     PlayerToPoint(10,playerid,608.5971, 1699.6238, 6.9922) || PlayerToPoint(10,playerid,618.4878, 1684.5792, 6.9922) ||
  1533.     PlayerToPoint(10,playerid,2146.3467, 2748.2893, 10.5245) || PlayerToPoint(10,playerid,-1679.4595, 412.5129, 6.9973) ||
  1534.     PlayerToPoint(10,playerid,-1327.5607, 2677.4316, 49.8093) || PlayerToPoint(10,playerid,-1470.0050, 1863.2375, 32.3521) ||
  1535.     PlayerToPoint(10,playerid,-2409.2200, 976.2798, 45.2969) || PlayerToPoint(10,playerid,-2244.1396, -2560.5833, 31.9219) ||
  1536.     PlayerToPoint(10,playerid,-1606.0544, -2714.3083, 48.5335) || PlayerToPoint(10,playerid,1937.4293, -1773.1865, 13.3828) ||
  1537.     PlayerToPoint(10,playerid,-91.3854, -1169.9175, 2.4213) || PlayerToPoint(10,playerid,1383.4221, 462.5385, 20.1506) ||
  1538.     PlayerToPoint(10,playerid,660.4590, -565.0394, 16.3359) || PlayerToPoint(10,playerid,1381.7206, 459.1907, 20.3452) ||
  1539.     PlayerToPoint(10,playerid,-1605.7156, -2714.4573, 48.5335) || PlayerToPoint(10,playerid,1338.4438,1398.4487,10.8203))
  1540.  
  1541.     { return true; }
  1542.     return false;
  1543. }
  1544.  
  1545. public OnPlayerEnterCheckpoint(playerid)
  1546. {
  1547.     if (IsPlayerInRangeOfPoint(playerid, 25.0,-1875.4793,915.8572,35.0090) && GetPlayerVehicleID(playerid) == Drivingschoolcar[playerid]) {
  1548.     DisablePlayerCheckpoint(playerid);
  1549.     SendClientMessage(playerid, COLOR_GREEN,"Now head back to the drivingschool");
  1550.     SetPlayerCheckpoint(playerid,-2035.6357,-95.1608,35.1640,5.0);
  1551.     }
  1552.  
  1553.     if (IsPlayerInRangeOfPoint(playerid, 25.0,-2035.6357,-95.1608,35.1640) && GetPlayerVehicleID(playerid) == Drivingschoolcar[playerid]) {
  1554.     if (DrivingSchoolLimit[playerid] > 120) {
  1555.     SendClientMessage(playerid, COLOR_ORED,"Failed: Too slow man, too slow!");
  1556.     DisablePlayerCheckpoint(playerid);
  1557.     DestroyVehicle(Drivingschoolcar[playerid]);
  1558.     DrivingSchoolLimit[playerid] = 0;
  1559.     KillTimer(DTimer[playerid]);
  1560.     DTimer[playerid] = 0;
  1561.     return 1;
  1562.     }
  1563.     new Float:vhp;
  1564.     GetVehicleHealth(GetPlayerVehicleID(playerid),vhp);
  1565.     if (vhp < 1000) {
  1566.     SendClientMessage(playerid, COLOR_ORED,"Failed: You damaged the vehicle!");
  1567.     DisablePlayerCheckpoint(playerid);
  1568.     DestroyVehicle(Drivingschoolcar[playerid]);
  1569.     DrivingSchoolLimit[playerid] = 0;
  1570.     KillTimer(DTimer[playerid]);
  1571.     DTimer[playerid] = 0;
  1572.     return 1;
  1573.     }
  1574.     DisablePlayerCheckpoint(playerid);
  1575.     SendClientMessage(playerid, COLOR_GREEN,"Test - Passed! Now collect your license from the depot!");
  1576.     DTestCompleted[playerid] = 1;
  1577.     DestroyVehicle(Drivingschoolcar[playerid]);
  1578.     KillTimer(DTimer[playerid]);
  1579.     DTimer[playerid] = 0;
  1580.     DrivingSchoolLimit[playerid] = 0;
  1581.     }
  1582.    
  1583.    
  1584.     return 1;
  1585. }
  1586.  
  1587.  
  1588. //------------------------------------------------------------------------------------------------------
  1589. public OnPlayerDisconnect(playerid)
  1590. {
  1591. new name[24];
  1592. new file[128];
  1593. TextDrawHideForPlayer(playerid,SFRPg);
  1594. new Float:x,Float:y,Float:z;
  1595. GetPlayerName(playerid, name,24);
  1596. format(file,sizeof(file),"%s.ini",name);
  1597. if (IsLogged[playerid]) {
  1598. dini_Create(file);
  1599. dini_IntSet(file,"Cash", GetPlayerMoney(playerid));
  1600. dini_IntSet(file,"Score", GetPlayerScore(playerid));
  1601. dini_IntSet(file,"Interior", GetPlayerInterior(playerid));
  1602. dini_IntSet(file,"Bank", pBank[playerid]);
  1603. dini_IntSet(file,"Org", Job[playerid]);
  1604. dini_IntSet(file,"Org_leader", OrgLeader[playerid]);
  1605. dini_IntSet(file,"Earned_Wage", PlayerWage[playerid]);
  1606. dini_IntSet(file,"Admin_level", AdminLevel[playerid]);
  1607. dini_IntSet(file,"Own_skin", PlayerOwnSkin[playerid]);
  1608. dini_IntSet(file,"Mobilephone", HaveMobilePhone[playerid]);
  1609. DestroyVehicle(Drivingschoolcar[playerid]);
  1610. dini_IntSet(file,"Musicplayer", HaveMusicPlayer[playerid]);
  1611. dini_IntSet(file,"Watch", HaveWatch[playerid]);
  1612. dini_IntSet(file,"AlcoholDrink", HaveAlcohol[playerid]);
  1613. dini_IntSet(file,"Have_fish", HaveFish[playerid]);
  1614. dini_IntSet(file,"Drink", HaveDrink[playerid]);
  1615. dini_IntSet(file,"Driving_license", HaveDrivingLic[playerid]);
  1616. dini_IntSet(file,"Fishing_license", FishingLicense[playerid]);
  1617. dini_IntSet(file,"Snack", HaveSnack[playerid]);
  1618. dini_IntSet(file,"Cigarette", HaveCigarette[playerid]);
  1619. dini_IntSet(file,"Inside_diner", PlayerDiner[playerid]);
  1620. dini_IntSet(file,"Inside_bank", PlayerBank[playerid]);
  1621. dini_IntSet(file,"Fighting_style", PFStyle[playerid]);
  1622. GetPlayerPos(playerid,x,y,z);
  1623. dini_IntSet(file,"X",floatround(x));
  1624. dini_IntSet(file,"Y",floatround(y));
  1625. dini_IntSet(file,"Z",floatround(z));
  1626. IsLogged[playerid] = 0;
  1627. TextDrawDestroy(location[playerid]);
  1628. }
  1629. }
  1630. //------------------------------------------------------------------------------------------------------
  1631.  
  1632. public OnPlayerCommandText(playerid, cmdtext[])
  1633. {
  1634.     new string[256];
  1635.     new playermoney;
  1636.     new sendername[MAX_PLAYER_NAME];
  1637.     new giveplayer[MAX_PLAYER_NAME];
  1638.     new cmd[256];
  1639.     new gMessage[256];
  1640.     new giveplayerid, moneys, idx;
  1641.     new file[128], tmp[256], tmp2[256];
  1642.  
  1643.     cmd = strtok(cmdtext, idx);
  1644.     if (IsInJail[playerid] == 1) {
  1645.     SendClientMessage(playerid, COLOR_ORED,"Error: You can't use commands in the jail!");
  1646.     return 1;
  1647.     }
  1648.     if (Muted[playerid] == 1) {
  1649.     SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to speak while muted!");
  1650.     return 1;
  1651.     }
  1652.  
  1653.     if(strcmp(cmd, "/help", true) == 0) {
  1654.         SendClientMessage(playerid, COLOR_GREEN,"Welcome to San Fierro RPg");
  1655.         SendClientMessage(playerid, COLOR_YELLOW,"This gamemode is coded by Jakku (C) 2010");
  1656.         SendClientMessage(playerid, COLOR_YELLOW,"Here are many great features, have fun with exploring them!");
  1657.         SendClientMessage(playerid, COLOR_YELLOW,"Some commands: /fish || /inventory || /ownskin || /orgcmds || /resign || /refuel");
  1658.         SendClientMessage(playerid, COLOR_YELLOW,"/deposit || /withdraw || /givecash || /admins || /wanted || /prophelp");
  1659.         SendClientMessage(playerid, COLOR_YELLOW,"You can buy new clothes at all clothes shops, some items at 24/7- Store & party in all bars around the city");
  1660.     return 1;
  1661.     }
  1662.         if(strcmp(cmd, "/bankhelp", true) == 0) {
  1663.         SendClientMessage(playerid, COLOR_GREEN,"~San Fierro Bank~");
  1664.         SendClientMessage(playerid, COLOR_YELLOW,"- Commands:");
  1665.         SendClientMessage(playerid, COLOR_YELLOW,"/withdraw || /deposit || /balance");
  1666.     return 1;
  1667.     }
  1668.         if(strcmp(cmd, "/ahelp", true) == 0) {
  1669.         if (AdminLevel[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not an admin!");
  1670.         SendClientMessage(playerid, COLOR_YELLOW,"/kick || /ban || /freeze || /unfreeze || /mute || /unmute || /createcash || /sfspawn");
  1671.         SendClientMessage(playerid, COLOR_YELLOW,"There are four admin levels, if nothing appears when you type a command, your admin level does not meet the required level");
  1672.     return 1;
  1673.     }
  1674.         if(strcmp(cmd, "/fish", true) == 0) {
  1675.         if (FishingLicense[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You need a fishing license to fish!");
  1676.         if (!IsPlayerInRangeOfPoint(playerid, 20.0,-1313.3784,1296.0788,1.5658)) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to fish here!");
  1677.         if (HaveFish[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to carry any more fish!");
  1678.         FishTimer[playerid] = SetTimerEx("Fishing", 12000, 1, "d", playerid);
  1679.         SendClientMessage(playerid, COLOR_YELLOW,"You threw your rod to the water. Now please wait");
  1680.     return 1;
  1681.     }
  1682.         if(strcmp(cmd, "/phonehelp", true) == 0) {
  1683.         if (HaveMobilePhone[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have a mobile phone");
  1684.         SendClientMessage(playerid, COLOR_YELLOW,"Phone help:");
  1685.         SendClientMessage(playerid, COLOR_YELLOW,"Thank you for buying this mobile phone. You can send text messages with this, use");
  1686.         SendClientMessage(playerid, COLOR_YELLOW,"/txt [playerid] [message]");
  1687.     return 1;
  1688.     }
  1689.             if(strcmp(cmd, "/mp", true) == 0) {
  1690.         if (HaveMusicPlayer[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have a music player");
  1691.         ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Music Player", "Track 1\nTrack 2\nTrack 3\nTrack 4\nStop", "Ok", "Cancel");
  1692.     return 1;
  1693.     }
  1694.                 if(strcmp(cmd, "/inventory", true) == 0) {
  1695.         ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Inventory", "Alcohol Drink\nNormal Drink\nFish\nCigarette\nSnack", "Use", "Cancel");
  1696.     return 1;
  1697.     }
  1698.         if(strcmp(cmd, "/leaderhelp", true) == 0) {
  1699.         if (OrgLeader[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not the leader of an organization!");
  1700.         SendClientMessage(playerid, COLOR_YELLOW,"Leader Help");
  1701.         SendClientMessage(playerid, COLOR_YELLOW,"Use /setmember to set an other player member of your organization");
  1702.         SendClientMessage(playerid, COLOR_YELLOW,"Use /kickmember to kick an other player from your organization");
  1703.        
  1704.     return 1;
  1705.     }
  1706.             if(strcmp(cmd, "/ownskin", true) == 0) {
  1707.         if (GetPlayerSkin(playerid) == PlayerOwnSkin[playerid]) return SendClientMessage(playerid, COLOR_ORED,"Error: You are already wearing your own skin!");
  1708.         SendClientMessage(playerid, COLOR_YELLOW,"You have worn your own skin");
  1709.         SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
  1710.     return 1;
  1711.     }
  1712.                 if(strcmp(cmd, "/orgskin", true) == 0) {
  1713.         if (Job[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not belong to an organization!");
  1714.         if (Job[playerid] == 1) {
  1715.         SetPlayerSkin(playerid, 281);
  1716.         SendClientMessage(playerid, COLOR_YELLOW,"You have worn your organization skin");
  1717.         }
  1718.         if (Job[playerid] == 2) {
  1719.         SetPlayerSkin(playerid, 277);
  1720.         SendClientMessage(playerid, COLOR_YELLOW,"You have worn your organization skin");
  1721.         }
  1722.         if (Job[playerid] == 3) {
  1723.         SetPlayerSkin(playerid, 117);
  1724.         SendClientMessage(playerid, COLOR_YELLOW,"You have worn your organization skin");
  1725.         }
  1726.     return 1;
  1727.     }
  1728.             if(strcmp(cmd, "/orgcmds", true) == 0) {
  1729.         if (Job[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a member of an organization!");
  1730.         SendClientMessage(playerid, COLOR_WHITE,"Your commands:");
  1731.         SendClientMessage(playerid, COLOR_YELLOW,"/resign || /orgskin");
  1732.         if (Job[playerid] == 1) {
  1733.         SendClientMessage(playerid, COLOR_YELLOW,"/pullover || /want || /takelic || /loc");
  1734.         }
  1735.     return 1;
  1736.     }
  1737.             if(strcmp(cmd, "/resign", true) == 0) {
  1738.         if (Job[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a member of an organization!");
  1739.         SendClientMessage(playerid, COLOR_YELLOW,"You have successfully resigned from your organization");
  1740.         SendClientMessage(playerid, COLOR_ORED,"Note! If you did this accidentally, please contact your leader");
  1741.         Job[playerid] = 0;
  1742.         OrgLeader[playerid] = 0;
  1743.         ResetPlayerWeapons(playerid);
  1744.         RemovePlayerFromVehicle(playerid);
  1745.         SetPlayerSkin(playerid, 0);
  1746.     return 1;
  1747.     }
  1748.                 if(strcmp(cmd, "/pullover", true) == 0) {
  1749.         if (Job[playerid] != 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a law enforcer!");
  1750.         SendClientMessageToAll(COLOR_BLUE,"Police: Pull over immediately!");
  1751.     return 1;
  1752.     }
  1753.                     if(strcmp(cmd, "/loc", true) == 0) {
  1754.         new ID = strval(cmdtext[4]);
  1755.                                 if(!strlen(cmdtext[4]))
  1756.     {
  1757.         SendClientMessage(playerid, COLOR_ORED, "Usage: /loc [playerid]");
  1758.         return 1;
  1759.     }
  1760.         if (Job[playerid] != 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a law enforcer!");
  1761.         new receivername[24];
  1762.         new zone[28];
  1763.         if (IsPlayerConnected(ID)) {
  1764.         GetPlayerZone(ID,zone,MAX_ZONE_NAME);
  1765.         GetPlayerName(ID, receivername,24);
  1766.         if (Job[ID] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You cannot locate a law enforcer!");
  1767.         if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED,"Error: You cannot locate yourself!");
  1768.         format(string, sizeof(string), "%s was last seen at %s", receivername,zone);
  1769.         }
  1770.     return 1;
  1771.     }
  1772.  
  1773.    
  1774.         if(strcmp(cmd, "/setmember", true) == 0) {
  1775.         new ID = strval(cmdtext[10]);
  1776.         new kickername[24];
  1777.         new receivername[24];
  1778.         GetPlayerName(playerid, kickername,24);
  1779.         GetPlayerName(ID, receivername,24);
  1780.         if (IsPlayerConnected(ID)) {
  1781.             if(!strlen(cmdtext[10]))
  1782.     {
  1783.         SendClientMessage(playerid, COLOR_ORED, "Usage: /setmember [playerid]");
  1784.         return 1;
  1785.     }
  1786.     if (OrgLeader[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not the leader of an organization!");
  1787.     if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED, "Error: You can't hire yourself!");
  1788.    
  1789.     if (Job[playerid] == 1 && Job[ID] == 0) {
  1790.     format(string, sizeof(string), "You have set %s member of San Fierro Police Department", receivername);
  1791.     SendClientMessage(playerid, COLOR_GREEN, string);
  1792.     format(string, sizeof(string), "%s has set you as a member of San Fierro Police Department", kickername);
  1793.     SendClientMessage(ID, COLOR_YELLOW, string);
  1794.     Job[ID] = 1;
  1795.     ResetPlayerWeapons(ID);
  1796.     SetPlayerSkin(ID,281);
  1797.     GivePlayerWeapon(ID,3,-1);
  1798.     GivePlayerWeapon(ID,24,190);
  1799.     }
  1800.     if (Job[playerid] == 2 && Job[ID] == 0) {
  1801.     format(string, sizeof(string), "You have set %s member of San Fierro Fire Department", receivername);
  1802.     SendClientMessage(playerid, COLOR_GREEN, string);
  1803.     format(string, sizeof(string), "%s has set you as a member of San Fierro Fire Department", kickername);
  1804.     SendClientMessage(ID, COLOR_YELLOW, string);
  1805.     Job[ID] = 2;
  1806.     ResetPlayerWeapons(ID);
  1807.     SetPlayerSkin(ID,277);
  1808.     GivePlayerWeapon(ID,17,2);
  1809.     GivePlayerWeapon(ID,42,400);
  1810.     }
  1811.     if (Job[playerid] == 3 && Job[ID] == 0) {
  1812.     format(string, sizeof(string), "You have set %s member of The Triads", receivername);
  1813.     SendClientMessage(playerid, COLOR_GREEN, string);
  1814.     format(string, sizeof(string), "%s has set you as a member of The Triads", kickername);
  1815.     SendClientMessage(ID, COLOR_YELLOW, string);
  1816.     Job[ID] = 3;
  1817.     ResetPlayerWeapons(ID);
  1818.     SetPlayerSkin(ID,117);
  1819.     GivePlayerWeapon(ID,23,100);
  1820.     GivePlayerWeapon(ID,27,400);
  1821.     }
  1822.     }
  1823.     return 1;
  1824.     }
  1825.             if(strcmp(cmd, "/want", true) == 0) {
  1826.         new ID = strval(cmdtext[5]);
  1827.         new kickername[24];
  1828.         new receivername[24];
  1829.         GetPlayerName(playerid, kickername,24);
  1830.         GetPlayerName(ID, receivername,24);
  1831.                     if(!strlen(cmdtext[5]))
  1832.     {
  1833.         SendClientMessage(playerid, COLOR_ORED, "Usage: /want [playerid]");
  1834.         return 1;
  1835.     }
  1836.  
  1837.         if (IsPlayerConnected(ID)) {
  1838.     if (Job[playerid] != 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a law enforcer!");
  1839.     if (Job[ID] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You cannot want a law enforcer!");
  1840.     if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED, "Error: You can't want yourself!");
  1841.     if (Wanted[ID] == 1) {
  1842.     format(string, sizeof(string), "You have unwanted %s", receivername);
  1843.     SendClientMessage(playerid, COLOR_YELLOW, string);
  1844.     format(string, sizeof(string), "%s has unwanted you", kickername);
  1845.     SendClientMessage(ID, COLOR_BLUE, string);
  1846.     Wanted[ID] = 0;
  1847.     return 1;
  1848.     }
  1849.     Wanted[ID] = 1;
  1850.     format(string, sizeof(string), "You have wanted %s", receivername);
  1851.     SendClientMessage(playerid, COLOR_YELLOW, string);
  1852.     format(string, sizeof(string), "%s has wanted you", kickername);
  1853.     SendClientMessage(ID, COLOR_BLUE, string);
  1854.     }
  1855.     return 1;
  1856.     }
  1857.                         if(!strcmp(cmdtext, "/takelic", true, 8))
  1858. {
  1859.     if(!strlen(cmdtext[9]))
  1860.     {
  1861.         SendClientMessage(playerid, COLOR_ORED, "Usage: /takelic [playerid]");
  1862.         return 1;
  1863.     }
  1864.     new ID = strval(cmdtext[9]);
  1865.     new pName[24], str[64];
  1866.     new Float:X,Float:Y,Float:Z;
  1867.     if(IsPlayerConnected(ID))
  1868.     {
  1869.         GetPlayerPos(ID,X,Y,Z);
  1870.         if(!IsPlayerInRangeOfPoint(playerid,10.0,X,Y,Z)) return SendClientMessage(playerid, COLOR_ORED, "Error: You must be near the player you are distraining the license from!");
  1871.         GetPlayerName(ID, pName, 24);
  1872.         if(Job[ID] == 1) return SendClientMessage(playerid, COLOR_ORED, "You cannot take a license of an other law enforcer!");
  1873.         format(string, sizeof(string), "You have distrained the driving license of %s", pName);
  1874.         SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  1875.         format(str, 64, "~ Your Driving License has been distrained!");
  1876.         SendClientMessage(ID,COLOR_ORANGE, str);
  1877.         HaveDrivingLic[ID] = 0;
  1878.     }
  1879.     return 1;
  1880.  
  1881.     }
  1882.  
  1883.        if(strcmp(cmdtext, "/refuel", true) == 0)
  1884.     {
  1885.         if(IsPlayerConnected(playerid)){
  1886.         new getthecar = GetPlayerVehicleID(playerid);
  1887.         new m = GetVehicleModel(GetPlayerVehicleID(playerid));
  1888.             if(IsPlayerInFuelStation(playerid)){
  1889.                 if(Refueling[playerid] == 0){
  1890.                     if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetVehicleModel(getthecar) == 481 || GetVehicleModel(getthecar) == 509 || GetVehicleModel(getthecar) == 510) return SendClientMessage(playerid,COLOR_YELLOW,"Error: You are not in a vehicle or this vehicle does not need fuel");
  1891.                     if(Fuel[getthecar] >= 100){
  1892.                         SendClientMessage(playerid,COLOR_YELLOW,"Your gas tank is already full.");
  1893.                     } else {
  1894.  
  1895.                         if (IsPlayerInRangeOfPoint(playerid,10.0,1338.4438,1398.4487,10.8203) && m != 592 && m != 577 && m != 511 && m != 512 && m != 593 && m != 520  && m != 553 && m != 476 && m != 519  && m != 460  && m != 513 && m != 425  && m != 417  && m != 487  && m != 488  && m != 497  && m != 563 && m != 447  && m != 469) {
  1896.                         SendClientMessage(playerid,COLOR_ORED,"Error: You can only refuel aircraft here!");
  1897.                         return 1;
  1898.                         }
  1899.                         OldFuel[playerid] = floatround(Fuel[getthecar]);
  1900.                         ReFuelTimer[playerid] = SetTimerEx("ReFill", 1000, 1, "d", playerid);
  1901.                         SendClientMessage(playerid,COLOR_YELLOW,"Re-fueling your vehicle..");
  1902.                         Refueling[playerid] = 1;
  1903.                     }
  1904.                     } else { SendClientMessage(playerid,COLOR_YELLOW,"You are already refueling your car."); }
  1905.             } else { SendClientMessage(playerid,COLOR_YELLOW,"You must be at a gas station to refuel"); }
  1906.         }
  1907.         return true;
  1908.     }
  1909.    
  1910.    
  1911.         if(strcmp(cmd, "/kickmember", true) == 0) {
  1912.             new ID = strval(cmdtext[11]);
  1913.         new kickername[24];
  1914.         new receivername[24];
  1915.         GetPlayerName(playerid, kickername,24);
  1916.         GetPlayerName(ID, receivername,24);
  1917.         if (IsPlayerConnected(ID)) {
  1918.             if(!strlen(cmdtext[11]))
  1919.     {
  1920.         SendClientMessage(playerid, COLOR_ORED, "Usage: /kickmember [playerid]");
  1921.         return 1;
  1922.     }
  1923.     if (OrgLeader[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not the leader of an organization!");
  1924.     if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED, "Error: You can't kick yourself!");
  1925.  
  1926.     if (Job[playerid] == 1 && Job[ID] == 1) {
  1927.     format(string, sizeof(string), "You have kicked %s from San Fierro Police Department", receivername);
  1928.     SendClientMessage(playerid, COLOR_GREEN, string);
  1929.     format(string, sizeof(string), "%s has kicked you from San Fierro Police Department", kickername);
  1930.     SendClientMessage(ID, COLOR_YELLOW, string);
  1931.     Job[ID] = 0;
  1932.     ResetPlayerWeapons(ID);
  1933.     SetPlayerSkin(ID,0);
  1934.     }
  1935.     if (Job[playerid] == 2 && Job[ID] == 2) {
  1936.     format(string, sizeof(string), "You have kicked %s from San Fierro Fire Department", receivername);
  1937.     SendClientMessage(playerid, COLOR_GREEN, string);
  1938.     format(string, sizeof(string), "%s has kicked you from San Fierro Fire Department", kickername);
  1939.     SendClientMessage(ID, COLOR_YELLOW, string);
  1940.     Job[ID] = 0;
  1941.     ResetPlayerWeapons(ID);
  1942.     SetPlayerSkin(ID,0);
  1943.     }
  1944.     if (Job[playerid] == 3 && Job[ID] == 3) {
  1945.     format(string, sizeof(string), "You have kicked %s from The Triads", receivername);
  1946.     SendClientMessage(playerid, COLOR_GREEN, string);
  1947.     format(string, sizeof(string), "%s has kicked you from The Triads", kickername);
  1948.     SendClientMessage(ID, COLOR_YELLOW, string);
  1949.     Job[ID] = 0;
  1950.     ResetPlayerWeapons(ID);
  1951.     SetPlayerSkin(ID,0);
  1952.     }
  1953.     }
  1954.     return 1;
  1955.     }
  1956.    
  1957.    
  1958.    
  1959.         if(strcmp(cmd, "/deposit", true) == 0) {
  1960.             if(!IsPlayerInRangeOfPoint(playerid, 7.0,4712.6201,-5846.4584,3382.0129)) {
  1961.             SendClientMessage(playerid, COLOR_ORED, "Error: You must be at a bank to use this command!");
  1962.             return 1;
  1963.         }
  1964.         tmp = strtok(cmdtext, idx);
  1965.         if(!strlen(tmp)) {
  1966.             SendClientMessage(playerid, COLOR_WHITE, "Usage: /deposit [amount]");
  1967.             return 1;
  1968.         }
  1969.         moneys = strval(tmp);
  1970.         if (moneys > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"You don't have that amount of money!");
  1971.         pBank[playerid] +=moneys;
  1972.         GivePlayerMoney(playerid, -moneys);
  1973.         format(string, sizeof(string), "You have deposited $%d, you currently have $%d in your bank account", moneys,pBank[playerid]);
  1974.         SendClientMessage(playerid, COLOR_YELLOW, string);
  1975.     return 1;
  1976.     }
  1977.             if(strcmp(cmd, "/balance", true) == 0) {
  1978.             if(!IsPlayerInRangeOfPoint(playerid, 7.0,4712.6201,-5846.4584,3382.0129)) {
  1979.             SendClientMessage(playerid, COLOR_ORED, "Error: You must be at a bank to use this command!");
  1980.             return 1;
  1981.         }
  1982.         format(string, sizeof(string), "You have $%d in your bank account", pBank[playerid]);
  1983.         SendClientMessage(playerid, COLOR_YELLOW, string);
  1984.     return 1;
  1985.     }
  1986.             if(strcmp(cmd, "/withdraw", true) == 0) {
  1987.             if(!IsPlayerInRangeOfPoint(playerid, 7.0,4712.6201,-5846.4584,3382.0129)) {
  1988.             SendClientMessage(playerid, COLOR_ORED, "Error: You must be at a bank to use this command!");
  1989.             return 1;
  1990.         }
  1991.         tmp = strtok(cmdtext, idx);
  1992.         if(!strlen(tmp)) {
  1993.             SendClientMessage(playerid, COLOR_WHITE, "Usage: /withdraw [amount]");
  1994.             return 1;
  1995.         }
  1996.         moneys = strval(tmp);
  1997.         if (moneys > pBank[playerid]) return SendClientMessage(playerid, COLOR_ORED,"You don't have that amount of money in your bank account!");
  1998.         pBank[playerid] -=moneys;
  1999.         GivePlayerMoney(playerid, moneys);
  2000.         format(string, sizeof(string), "You have withdrawn $%d, you currently have $%d in your bank account", moneys,pBank[playerid]);
  2001.         SendClientMessage(playerid, COLOR_YELLOW, string);
  2002.     return 1;
  2003.     }
  2004.  
  2005.    
  2006.     if(strcmp(cmd, "/givecash", true) == 0) {
  2007.         tmp = strtok(cmdtext, idx);
  2008.  
  2009.         if(!strlen(tmp)) {
  2010.             SendClientMessage(playerid, COLOR_WHITE, "Usage:: /givecash [playerid] [amount]");
  2011.             return 1;
  2012.         }
  2013.         giveplayerid = strval(tmp);
  2014.        
  2015.         tmp = strtok(cmdtext, idx);
  2016.         if(!strlen(tmp)) {
  2017.             SendClientMessage(playerid, COLOR_WHITE, "Usage: /givecash [playerid] [amount]");
  2018.             return 1;
  2019.         }
  2020.         moneys = strval(tmp);
  2021.        
  2022.  
  2023.        
  2024.         if (IsPlayerConnected(giveplayerid)) {
  2025.             GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  2026.             GetPlayerName(playerid, sendername, sizeof(sendername));
  2027.             playermoney = GetPlayerMoney(playerid);
  2028.             if (moneys > 0 && playermoney >= moneys) {
  2029.                 if (giveplayerid == playerid) return SendClientMessage(playerid, COLOR_ORED,"You can't send money to yourself!");
  2030.                 GivePlayerMoney(playerid, (0 - moneys));
  2031.                 GivePlayerMoney(giveplayerid, moneys);
  2032.                 format(string, sizeof(string), "You have sent %s $%d.", giveplayer, moneys);
  2033.                 SendClientMessage(playerid, COLOR_YELLOW, string);
  2034.                 format(string, sizeof(string), "You have received $%d from %s", moneys, sendername);
  2035.                 SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  2036.             }
  2037.             else {
  2038.                 SendClientMessage(playerid, COLOR_YELLOW, "Invalid amount");
  2039.             }
  2040.         }
  2041.         else {
  2042.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  2043.                 SendClientMessage(playerid, COLOR_YELLOW, string);
  2044.             }
  2045.         return 1;
  2046.     }
  2047.    
  2048.     if(strcmp(cmd, "/register", true) == 0)
  2049.     {
  2050.         if (Spawned[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED, "Error: You must spawn to register!");
  2051.         new name[MAX_PLAYER_NAME];
  2052.         tmp = strtok(cmdtext, idx);
  2053.         GetPlayerName(playerid, name, sizeof(name));
  2054.         if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /register [password]");
  2055.         format(file,sizeof(file),"%s.ini",name);
  2056.             if (fexist(file))
  2057.             {
  2058.                 SendClientMessage(playerid, COLOR_ORED, "This account is already registered!");
  2059.                 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  2060.                 return 1;
  2061.             }
  2062.         if(!fexist(file))
  2063.             {
  2064.                 dini_Create(file);
  2065.                 dini_IntSet(file,"Cash", GetPlayerMoney(playerid));
  2066.                 dini_IntSet(file, "Password", udb_hash(tmp));
  2067.                 SendClientMessage(playerid, COLOR_YELLOW, "Account successfully created. /login now");
  2068.                 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  2069.                 GetPlayerName(playerid, name, sizeof(name));
  2070.                 printf("Account registered");
  2071.             }
  2072.  
  2073.         return 1;
  2074.     }
  2075.  
  2076.              if(strcmp(cmd, "/admins", true) == 0) {
  2077.              new adminname[24];
  2078.              new admins = 0;
  2079.              SendClientMessage(playerid, COLOR_YELLOW,"Currently online admins:");
  2080.                      for(new i = 0; i < MAX_PLAYERS; i++)
  2081.                      if (IsPlayerConnected(i)) {
  2082.         {
  2083.              if(AdminLevel[i] == 1)
  2084. {
  2085.             GetPlayerName(i, adminname, 24);
  2086.             format(string,sizeof string,"%s - Level 1 (Mod)", adminname);
  2087.             SendClientMessage(playerid,COLOR_WHITE,string);
  2088.             admins++;
  2089. }
  2090.              if(AdminLevel[i] == 2)
  2091. {
  2092.             GetPlayerName(i, adminname, 24);
  2093.             format(string,sizeof string,"%s - Level 2 (Mod+)", adminname);
  2094.             SendClientMessage(playerid,COLOR_WHITE,string);
  2095.             admins++;
  2096. }
  2097.              if(AdminLevel[i] == 3)
  2098. {
  2099.             GetPlayerName(i, adminname, 24);
  2100.             format(string,sizeof string,"%s - Level 3 (Admin)", adminname);
  2101.             SendClientMessage(playerid,COLOR_WHITE,string);
  2102.             admins++;
  2103. }
  2104.              if(AdminLevel[i] == 4)
  2105. {
  2106.             GetPlayerName(i, adminname, 24);
  2107.             format(string,sizeof string,"%s - Level 4 (Server Owner)", adminname);
  2108.             SendClientMessage(playerid,COLOR_YELLOW,string);
  2109.             admins++;
  2110. }
  2111.  
  2112. }
  2113.  
  2114.         }
  2115.         if (admins == 0) SendClientMessage(playerid, COLOR_WHITE, "There are currently no admins online");
  2116.         return 1;
  2117.     }
  2118.                  if(strcmp(cmd, "/wanted", true) == 0) {
  2119.              new wantedname[24];
  2120.              new wanted = 0;
  2121.              SendClientMessage(playerid, COLOR_YELLOW,"Currently wanted players:");
  2122.                      for(new i = 0; i < MAX_PLAYERS; i++)
  2123.                      if (IsPlayerConnected(i)) {
  2124.         {
  2125.              if(Wanted[i] == 1)
  2126. {
  2127.             GetPlayerName(i, wantedname, 24);
  2128.             format(string,sizeof string,"%s", wantedname);
  2129.             SendClientMessage(playerid,COLOR_WHITE,string);
  2130.             wanted++;
  2131. }
  2132.  
  2133.  
  2134. }
  2135.  
  2136.         }
  2137.         if (wanted == 0) SendClientMessage(playerid, COLOR_WHITE, "There are currently no wanted players");
  2138.         return 1;
  2139.     }
  2140.     if(strcmp(cmd, "/login", true) == 0)
  2141.     {
  2142.         if (Spawned[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED, "Error: You must spawn to login!");
  2143.         new PlayerName[24];
  2144.         tmp = strtok(cmdtext, idx);
  2145.         if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /login [password]");
  2146.         new name[MAX_PLAYER_NAME];
  2147.         if(IsLogged[playerid] == 1)
  2148.         {
  2149.             SendClientMessage(playerid, COLOR_ORED, "You already are logged in!");
  2150.             return 1;
  2151.         }
  2152.         else
  2153.         {
  2154.             GetPlayerName(playerid, name, sizeof(name));
  2155.             format(file,sizeof(file),"%s.ini",name);
  2156.             if(fexist(file))
  2157.             {
  2158.                 tmp2 = dini_Get(file, "Password");
  2159.                 if(udb_hash(tmp) != strval(tmp2))
  2160.                 {
  2161.                     SendClientMessage(playerid, COLOR_ORED, "Login failed");
  2162.                     GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  2163.                     printf("%s failed on login", name);
  2164.                 }
  2165.                 if (udb_hash(tmp) == strval(tmp2))
  2166.                 {
  2167.  
  2168.                     IsLogged[playerid] = 1;
  2169.                     SetPlayerMoney(playerid, dini_Int(file, "Cash"));
  2170.                     SetPlayerScore(playerid, dini_Int(file, "Score"));
  2171.                     SetPlayerInterior(playerid, dini_Int(file, "Interior"));
  2172.                     pBank[playerid] = dini_Int(file, "Bank");
  2173.                     Job[playerid] = dini_Int(file, "Org");
  2174.                     OrgLeader[playerid] = dini_Int(file, "Org_leader");
  2175.                     PlayerWage[playerid] = dini_Int(file, "Earned_Wage");
  2176.                     AdminLevel[playerid] = dini_Int(file, "Admin_level");
  2177.                     HaveWatch[playerid] = dini_Int(file, "Watch");
  2178.                     HaveFish[playerid] = dini_Int(file, "Have_fish");
  2179.                     HaveAlcohol[playerid] = dini_Int(file, "AlcoholDrink");
  2180.                     HaveDrink[playerid] = dini_Int(file, "Drink");
  2181.                     HaveMobilePhone[playerid] = dini_Int(file, "Mobilephone");
  2182.                     HaveMusicPlayer[playerid] = dini_Int(file, "Musicplayer");
  2183.                     HaveDrivingLic[playerid] = dini_Int(file, "Driving_license");
  2184.                     FishingLicense[playerid] = dini_Int(file, "Fishing_license");
  2185.                     HaveSnack[playerid] = dini_Int(file, "Snack");
  2186.                     HaveCigarette[playerid] = dini_Int(file, "Cigarette");
  2187.                     PlayerDiner[playerid] = dini_Int(file, "Inside_diner");
  2188.                     PlayerBank[playerid] = dini_Int(file, "Inside_bank");
  2189.                     PFStyle[playerid] = dini_Int(file, "Fighting_style");
  2190.                     if (HaveWatch[playerid] == 1) {
  2191.                     TogglePlayerClock(playerid, 1);
  2192.                     }
  2193.                     LoginPosX[playerid] = dini_Int(file, "X");
  2194.                     LoginPosY[playerid] = dini_Int(file, "Y");
  2195.                     LoginPosZ[playerid] = dini_Int(file, "Z");
  2196.                     SetPlayerPos(playerid, LoginPosX[playerid],LoginPosY[playerid],LoginPosZ[playerid]);
  2197.                     if (Firstvisit[playerid] == 1) {
  2198.                     SetPlayerPos(playerid, -1976.6405,458.3334,35.1718);
  2199.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2200.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2201.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2202.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2203.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2204.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2205.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2206.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2207.                     SendClientMessage(playerid, COLOR_YELLOW, " ");
  2208.                     SendClientMessage(playerid, COLOR_YELLOW, "Hello! We have noticed this is your first time on this server, we wish you welcome!");
  2209.                     SendClientMessage(playerid, COLOR_WHITE, "Now, start exploring the features, we hope you enjoy your stay! We've given you $50000 to get started :)");
  2210.                     SendClientMessage(playerid, COLOR_GREEN, "Regards, San Fierro RPg Management");
  2211.                     GivePlayerMoney(playerid, 50000);
  2212.                     }
  2213.                        
  2214.                     if (PFStyle[playerid] == 1) {
  2215.                     SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
  2216.                     }
  2217.                     if (PFStyle[playerid] == 2) {
  2218.                     SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
  2219.                     }
  2220.                     if (PFStyle[playerid] == 3) {
  2221.                     SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
  2222.                     }
  2223.                     SendClientMessage(playerid, COLOR_YELLOW, "Login successful, data restored");
  2224.                     TogglePlayerControllable(playerid, 1);
  2225.                     printf("SERVER: %s has logged in", name);
  2226.                     SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
  2227.                     location[playerid] = TextDrawCreate(5.0, 433.0, "-");
  2228.                     TextDrawSetOutline(location[playerid],1);
  2229.                     TextDrawSetProportional(location[playerid],1);
  2230.                     TextDrawSetShadow(location[playerid],1);
  2231.                     TextDrawShowForPlayer(playerid,location[playerid]);
  2232.                    
  2233.                    
  2234.                     // JOB STUFF
  2235.                     if (Job[playerid] == 0) SendClientMessage(playerid, COLOR_ORED, "Organization: None");
  2236.                     if (Job[playerid] == 1) {
  2237.                     SendClientMessage(playerid, COLOR_WHITE, "Organization: San Fierro Police Department");
  2238.                     GivePlayerWeapon(playerid,3,-1);
  2239.                     GivePlayerWeapon(playerid,24,190);
  2240.                     //
  2241.                     }
  2242.                     if (Job[playerid] == 2) {
  2243.                     SendClientMessage(playerid, COLOR_WHITE, "Organization: San Fierro Fire Department");
  2244.                     GivePlayerWeapon(playerid,17,2);
  2245.                     GivePlayerWeapon(playerid,42,400);
  2246.                     }
  2247.                     if (Job[playerid] == 3) {
  2248.                     SetPlayerSkin(playerid,117);
  2249.                     GivePlayerWeapon(playerid,23,100);
  2250.                     GivePlayerWeapon(playerid,27,400);
  2251.                     SendClientMessage(playerid, COLOR_WHITE, "Organization: The Triads");
  2252.                     }
  2253.                 }
  2254.             }
  2255.         }
  2256.         return 1;
  2257.     }
  2258.  //ADMIN CMDS
  2259.  if (AdminLevel[playerid] == 1 || AdminLevel[playerid] == 2 || AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4) {
  2260.          if(!strcmp(cmdtext, "/kick", true, 5))
  2261. {
  2262.     if(!strlen(cmdtext[6]))
  2263.     {
  2264.         SendClientMessage(playerid, COLOR_ORED, "Usage: /kick [playerid] [reason]");
  2265.         return 1;
  2266.     }
  2267.     new ID = strval(cmdtext[6]);
  2268.     new pName[24], kickername[24], stri[64], strv[256];
  2269.     tmp = strtok(cmdtext,idx);
  2270.     gMessage = strrest(cmdtext,idx);
  2271.     if(IsPlayerConnected(ID))
  2272.     {
  2273.         GetPlayerName(ID, pName, 24);
  2274.         GetPlayerName(playerid, kickername, 24);
  2275.             if(IsPlayerNPC(ID))
  2276. {
  2277.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot kick a NPC");
  2278.      return 1;
  2279. }
  2280.     if(ID == playerid)
  2281. {
  2282.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot kick yourself!");
  2283.      return 1;
  2284. }
  2285.         format(strv, 64, "~ You have been kicked from the server for ^%s^", gMessage);
  2286.         SendClientMessage(ID,COLOR_ORANGE, strv);
  2287.         Kick(ID);
  2288.         format(stri, 64, "**%s has been kicked from the server for ^%s^", pName,gMessage);
  2289.         SendClientMessageToAll(COLOR_ORED, stri);
  2290.         printf("Admin Command: %s has kicked %s for ^%s^", kickername, pName,gMessage);
  2291.     }
  2292.     return 1;
  2293.  
  2294.     }
  2295.              else if(!strcmp(cmdtext, "/mute", true, 5))
  2296. {
  2297.     if(!strlen(cmdtext[6]))
  2298.     {
  2299.         SendClientMessage(playerid, COLOR_ORED, "Usage: /mute [playerid]");
  2300.         return 1;
  2301.     }
  2302.     new ID = strval(cmdtext[6]);
  2303.     new pName[24], muteername[24], stri[64], strv[256];
  2304.     tmp = strtok(cmdtext,idx);
  2305.     gMessage = strrest(cmdtext,idx);
  2306.     if(IsPlayerConnected(ID))
  2307.     {
  2308.         GetPlayerName(ID, pName, 24);
  2309.         GetPlayerName(playerid, muteername, 24);
  2310.             if(IsPlayerNPC(ID))
  2311. {
  2312.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot mute a NPC");
  2313.      return 1;
  2314. }
  2315.     if(ID == playerid)
  2316. {
  2317.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot mute yourself!");
  2318.      return 1;
  2319. }
  2320.         format(strv, 64, "~ You have been muted");
  2321.         SendClientMessage(ID,COLOR_ORANGE, strv);
  2322.         Muted[ID] = 1;
  2323.         format(stri, 64, "**%s has been muted", pName);
  2324.         SendClientMessageToAll(COLOR_ORED, stri);
  2325.         printf("Admin Command: %s has muted %s", muteername, pName);
  2326.     }
  2327.     return 1;
  2328.  
  2329.     }
  2330.                  else if(!strcmp(cmdtext, "/unmute", true, 7))
  2331. {
  2332.     if(!strlen(cmdtext[8]))
  2333.     {
  2334.         SendClientMessage(playerid, COLOR_ORED, "Usage: /unmute [playerid]");
  2335.         return 1;
  2336.     }
  2337.     new ID = strval(cmdtext[8]);
  2338.     new pName[24], unmuteername[24], stri[64], strv[256];
  2339.     tmp = strtok(cmdtext,idx);
  2340.     gMessage = strrest(cmdtext,idx);
  2341.     if(IsPlayerConnected(ID))
  2342.     {
  2343.         GetPlayerName(ID, pName, 24);
  2344.         GetPlayerName(playerid, unmuteername, 24);
  2345.             if(IsPlayerNPC(ID))
  2346. {
  2347.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unmute a NPC");
  2348.      return 1;
  2349. }
  2350.     if(ID == playerid)
  2351. {
  2352.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unmute yourself!");
  2353.      return 1;
  2354. }
  2355.         format(strv, 64, "~ You have been unmuted");
  2356.         SendClientMessage(ID,COLOR_ORANGE, strv);
  2357.         Muted[ID] = 0;
  2358.         format(stri, 64, "**%s has been unmuted", pName);
  2359.         SendClientMessageToAll(COLOR_ORED, stri);
  2360.         printf("Admin Command: %s has unmuted %s", unmuteername, pName);
  2361.     }
  2362.     return 1;
  2363.  
  2364.     }
  2365.    
  2366.               else if(!strcmp(cmdtext, "/ban", true, 4))
  2367. {
  2368.     if(!strlen(cmdtext[5]))
  2369.     {
  2370.         SendClientMessage(playerid, COLOR_ORED, "Usage: /ban [playerid] [reason]");
  2371.         return 1;
  2372.     }
  2373.     new ID = strval(cmdtext[5]);
  2374.     new pName[24], banername[24], stri[64], strv[256];
  2375.     tmp = strtok(cmdtext,idx);
  2376.     gMessage = strrest(cmdtext,idx);
  2377.     if(IsPlayerConnected(ID))
  2378.     {
  2379.         GetPlayerName(ID, pName, 24);
  2380.         GetPlayerName(playerid, banername, 24);
  2381.             if(IsPlayerNPC(ID))
  2382. {
  2383.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot ban a NPC");
  2384.      return 1;
  2385. }
  2386.     if(ID == playerid)
  2387. {
  2388.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot ban yourself!");
  2389.      return 1;
  2390. }
  2391.         format(strv, 64, "~ You have been banned from the server for ^%s^", gMessage);
  2392.         SendClientMessage(ID,COLOR_ORANGE, strv);
  2393.         Ban(ID);
  2394.         format(stri, 64, "**%s has been banned from the server for ^%s^", pName,gMessage);
  2395.         SendClientMessageToAll(COLOR_ORED, stri);
  2396.         printf("Admin Command: %s has banned %s for ^%s^", banername, pName,gMessage);
  2397.     }
  2398.     return 1;
  2399.  
  2400.     }
  2401.  }
  2402.  
  2403.  if (AdminLevel[playerid] == 2 || AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4) {
  2404.  
  2405.               if(!strcmp(cmdtext, "/freeze", true, 7))
  2406. {
  2407.     if(!strlen(cmdtext[8]))
  2408.     {
  2409.         SendClientMessage(playerid, COLOR_ORED, "Usage: /freeze [playerid]");
  2410.         return 1;
  2411.     }
  2412.     new ID = strval(cmdtext[8]);
  2413.     new pName[24], freezeername[24], strv[256];
  2414.     tmp = strtok(cmdtext,idx);
  2415.     gMessage = strrest(cmdtext,idx);
  2416.     if(IsPlayerConnected(ID))
  2417.     {
  2418.         GetPlayerName(ID, pName, 24);
  2419.         GetPlayerName(playerid, freezeername, 24);
  2420.             if(IsPlayerNPC(ID))
  2421. {
  2422.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot freeze a NPC");
  2423.      return 1;
  2424. }
  2425.     if(ID == playerid)
  2426. {
  2427.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot freeze yourself!");
  2428.      return 1;
  2429. }
  2430.         format(strv, 64, "~ You have been frozen by an admin");
  2431.         SendClientMessage(ID,COLOR_ORANGE, strv);
  2432.         TogglePlayerControllable(ID,0);
  2433.         printf("Admin Command: %s has freezed %s", freezeername, pName);
  2434.     }
  2435.     return 1;
  2436.  
  2437.     }
  2438.                  else if(!strcmp(cmdtext, "/unfreeze", true, 9))
  2439. {
  2440.     if(!strlen(cmdtext[10]))
  2441.     {
  2442.         SendClientMessage(playerid, COLOR_ORED, "Usage: /unfreeze [playerid]");
  2443.         return 1;
  2444.     }
  2445.     new ID = strval(cmdtext[10]);
  2446.     new pName[24], unfreezeername[24], strv[256];
  2447.     tmp = strtok(cmdtext,idx);
  2448.     gMessage = strrest(cmdtext,idx);
  2449.     if(IsPlayerConnected(ID))
  2450.     {
  2451.         GetPlayerName(ID, pName, 24);
  2452.         GetPlayerName(playerid, unfreezeername, 24);
  2453.             if(IsPlayerNPC(ID))
  2454. {
  2455.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unfreeze a NPC");
  2456.      return 1;
  2457. }
  2458.     if(ID == playerid)
  2459. {
  2460.      SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unfreeze yourself!");
  2461.      return 1;
  2462. }
  2463.         format(strv, 64, "~ You have been unfrozen by an admin");
  2464.         SendClientMessage(ID,COLOR_ORANGE, strv);
  2465.         TogglePlayerControllable(ID,1);
  2466.         printf("Admin Command: %s has unfreezed %s", unfreezeername, pName);
  2467.     }
  2468.     return 1;
  2469.  
  2470.     }
  2471.         if(strcmp(cmd, "/sfspawn", true) == 0) {
  2472.         SetPlayerPos(playerid,-1976.6405,458.3334,35.1718);
  2473.     return 1;
  2474.     }
  2475.  
  2476.  }
  2477.  if (AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4) {
  2478.     if(strcmp(cmd, "/createcash", true) == 0) {
  2479.         tmp = strtok(cmdtext, idx);
  2480.  
  2481.         if(!strlen(tmp)) {
  2482.             SendClientMessage(playerid, COLOR_WHITE, "Usage: /createcash [playerid] [amount]");
  2483.             return 1;
  2484.         }
  2485.         giveplayerid = strval(tmp);
  2486.  
  2487.         tmp = strtok(cmdtext, idx);
  2488.         if(!strlen(tmp)) {
  2489.             SendClientMessage(playerid, COLOR_WHITE, "Usage: /createcash [playerid] [amount]");
  2490.             return 1;
  2491.         }
  2492.         moneys = strval(tmp);
  2493.  
  2494.  
  2495.  
  2496.         if (IsPlayerConnected(giveplayerid)) {
  2497.             GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  2498.             GetPlayerName(playerid, sendername, sizeof(sendername));
  2499.                 GivePlayerMoney(giveplayerid, moneys);
  2500.                 format(string, sizeof(string), "Createcash: You have sent %s $%d.", giveplayer, moneys);
  2501.                 SendClientMessage(playerid, COLOR_YELLOW, string);
  2502.                 format(string, sizeof(string), "An admin %s has given you $%d", sendername,moneys);
  2503.                 SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  2504.                 }
  2505.         return 1;
  2506.     }
  2507.  
  2508.  
  2509.  }
  2510.  
  2511.  //
  2512.  if(strcmp(cmd, "/prophelp", true)==0)
  2513.     {
  2514.         SendClientMessage(playerid, 0x8080FFAA, "Property- Information");
  2515.         SendClientMessage(playerid, 0x66CCFFAA, "To buy a property, use /buyprop(erty)");
  2516.         SendClientMessage(playerid, 0x66CCFFAA, "To sell a property, use /sellprop(erty)");
  2517.         SendClientMessage(playerid, 0x66CCFFAA, "List of the properties of you own: /myprops");
  2518.         return 1;
  2519.     }
  2520.         if(strcmp("/txt", cmd, true) == 0)
  2521.     {
  2522. //        new tmp[256];
  2523.         tmp = strtok(cmdtext,idx);
  2524.         new Message[256];
  2525.         new pName[MAX_PLAYER_NAME+1];
  2526.         new iName[MAX_PLAYER_NAME+1];
  2527.         if (HaveMobilePhone[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have a mobile phone");
  2528.         if(!strlen(tmp) || strlen(tmp) > 5) {
  2529.             SendClientMessage(playerid,COLOR_WHITE,"Usage: /txt [playerid] [message]");
  2530.             return 1;
  2531.         }
  2532.  
  2533.         new id = strval(tmp);
  2534.         gMessage = strrest(cmdtext,idx);
  2535.  
  2536.         if(!strlen(gMessage)) {
  2537.             SendClientMessage(playerid,COLOR_WHITE,"Usage: /txt [playerid] [message]");
  2538.             return 1;
  2539.         }
  2540.  
  2541.         if(!IsPlayerConnected(id)) {
  2542.             SendClientMessage(playerid,COLOR_WHITE,"Invalid receiver ID");
  2543.             return 1;
  2544.         }
  2545.  
  2546.         if(playerid != id) {
  2547.             GetPlayerName(id,iName,sizeof(iName));
  2548.             GetPlayerName(playerid,pName,sizeof(pName));
  2549.             if (!HaveMobilePhone[id]) return SendClientMessage(playerid,COLOR_WHITE,"Unable to reach the other person");
  2550.             format(Message,sizeof(Message),"You have sent a text message *%s* to %s",gMessage,iName);
  2551.             SendClientMessage(playerid,COLOR_YELLOW,Message);
  2552.             GivePlayerMoney(playerid, TXT_MESSAGE_COST);
  2553.             printf("TXT-Message: %s sent %s: %s",pName,iName,gMessage);
  2554.             format(Message,sizeof(Message),"You have received a text message from %s: %s",pName,gMessage);
  2555.             SendClientMessage(id,COLOR_YELLOW,Message);
  2556.             PlayerPlaySound(id,1085,0.0,0.0,0.0);
  2557.  
  2558.  
  2559.         }
  2560.         else {
  2561.             SendClientMessage(playerid,COLOR_ORED,"Error: You cannot send a text message to yourself!");
  2562.         }
  2563.         return 1;
  2564.     }
  2565.  
  2566.     //================================================================================================================================
  2567.     //================================================================================================================================
  2568.     //================================================================================================================================
  2569.     if(strcmp(cmd, "/buyprop", true)==0)
  2570.     {
  2571.         new str[128];
  2572.  
  2573.         new propid = IsPlayerNearProperty(playerid);
  2574.  
  2575.         if(propid == -1)
  2576.         {
  2577.             SendClientMessage(playerid, 0xFF0000AA, "You are not close enough to a property");
  2578.             return 1;
  2579.         }
  2580.  
  2581.         if(PlayerProps[playerid] == MAX_PROPERTIES_PER_PLAYER)
  2582.         {
  2583.             format(str, 128, "You already have %d properties! You cannot buy more!", PlayerProps[playerid]);
  2584.             SendClientMessage(playerid, 0xFF0000AA, str);
  2585.             return 1;
  2586.         }
  2587.         if(PropInfo[propid][PropIsBought] == 1)
  2588.         {
  2589.             new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
  2590.             if(ownerid == playerid)
  2591.             {
  2592.                 SendClientMessage(playerid, 0xFF0000AA, "You already own this property!");
  2593.                 return 1;
  2594.             }
  2595.             else
  2596.             {
  2597.                 if(PropInfo[propid][PropUnbuyableTime])
  2598.                 {
  2599.                     format(str, 128, "This property is already bought by %s!", PropInfo[propid][PropOwner]);
  2600.                     SendClientMessage(playerid, 0xFF0000AA, str);
  2601.                     return 1;
  2602.                 }
  2603.             }
  2604.         }
  2605.         if(GetPlayerMoney(playerid) < PropInfo[propid][PropValue])
  2606.         {
  2607.             format(str, 128, "You don't have enough money! You need $%d at least", PropInfo[propid][PropValue]);
  2608.             SendClientMessage(playerid, 0xFF0000AA, str);
  2609.             return 1;
  2610.         }
  2611.         new pName[MAX_PLAYER_NAME];
  2612.         GetPlayerName(playerid, pName, sizeof(pName));
  2613.                         if(PropInfo[propid][PropUnbuyableTime])
  2614.                 {
  2615.                     format(str, 128, "This property is already bought by %s!", PropInfo[propid][PropOwner]);
  2616.                     SendClientMessage(playerid, 0xFF0000AA, str);
  2617.                     return 1;
  2618.                 }
  2619.         PropInfo[propid][PropOwner] = pName;
  2620.         PropInfo[propid][PropIsBought] = 1;
  2621.         PropInfo[propid][PropUnbuyableTime] = 1;
  2622.         EarningsForPlayer[playerid] += PropInfo[propid][PropEarning];
  2623.         GivePlayerMoney(playerid, (0-PropInfo[propid][PropValue]));
  2624.         format(str, 128, "You have bought the property \"%s\" for $%d", PropInfo[propid][PropName], PropInfo[propid][PropValue]);
  2625.         SendClientMessage(playerid, 0xFFFF00AA, str);
  2626.         PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
  2627.         PlayerProps[playerid]++;
  2628.         SaveProperties();
  2629.         return 1;
  2630.         }
  2631.     //================================================================================================================================
  2632.     //================================================================================================================================
  2633.     //================================================================================================================================
  2634.     if(strcmp(cmd, "/sellprop", true) == 0)
  2635.     {
  2636.  
  2637.         new str[128];
  2638.         new propid = IsPlayerNearProperty(playerid);
  2639.         new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
  2640.         if(propid == -1)
  2641.         {
  2642.             SendClientMessage(playerid, 0xFF0000AA, "You are not close enough to a property");
  2643.             return 1;
  2644.         }
  2645.         if(PropInfo[propid][PropIsBought] == 1)
  2646.         {
  2647.         if(ownerid != playerid)
  2648.             {
  2649.                 SendClientMessage(playerid, 0xFF0000AA, "You don't own this property, smart ass!");
  2650.                 return 1;
  2651.             }
  2652.         }
  2653.         if(ownerid != playerid)
  2654.             {
  2655.                 SendClientMessage(playerid, 0xFF0000AA, "You don't own this property, smart ass!");
  2656.                 return 1;
  2657.             }
  2658.         new pName[MAX_PLAYER_NAME];
  2659.         GetPlayerName(playerid, pName, sizeof(pName));
  2660.         format(PropInfo[propid][PropOwner], MAX_PLAYER_NAME, "Nobody");
  2661.         PropInfo[propid][PropIsBought] = 0;
  2662.         PropInfo[propid][PropUnbuyableTime] = 0;
  2663.         GivePlayerMoney(playerid, (PropInfo[propid][PropValue]/2));
  2664.         format(str, 128, "You have sold your property \"%s\" for 50 percents of it's Price: $%d,-", PropInfo[propid][PropName], PropInfo[propid][PropValue]/2);
  2665.         SendClientMessage(playerid, 0xFFFF00AA, str);
  2666.         PlayerProps[playerid]--;
  2667.         EarningsForPlayer[playerid] -= PropInfo[propid][PropEarning];
  2668.         PropInfo[propid][PropUnbuyableTime] = 0;
  2669.         SaveProperties();
  2670.         return 1;
  2671.         }
  2672.         if(strcmp(cmd, "/propertyinfo", true) == 0 || strcmp(cmd, "/propinfo", true) == 0)
  2673.     {
  2674.  
  2675.         new str[128];
  2676.         new propid = IsPlayerNearProperty(playerid);
  2677.         new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
  2678.         if(propid == -1)
  2679.         {
  2680.         SendClientMessage(playerid, 0xFF0000AA, "You're not close enough to a property");
  2681.         return 1;
  2682.         }
  2683.         if(ownerid != playerid)
  2684.         {
  2685.         format(str, 128, "Property: %s",PropInfo[propid][PropName]);
  2686.         SendClientMessage(playerid, COLOR_BROWN, str);
  2687.         format(str, 128, "Price: $%d",PropInfo[propid][PropValue]);
  2688.         SendClientMessage(playerid, 0xFFFF00AA, str);
  2689.         format(str, 128, "Earning: $%d",PropInfo[propid][PropEarning]);
  2690.         SendClientMessage(playerid, 0xFFFF00AA, str);
  2691.         format(str, 128, "Owner: %s",PropInfo[propid][PropOwner]);
  2692.         SendClientMessage(playerid, 0xFFFF00AA, str);
  2693.         return 1;
  2694.         }
  2695.         if(ownerid == playerid)
  2696.         {
  2697.         format(str, 128, "Welcome to your Property: %s",PropInfo[propid][PropName]);
  2698.         SendClientMessage(playerid, COLOR_BROWN, str);
  2699.         format(str, 128, "Price: $%d",PropInfo[propid][PropValue]);
  2700.         SendClientMessage(playerid, 0xFFFF00AA, str);
  2701.         format(str, 128, "Earning: $%d",PropInfo[propid][PropEarning]);
  2702.         SendClientMessage(playerid, 0xFFFF00AA, str);
  2703.         return 1;
  2704.         }
  2705.  
  2706.         return 1;
  2707.     }
  2708.  
  2709.     //================================================================================================================================
  2710.     //================================================================================================================================
  2711.     //================================================================================================================================
  2712.     if(strcmp(cmd, "/myprops", true) == 0)
  2713.     {
  2714.         new str[128], ownerid;
  2715.  
  2716.         if(PlayerProps[playerid] == 0)
  2717.         {
  2718.             SendClientMessage(playerid, 0xFF0000AA, "Error: You don't own any properties!");
  2719.             return 1;
  2720.         }
  2721.         format(str, 128, "Your Properties (%d):", PlayerProps[playerid]);
  2722.         SendClientMessage(playerid, COLOR_BROWN, str);
  2723.         for(new propid; propid < PropertiesAmount; propid++)
  2724.         {
  2725.             if(PropInfo[propid][PropIsBought] == 1)
  2726.             {
  2727.                 ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
  2728.                 if(ownerid == playerid)
  2729.                 {
  2730.                     format(str, 128, "\"%s\"   Price: $%d,-   Earnings: $%d,-", PropInfo[propid][PropName], PropInfo[propid][PropValue], PropInfo[propid][PropEarning]);
  2731.                     SendClientMessage(playerid, COLOR_BROWN, str);
  2732.                 }
  2733.             }
  2734.         }
  2735.         return 1;
  2736.     }
  2737.  
  2738.  
  2739.    
  2740.  
  2741.     return 0;
  2742. }
  2743.  
  2744. public OnPlayerText(playerid, text[])
  2745. {
  2746.     if (Muted[playerid] == 1) {
  2747.     SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to speak while muted!");
  2748.     return 0;
  2749.     }
  2750.         if (IsLogged[playerid] == 0) {
  2751.     SendClientMessage(playerid, COLOR_ORED,"Error: You must log in to speak!");
  2752.     return 0;
  2753.     }
  2754.     return 1;
  2755. }
  2756. //------------------------------------------------------------------------------------------------------
  2757.  
  2758. public OnPlayerSpawn(playerid)
  2759. {
  2760.     PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
  2761.     if (IsInJail[playerid] == 1) {
  2762.     SetPlayerPos(playerid,264.8763,81.9862,1001.0390);
  2763.     SetPlayerInterior(playerid, 6);
  2764.     TogglePlayerControllable(playerid, 0);
  2765.     SendClientMessage(playerid, COLOR_BLUE,"You have been arrested for 2 minutes");
  2766.     JailTimer[playerid] = SetTimerEx("Unjail", 120000, 1, "d", playerid);
  2767.     ResetPlayerWeapons(playerid);
  2768.     return 1;
  2769.     }
  2770.     if (JustDied[playerid] == 1) {
  2771.     SetPlayerPos(playerid, -2658.4133,628.4344,14.4531);
  2772.     SendClientMessage(playerid, COLOR_GREEN,"Medical Bills: $500");
  2773.     GivePlayerMoney(playerid, -500);
  2774.     SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
  2775.     ResetPlayerWeapons(playerid);
  2776.     if (Job[playerid] == 1) {
  2777.     GivePlayerWeapon(playerid,3,-1);
  2778.     GivePlayerWeapon(playerid,24,190);
  2779.     //
  2780.     }
  2781.     if (Job[playerid] == 2) {
  2782.     GivePlayerWeapon(playerid,17,2);
  2783.     GivePlayerWeapon(playerid,42,400);
  2784.     }
  2785.     if (Job[playerid] == 3) {
  2786.     GivePlayerWeapon(playerid,23,100);
  2787.     GivePlayerWeapon(playerid,27,400);
  2788.     }
  2789.    
  2790.     } //
  2791.    
  2792.     if (FirstSpawn[playerid] == 1) {
  2793.     TogglePlayerControllable(playerid, 0);
  2794.     if (Firstvisit[playerid] == 1) ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"San Fierro RPg","This seems to be your first visit here. Welcome! To start playing, type /register yourpassword, and then /login yourpassword","Continue"," ");
  2795.     Spawned[playerid] = 0;
  2796.     SetPlayerInterior(playerid, 0);
  2797.     ResetPlayerWeapons(playerid);
  2798.     SetPlayerPos(playerid,-1976.6405,458.3334,35.1718);
  2799.     SetPlayerFacingAngle(playerid, 90.0);
  2800.     SetCameraBehindPlayer(playerid);
  2801.     Speedom[playerid] = TextDrawCreate(350.000000,410.000000,"..");
  2802.     TextDrawUseBox(Speedom[playerid],0);
  2803.     TextDrawBoxColor(Speedom[playerid],0xFFFFFF85);
  2804.      TextDrawTextSize(Speedom[playerid],620.000000,0.000000);
  2805.     TextDrawAlignment(Speedom[playerid],0);
  2806.      TextDrawBackgroundColor(Speedom[playerid],0x000000FF);
  2807.      TextDrawFont(Speedom[playerid],1);
  2808.  TextDrawLetterSize(Speedom[playerid],0.4099985,1.400000);
  2809.  TextDrawColor(Speedom[playerid],0xFFFFFFFF);
  2810.  TextDrawSetOutline(Speedom[playerid],1);
  2811.  TextDrawSetProportional(Speedom[playerid],1);
  2812.  TextDrawSetShadow(Speedom[playerid],1);
  2813.  TextDrawHideForPlayer(playerid, Speedom[playerid]);
  2814.  FirstSpawn[playerid] = 0;
  2815. }
  2816.  
  2817.  
  2818.     return 1;
  2819. }
  2820.  
  2821.  
  2822.  
  2823. //------------------------------------------------------------------------------------------------------
  2824.  
  2825. public OnPlayerDeath(playerid, killerid, reason)
  2826. {
  2827.     new string[120];
  2828.     new deadname[24];
  2829.     JustDied[playerid] = 1;
  2830.     GetPlayerName(playerid, deadname,24);
  2831.     format(string, sizeof(string), "**%s has died", deadname);
  2832.     SendClientMessageToAllEx(playerid, COLOR_GREY,string);
  2833.     if (Job[killerid] != 1) {
  2834.     Wanted[killerid] = 1;
  2835.     SendClientMessage(playerid, COLOR_BLUE,"You have been wanted for a murder");
  2836.     }
  2837.     if (killerid != playerid) {
  2838.     IsInJail[playerid] = 1;
  2839.     Wanted[playerid] = 0;
  2840.     }
  2841.     return 1;
  2842. }
  2843.  
  2844.  
  2845. //------------------------------------------------------------------------------------------------------
  2846.  
  2847. public OnPlayerRequestClass(playerid, classid)
  2848. {
  2849.     SetupPlayerForClassSelection(playerid);
  2850.     SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
  2851.     return 1;
  2852. }
  2853. public OnPlayerRequestSpawn(playerid)
  2854. {
  2855.     new string[170];
  2856.     format(string, sizeof(string), "Welcome back %s! Now spawn & then login!", GetPlayerNameEx(playerid));
  2857.     if (Firstvisit[playerid] == 0) SendClientMessage(playerid, COLOR_GREEN,string);
  2858.     if (Firstvisit[playerid] == 1) SendClientMessage(playerid, COLOR_GREEN,"Welcome, newcomer! Press SHIFT to spawn, then you are able to REGISTER & LOGIN!");
  2859. return 1;
  2860. }
  2861.  
  2862. public SetupPlayerForClassSelection(playerid)
  2863. {
  2864.     SetPlayerInterior(playerid,0);
  2865.     SetPlayerPos(playerid,-2902.8886,-369.3730,3.5062);
  2866.     SetPlayerFacingAngle(playerid, 270.0);
  2867.     SetPlayerCameraPos(playerid,-2897.2358,-366.6657,3.5664);
  2868.     SetPlayerCameraLookAt(playerid,-2902.8886,-369.3730,3.5062);
  2869.     PlayerPlaySound(playerid,1183,0.0,0.0,0.0);
  2870. }
  2871.  
  2872.  
  2873.  
  2874. public OnGameModeInit()
  2875. {
  2876. SetGameModeText("San Fierro RPg");
  2877. ShowPlayerMarkers(1);
  2878. ShowNameTags(1);
  2879. EnableStuntBonusForAll(0);
  2880. UsePlayerPedAnims();
  2881. SFRPg = TextDrawCreate(489.000000, 5.000000, "       San Fierro RPg");
  2882. TextDrawSetOutline(SFRPg,1);
  2883. TextDrawFont(SFRPg,0);
  2884. TextDrawSetProportional(SFRPg,1);
  2885. TextDrawSetShadow(SFRPg,1);
  2886. TextDrawColor(SFRPg,0x0FB1FF96);
  2887.  
  2888. AddPlayerClass(0,1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1);
  2889. DoNOTDeleteThis = CreatePickup(1239, 1, 0.0,0.0,0.0);
  2890. Gym = CreatePickup(1239,23,768.1502,-37.6432,1000.6864);
  2891.  
  2892. DinerExit = CreatePickup(1239,23,460.0875,-88.5422,999.5546);
  2893. DinerIn[1] = CreatePickup(1239,23,-2279.2070,595.8998,39.2132);
  2894. DinerIn[2] = CreatePickup(1239,23,-2099.2145,715.3974,69.5625);
  2895. DinerIn[3] = CreatePickup(1239,23,-2430.6308,-136.2021,35.3203);
  2896. DinerIn[4] = CreatePickup(1239,23,-2523.4770,1216.2227,37.4283);
  2897. Bankin[1] = CreatePickup(1239,23,-1704.2038,785.6531,25.5571);
  2898. Market = CreatePickup(1239,23,-21.4673,-56.3102,1003.5468);
  2899. Restaurant = CreatePickup(1239,23,450.4185,-83.8341,999.5546);
  2900. TriadsPick = CreatePickup(1239,23,-2155.3286,-224.1345,35.3203);
  2901. Drivingschoolpickup = CreatePickup(1239,23,-2033.0300,-117.4337,1035.1718);
  2902. ElectronicsDealer = CreatePickup(1239, 23, -2231.8823,128.7616,1035.4140);
  2903. CityhallGoIn = CreatePickup(1239,23,-2765.8862,375.5025,6.3346);
  2904. BarPickup[0] = CreatePickup(1239,23,501.1939,-75.3717,998.7578);
  2905. BarPickup[1] = CreatePickup(1239,23,499.2912,-20.7353,1000.6796);
  2906. SFPDPick = CreatePickup(1239, 23, -1620.0010,683.0117,7.1875);
  2907. SFFDPick = CreatePickup(1239, 23, -2024.8890,67.1163,28.4371);
  2908. ClothesShop[0] = CreatePickup(1275, 23, 208.8020,-3.6937,1001.2177);
  2909. ClothesShop[1] = CreatePickup(1275, 23, 161.4568,-84.0934,1001.8046);
  2910. ClothesShop[2] = CreatePickup(1275,23,207.7889,-100.9175,1005.2578);
  2911. ClothesShop[3] = CreatePickup(1275,23,203.8927,-44.2191,1001.8046);
  2912. AddStaticPickup(1240, 23, -2658.5336,639.0750,14.4531, 0); //Hospital health
  2913. AddStaticVehicle(415,-2089.7454,-85.3183,34.9356,0.0900,36,1);
  2914. AddStaticVehicle(415,-2076.7393,-84.4259,34.8911,357.8584,116,1) ;
  2915. AddStaticVehicle(489,636.1039,-609.7283,16.4795,176.9169,14,123); // rancher Jail LS
  2916. AddStaticVehicle(504,-2091.6350,-106.7603,35.1125,179.5832,45,29) ;
  2917. AddStaticVehicle(560,-2396.2222,-594.7454,132.3533,123.1677,33,0) ;
  2918. AddStaticVehicle(411,-2414.5781,-586.8558,132.3755,215.3865,112,1) ;//
  2919. AddStaticVehicle(482,-2527.9175,-602.6952,132.6175,179.0378,41,20) ;
  2920. AddStaticVehicle(451,-2517.0481,-601.8521,132.2690,179.6375,36,36 );
  2921. AddStaticVehicle(522,-2494.2900,-601.8505,132.1326,178.4421,3,8) ;
  2922. AddStaticVehicle(522,-2622.9067,-509.6570,70.9034,284.9871,3,8 );
  2923. AddStaticVehicle(405,-2747.2739,-306.4048,6.9132,50.7011,24,1 );
  2924. AddStaticVehicle(505,-2774.2708,-281.9049,6.7476,178.6849,37,0) ;
  2925. AddStaticVehicle(409,-2738.0176,-322.8980,6.8391,313.5169,1,1) ;//
  2926. AddStaticVehicle(457,-2657.9009,-290.8440,7.1044,313.4402,25,25) ;
  2927. AddStaticVehicle(457,-2652.5388,-295.5096,7.1101,312.4090,86,86) ;
  2928. AddStaticVehicle(457,-2644.5061,-290.4049,7.1283,139.4791,8,8) ;
  2929. AddStaticVehicle(457,-2650.2507,-284.7023,7.1297,137.3287,2,1) ;
  2930. AddStaticVehicle(475,-2718.7566,-181.6171,3.9922,269.6131,68,8 );
  2931. AddStaticVehicle(411,-2692.3340,-83.6105,4.7104,90.7628,1,1) ;
  2932. AddStaticVehicle(560,-2682.6699,-22.7128,4.3281,178.6174,1,31) ;
  2933. AddStaticVehicle(560,-2627.3579,-34.8250,4.0417,181.9431,41,29) ;
  2934. AddStaticVehicle(482,-2729.5671,76.7876,4.4511,87.5421,32,32) ;
  2935. AddStaticVehicle(579,-2484.3000,5.7674,25.5544,91.3108,42,42 );
  2936. AddStaticVehicle(567,-2528.8882,-5.5797,25.4875,271.5341,90,96) ;
  2937. AddStaticVehicle(429,-2592.7732,-110.8420,3.9306,89.9971,2,1 );
  2938. AddStaticVehicle(415,-2615.9045,-178.3203,4.1076,269.3111,40,1) ;
  2939. AddStaticVehicle(480,-2352.2312,-124.4615,34.9708,179.3509,17,1) ;
  2940. AddStaticVehicle(448,-2319.5144,-150.8684,35.1509,176.9124,3,6 );
  2941. AddStaticVehicle(535,-2099.2341,-36.4293,35.1021,357.3710,77,26 );
  2942. AddStaticVehicle(535,-2021.4100,-47.6897,35.1866,184.1009,69,1 );//
  2943. AddStaticVehicle(535,-2085.3667,61.6716,34.2269,88.7158,28,1 );
  2944. AddStaticVehicle(567,-2357.8167,-43.2394,35.1865,90.6814,97,96) ;
  2945. AddStaticVehicle(403,-1855.5707,-176.4486,9.9250,270.1853,25,1 );
  2946. AddStaticVehicle(492,-1821.1146,-161.7525,9.1874,164.9686,28,56 );
  2947. AddStaticVehicle(530,-1694.7194,8.6605,3.3137,348.2751,111,1 );//
  2948. AddStaticVehicle(530,-1712.0934,10.8106,3.3879,303.1499,112,1 );
  2949. AddStaticVehicle(530,-1716.6062,19.1024,3.3437,273.4997,119,1 );
  2950. AddStaticVehicle(530,-1700.6174,6.2953,3.3148,352.1077,114,1 );
  2951. AddStaticVehicle(522,-1697.8990,63.3702,3.1263,301.0493,39,106) ;//
  2952. AddStaticVehicle(522,-1682.4491,41.4261,3.1198,338.2361,51,118 );
  2953. AddStaticVehicle(522,-1694.0885,48.6863,3.1207,317.3058,3,3) ;
  2954. AddStaticVehicle(493,-1760.9098,-193.8202,-0.1219,266.3580,36,13) ;
  2955. AddStaticVehicle(426,-1669.5262,-33.8696,3.3108,314.1520,42,42) ;
  2956. AddStaticVehicle(403,-1837.5128,-15.2423,15.6987,271.1784,54,1 );
  2957. AddStaticVehicle(426,-1839.7010,-21.5651,14.8602,265.8797,42,42 );
  2958. AddStaticVehicle(421,-1885.3856,-161.3161,11.6546,355.7335,71,72 );
  2959. AddStaticVehicle(482,-1861.0438,-140.4725,12.0201,87.6606,66,66 );//
  2960. AddStaticVehicle(545,-2485.9868,97.9314,34.9680,268.0125,81,81) ;
  2961. AddStaticVehicle(533,-2484.7358,65.7313,25.3992,358.7399,79,1 );
  2962. AddStaticVehicle(462,-2694.2021,68.7381,3.9321,85.6921,2,1 );
  2963. AddStaticVehicle(424,-2941.3359,-794.7429,6.8570,340.8897,2,2) ;
  2964. AddStaticVehicle(424,-2938.8164,-818.2305,7.0451,13.5219,2,2) ;
  2965. AddStaticVehicle(473,-2987.2434,-861.8030,-0.8947,144.9324,56,15) ;
  2966. AddStaticVehicle(473,-2967.3806,-684.3901,0.0677,351.0859,56,15 );
  2967. AddStaticVehicle(473,-2954.7388,-498.1349,0.0155,5.6709,56,15) ;
  2968. AddStaticVehicle(493,-2947.7612,-364.1319,-0.5123,78.4238,36,13) ;
  2969. AddStaticVehicle(461,-2068.5420,-503.7956,35.0035,182.6852,46,46) ;
  2970. AddStaticVehicle(483,-1906.4901,-611.7231,24.5863,319.5491,17,0 );
  2971. AddStaticVehicle(411,-2148.7424,-922.7524,31.7505,267.8838,106,1) ;
  2972. AddStaticVehicle(411,-2125.3806,-885.7675,31.7505,270.2341,104,1 );
  2973. AddStaticVehicle(482,-1871.7642,-874.4785,32.1329,90.1095,118,118) ;
  2974. AddStaticVehicle(411,-1872.5656,-957.2282,31.7505,88.9793,80,1) ;
  2975. AddStaticVehicle(400,-1821.8348,-886.4156,42.0592,175.1724,123,1) ;
  2976. AddStaticVehicle(512,-1431.6896,-954.0375,201.2352,273.5343,15,123) ;//
  2977. AddStaticVehicle(512,-1432.9872,-942.3373,201.3756,274.4437,32,112 );
  2978. AddStaticVehicle(461,-2205.1782,-310.5668,35.2394,330.2716,46,46) ;
  2979. AddStaticVehicle(482,-2216.4529,-85.7872,35.4346,1.2615,64,64) ;
  2980. AddStaticVehicle(498,-2115.4626,-3.3854,35.3872,269.2903,13,120) ;
  2981. AddStaticVehicle(437,-2092.6289,-381.4249,35.4662,89.8969,79,7) ;
  2982. AddStaticVehicle(437,-2201.6951,-406.7657,35.4694,228.5155,79,7) ;
  2983. AddStaticVehicle(437,-2047.2311,-528.4994,35.4647,286.8040,79,7 );
  2984. AddStaticVehicle(455,-1578.2035,97.3175,4.1610,135.9403,37,1) ;
  2985. AddStaticVehicle(443,-1747.0641,-164.1042,4.1860,39.5812,20,1) ;
  2986. AddStaticVehicle(545,-2267.1362,85.5752,34.9679,269.1610,67,67) ;
  2987. AddStaticVehicle(496,-2264.8977,200.3980,34.8805,89.9701,66,72 );
  2988. AddStaticVehicle(536,-2216.8618,113.6911,35.0595,88.9417,12,1 );
  2989. AddStaticVehicle(409,-2414.7739,331.6805,34.7672,331.1144,1,1) ;
  2990. AddStaticVehicle(405,-2452.8604,138.2975,34.8354,46.6420,24,1) ;
  2991. AddStaticVehicle(461,-2523.0012,338.5651,34.6932,250.6181,61,1) ;
  2992. AddStaticVehicle(439,-2502.7300,382.2403,35.0181,235.8174,54,38) ;
  2993. AddStaticVehicle(400,-2470.8625,407.1818,27.8697,139.4656,123,1 );
  2994. AddStaticVehicle(496,-2522.4219,310.7949,27.4816,70.6665,20,20) ;
  2995. AddStaticVehicle(428,-2440.9980,509.6792,30.0563,206.6596,4,75 );
  2996. AddStaticVehicle(428,-2437.7600,510.8553,30.0507,202.1894,4,75 );
  2997. AddStaticVehicle(560,-2425.6440,518.4800,29.6348,216.9742,9,39) ;
  2998. AddStaticVehicle(463,-2473.4978,743.3479,34.5559,179.9892,84,84) ;
  2999. AddStaticVehicle(561,-2412.3730,741.7964,34.8297,179.4121,8,17) ;
  3000. AddStaticVehicle(463,-2451.2593,740.6838,34.7129,180.6275,79,39) ;
  3001. AddStaticVehicle(467,-2248.2617,692.7663,49.1081,179.2399,58,8 );
  3002. AddStaticVehicle(405,-2151.4058,637.0890,52.1898,182.3598,75,1 );
  3003. AddStaticVehicle(405,-2134.6875,686.8921,63.7561,178.3476,123,1 );
  3004. AddStaticVehicle(409,-1951.6525,724.5811,45.1672,270.0913,1,1) ;
  3005. AddStaticVehicle(429,-1941.2656,585.4785,34.7953,359.2309,3,1) ;
  3006. AddStaticVehicle(439,-1922.0646,303.6587,40.9425,177.2474,25,78) ;
  3007. AddStaticVehicle(461,-1974.6830,170.9425,27.3574,271.5703,46,46 );
  3008. AddStaticVehicle(420,-1987.9830,104.7278,27.3169,0.4059,6,1) ;
  3009. AddStaticVehicle(420,-1988.1044,147.8747,27.3177,0.2008,6,1 );
  3010. AddStaticVehicle(467,-2922.5259,428.7520,4.6539,276.2402,2,1) ;
  3011. AddStaticVehicle(493,-2981.0247,496.3422,-0.6554,1.5943,36,13) ;
  3012. AddStaticVehicle(549,-2578.6179,626.5599,27.4438,359.1449,117,1) ;
  3013. AddStaticVehicle(575,-2610.8423,1405.6122,6.7507,270.0862,19,96) ;
  3014. AddStaticVehicle(411,-1663.4688,1211.4713,6.9794,276.9535,12,1 );
  3015. AddStaticVehicle(558,-1656.2698,1208.2489,20.7792,268.6007,42,42 );
  3016. AddStaticVehicle(558,-1660.5311,1215.1492,20.7869,315.8402,24,1) ;
  3017. AddStaticVehicle(451,-1650.9478,1208.6367,13.3797,247.0129,18,18) ;
  3018. AddStaticVehicle(451,-1656.4871,1215.6764,13.4254,259.0972,101,1 );
  3019. AddStaticVehicle(560,-2047.9236,901.2451,53.3068,356.4079,21,1 );
  3020. AddStaticVehicle(560,-2105.8264,901.4780,76.3014,4.8684,36,1) ;
  3021. AddStaticVehicle(500,-2927.3159,500.5060,5.0168,268.8409,28,119) ;
  3022. AddStaticVehicle(409,-2752.1567,374.9532,3.9412,179.1495,1,1) ;
  3023. AddStaticVehicle(405,-2657.6785,374.4564,4.1077,1.3494,75,1 );
  3024. AddStaticVehicle(426,-2664.9829,267.9181,4.0801,0.0174,7,7 );
  3025. AddStaticVehicle(439,-2681.6306,267.9998,4.2312,358.7699,65,79) ;
  3026. AddStaticVehicle(462,-2636.0247,247.4894,3.9279,163.5248,2,1) ;
  3027. AddStaticVehicle(559,-2691.8088,204.5243,3.9923,359.4068,68,8 );
  3028. AddStaticVehicle(496,-2793.0317,229.3433,6.8049,89.8252,53,56) ;
  3029. AddStaticVehicle(560,-2710.5635,128.6468,3.9600,177.1886,37,0) ;
  3030. AddStaticVehicle(533,-2613.7000,205.8831,4.6949,1.1401,74,1 );
  3031. AddStaticVehicle(526,-2616.9363,71.5616,4.1026,268.8823,17,1) ;
  3032. AddStaticVehicle(436,-2546.9377,-142.7184,13.8009,0.8366,109,1 );
  3033. AddStaticVehicle(517,-2459.4773,-150.5229,25.7609,1.8047,36,36) ;
  3034. AddStaticVehicle(496,-2592.9810,-191.1821,3.9750,91.0989,31,31 );
  3035. AddStaticVehicle(475,-2694.0012,-147.6346,4.0512,90.9210,76,1 );
  3036. AddStaticVehicle(421,-2796.6199,-184.0407,6.8207,91.6072,42,42 );
  3037. AddStaticVehicle(566,-2796.3052,-39.5262,7.0876,89.8012,8,17 );
  3038. AddStaticVehicle(467,-2878.8960,734.5536,29.3162,280.5990,60,1 );
  3039. AddStaticVehicle(482,-2462.1184,793.0873,35.2270,93.7908,28,28 );
  3040. AddStaticVehicle(439,-2380.2781,1269.3492,25.1014,277.3688,37,78 );
  3041. AddStaticVehicle(522,-1821.9445,1310.5370,59.3070,186.3879,3,8) ;
  3042. AddStaticVehicle(475,-1829.7480,1289.9834,59.8258,21.8999,61,61) ;
  3043. AddStaticVehicle(475,-1842.0276,1304.4764,59.5341,198.8919,37,0 );
  3044. AddStaticVehicle(405,-1755.8068,953.2106,24.6171,84.9867,75,1 );
  3045. AddStaticVehicle(480,-1686.7346,1007.9662,17.3024,92.5730,66,72) ;
  3046. AddStaticVehicle(405,-1587.0150,859.0454,7.4098,90.4344,75,1) ;
  3047. AddStaticVehicle(439,-1629.2559,870.3282,8.1322,177.2777,43,21 );
  3048. AddStaticVehicle(533,-1707.0554,795.3817,24.5184,2.4475,77,1) ;
  3049. AddStaticVehicle(453,-1463.8043,1023.7324,-0.2395,269.1420,56,56 );
  3050. AddStaticVehicle(473,-1509.0499,1385.6211,-0.2875,114.2092,56,15 );
  3051. AddStaticVehicle(417,-1468.1395,1490.9220,8.3433,92.3864,0,0 );
  3052. AddStaticVehicle(417,-2311.2693,1544.9398,18.8852,183.6456,0,0 );
  3053. AddStaticVehicle(469,-2514.7388,1545.1013,17.3351,349.7112,1,3 );
  3054. AddStaticVehicle(473,-2432.8538,1568.3925,-0.0528,353.0695,56,53 );
  3055. AddStaticVehicle(473,-2434.4873,1571.9756,-0.1826,348.1105,56,15) ;
  3056. AddStaticVehicle(521,-2501.2534,1222.1891,36.9992,139.5936,87,118) ;
  3057. AddStaticVehicle(496,-2867.3279,695.7776,23.2883,296.3333,22,22 );
  3058. AddStaticVehicle(496,-2857.4624,830.0972,39.8342,238.8571,42,42 );
  3059. AddStaticVehicle(401,-2836.6306,870.4559,43.7638,267.2119,83,1) ;
  3060. AddStaticVehicle(401,-2839.8884,925.7379,43.8342,274.0428,47,47) ;
  3061. AddStaticVehicle(410,-2855.1917,962.1486,43.6477,294.1936,9,1 );
  3062. AddStaticVehicle(516,-2900.1345,1104.5038,26.8936,272.1553,9,1) ;
  3063. AddStaticVehicle(418,-2898.4971,1161.4402,13.5039,272.4668,95,95) ;
  3064. AddStaticVehicle(415,-2722.1973,980.1292,54.2327,9.4435,25,1 );
  3065. AddStaticVehicle(411,-2728.2146,910.1182,67.3208,153.1185,112,1) ;
  3066. AddStaticVehicle(421,-2634.7214,929.3314,71.3155,214.6021,30,1) ;
  3067. AddStaticVehicle(405,-2680.4905,869.2202,76.4498,23.7850,91,1 );
  3068. AddStaticVehicle(558,-2650.5452,856.2390,63.6388,312.0352,117,1 );
  3069. AddStaticVehicle(418,-2205.7361,293.8083,35.2104,359.0113,119,119 );
  3070. AddStaticVehicle(400,-2231.1545,293.4678,35.2612,1.3597,14,123) ;
  3071. AddStaticVehicle(426,-2792.9805,785.0926,49.5488,17.1913,7,7 );
  3072. AddStaticVehicle(533,-1997.0570,708.1403,45.0732,359.8203,52,39);
  3073. AddStaticVehicle(536,-2098.6619,653.4818,52.1045,178.5289,57,96) ;
  3074. AddStaticVehicle(475,-1772.8362,1205.1267,24.9264,128.7472,21,1) ;
  3075. AddStaticVehicle(482,-1698.9235,1029.1211,45.2640,163.2027,28,28 );
  3076. AddStaticVehicle(421,-1915.2972,792.2175,39.5330,271.2570,42,42 );
  3077. AddStaticVehicle(482,-1830.3928,636.3265,30.5508,181.9362,62,62) ;
  3078. AddStaticVehicle(551,-1767.2255,857.6757,24.6063,90.7746,72,1) ;
  3079. AddStaticVehicle(533,-1996.7197,780.7192,45.0773,0.8333,74,1 );
  3080. AddStaticVehicle(480,-2156.5957,781.6992,69.2316,271.9981,58,1 );
  3081. AddStaticVehicle(561,-2206.7849,718.1914,49.4181,359.8657,101,1) ;
  3082. AddStaticVehicle(482,-2287.0796,581.4111,34.9593,270.0385,59,36) ;
  3083. AddStaticVehicle(482,-2586.3882,311.3461,4.9411,90.7013,88,1) ;
  3084. AddStaticVehicle(439,-2586.3213,325.2354,4.7471,270.4281,65,79 );
  3085. AddStaticVehicle(521,-2590.9128,484.1599,14.1862,58.1234,75,13) ;
  3086. AddStaticVehicle(463,-2454.1155,638.9645,32.6119,266.5039,74,1 );
  3087. AddStaticVehicle(475,-2588.4861,632.4481,14.2561,269.3260,9,39 );
  3088. AddStaticVehicle(479,-2546.5293,647.5505,14.1927,90.1881,109,100) ;
  3089. AddStaticVehicle(405,-2566.9233,556.1500,14.3396,294.3413,36,1) ;
  3090. AddStaticVehicle(461,-2621.0337,137.8928,4.0045,266.5985,46,46 );
  3091. AddStaticVehicle(408,-2655.6912,-194.1583,4.7043,359.8855,26,26 );
  3092. AddStaticVehicle(479,-2274.9456,-119.1158,35.1114,266.5583,54,31 );
  3093. AddStaticVehicle(496,-2263.0579,18.8142,34.8656,354.0030,42,42) ;
  3094. AddStaticVehicle(475,-2167.6179,86.2425,35.0484,172.0044,21,1 );
  3095. AddStaticVehicle(579,-2265.7461,452.6116,34.9076,250.2149,95,105 );
  3096. AddStaticVehicle(405,-2379.3401,625.8353,33.0000,1.2157,36,1 );
  3097. AddStaticVehicle(579,-2213.2063,416.5867,35.0997,357.7801,7,7 );
  3098. AddStaticVehicle(582,-2123.9011,428.0708,34.6792,356.2318,14,1 );
  3099. AddStaticVehicle(482,-2123.8403,380.5338,35.2907,87.8615,64,64 );
  3100. AddStaticVehicle(582,-2044.8904,460.4015,35.2268,304.5739,56,123 );
  3101. AddStaticVehicle(405,-2308.2900,673.6360,44.3038,90.5505,65,79 );
  3102. AddStaticVehicle(480,-2175.9424,654.7142,49.2104,181.1464,12,12 );
  3103. AddStaticVehicle(405,-2650.2134,703.3293,27.7206,270.0416,11,1 );
  3104. AddStaticVehicle(496,-2694.9968,719.9131,34.2360,176.1588,42,42 );
  3105. AddStaticVehicle(482,-1612.3462,1284.5171,7.3010,90.9943,85,85) ;
  3106. AddStaticVehicle(445,-1630.5129,1289.7798,6.9140,135.4144,37,37 );
  3107. AddStaticVehicle(482,-1834.8303,1425.0577,7.2412,179.1661,57,57) ;
  3108. AddStaticVehicle(411,-1975.7601,1224.7452,31.4079,272.5271,106,1 );
  3109. AddStaticVehicle(560,-1971.0621,1185.6659,45.0734,89.7986,37,0 );
  3110. AddStaticVehicle(480,-1847.4036,1165.1617,39.5751,356.2450,73,45 );
  3111. AddStaticVehicle(428,-1833.1833,1096.2388,45.4880,89.0391,4,75) ;
  3112. AddStaticVehicle(439,-1730.7964,1089.0475,45.3416,271.8883,57,8 );
  3113. AddStaticVehicle(455,-1944.7908,1001.1067,35.6111,269.5481,32,74 );
  3114. AddStaticVehicle(482,-1673.3295,1090.5961,8.0443,269.4953,10,10 );
  3115. AddStaticVehicle(400,-2124.6316,-935.2519,32.1158,268.5499,62,1) ;
  3116. AddStaticVehicle(506,-2150.3098,-772.5972,31.6486,270.1075,37,37) ;
  3117. AddStaticVehicle(506,-2134.1143,-760.7621,31.7280,90.9188,7,7) ;
  3118. AddStaticVehicle(421,-2124.5564,-847.0036,31.9059,270.5157,95,1 );
  3119. AddStaticVehicle(405,-1736.9055,1053.4701,17.4609,267.5370,40,1 );
  3120. AddStaticVehicle(439,-1696.8990,977.2657,17.4815,359.7377,67,8 );
  3121. AddStaticVehicle(496,-1474.2157,-137.3864,5.6264,270.1316,62,62 );
  3122. AddStaticVehicle(400,-1337.5870,-128.9230,6.0923,88.6881,62,1) ;
  3123. AddStaticVehicle(482,-1426.0374,-212.6052,6.0536,88.9253,57,57) ;
  3124. AddStaticVehicle(516,-1369.8975,-216.2965,5.8337,88.8366,122,1) ;
  3125. AddStaticVehicle(517,-1337.3739,-37.7222,5.8549,87.8366,36,36) ;
  3126. AddStaticVehicle(480,-2645.6714,1375.8912,6.9395,268.6650,12,12) ;
  3127. AddStaticVehicle(411,-2618.2075,1349.1384,6.9411,0.7610,81,1 );
  3128. AddStaticVehicle(477,-2617.5005,1376.3701,6.8800,180.0679,94,1) ;
  3129. AddStaticVehicle(411,-2646.4983,1334.4966,6.9009,0.6167,106,1) ;
  3130. AddStaticVehicle(487,-1637.0043,1381.6923,18.5907,137.6304,29,42) ;
  3131. AddStaticVehicle(487,-2632.1711,1417.5526,24.9424,235.3438,29,42 );
  3132. AddStaticVehicle(480,-1623.0930,817.0657,6.5923,2.0322,6,6) ;
  3133. AddStaticVehicle(493,-1409.9961,917.3229,-0.3734,301.5048,1,5 );
  3134. AddStaticVehicle(493,-1403.3783,888.8575,-0.1041,328.1305,36,13 );
  3135. AddStaticVehicle(480,-1488.3904,666.5170,6.9579,92.0792,2,2 );
  3136. AddStaticVehicle(484,-1475.4053,703.6797,0.2567,181.1956,50,32 );
  3137. AddStaticVehicle(482,-1487.4949,758.5935,7.5513,89.3724,32,53);
  3138. AddStaticVehicle(403,-1654.6354,452.5728,8.2105,212.2164,24,77) ;
  3139. AddStaticVehicle(455,-1701.2188,407.8390,7.6164,221.8163,84,58) ;
  3140. AddStaticVehicle(461,-1673.6534,399.1507,6.7568,311.2735,37,1) ;
  3141. AddStaticVehicle(421,-1665.1743,351.3592,6.8215,345.8147,42,42) ;
  3142. AddStaticVehicle(455,-1622.2393,84.3414,3.9898,147.7921,1,31 );
  3143. AddStaticVehicle(453,-1632.5704,161.8541,-0.2770,315.6891,56,56 );
  3144. AddStaticVehicle(460,-1446.9373,96.2603,1.8018,313.8602,1,30 );
  3145. AddStaticVehicle(421,-1319.0929,-337.8624,14.0309,260.0551,25,1) ;
  3146. AddStaticVehicle(553,-1622.4431,-311.8704,15.4839,27.5372,55,23) ;
  3147. AddStaticVehicle(417,-1712.1791,-456.0522,14.2207,1.9482,0,0 );
  3148. AddStaticVehicle(447,-1756.1366,-444.6548,0.7483,5.0545,75,2) ;
  3149. AddStaticVehicle(507,-1236.8948,33.3595,13.9733,221.5421,7,7 );
  3150. AddStaticVehicle(411,-1426.3220,-13.7968,5.7271,90.1829,116,1 );
  3151. AddStaticVehicle(411,-1459.3002,-5.4454,5.7914,271.8837,45,32) ;
  3152. AddStaticVehicle(424,-2906.0566,58.3788,4.3926,5.7181,119,122 );
  3153. AddStaticVehicle(568,-2897.8433,330.0730,4.6656,170.8635,9,39) ;
  3154. AddStaticVehicle(444,-2930.2214,711.2976,6.4082,7.0339,32,53 );
  3155. AddStaticVehicle(579,-2885.2395,1243.7937,7.0338,261.2170,7,7 );
  3156. AddStaticVehicle(462,-2810.1172,1325.5194,6.7011,143.9079,3,1 );
  3157. AddStaticVehicle(446,-2747.4805,1399.5426,-0.7690,32.7627,3,3 );
  3158. AddStaticVehicle(447,-2676.2593,1897.6268,0.9115,93.0397,75,2 );
  3159. AddStaticVehicle(508,-2065.7258,1423.1896,7.4764,145.1099,1,1) ;
  3160. AddStaticVehicle(461,-2092.5718,1432.6520,6.6750,193.9025,87,118) ;
  3161. AddStaticVehicle(536,-2091.5598,1392.6028,6.8385,217.0096,30,96) ;
  3162. AddStaticVehicle(452,-1902.7883,1400.2579,-0.2510,76.7538,1,5 );
  3163. AddStaticVehicle(461,-1794.8903,1405.5066,6.7728,203.9249,61,1 );
  3164. AddStaticVehicle(472,-1720.9418,1436.0170,0.3172,356.6591,56,53) ;
  3165. AddStaticVehicle(454,-1467.0510,1503.8058,0.1585,110.2544,26,26 );
  3166. AddStaticVehicle(473,-1570.9440,1263.8746,-0.0779,276.0413,56,15) ;
  3167. AddStaticVehicle(506,-1554.5819,1068.4961,6.8919,359.0276,52,52) ;
  3168. AddStaticVehicle(562,-1614.6351,1007.8853,6.8478,250.5691,17,1) ;
  3169. AddStaticVehicle(553,-1566.2198,-255.4555,15.4835,41.4339,61,74) ;
  3170. AddStaticVehicle(586,-1871.2375,-893.5937,31.5430,91.2748,122,1);
  3171. AddStaticVehicle(586,-1912.6022,-918.9386,31.7413,353.5594,46,46) ;
  3172. AddStaticVehicle(541,-1897.6475,-823.9932,31.8346,272.8453,44,96 );
  3173. AddStaticVehicle(541,-1886.8457,-759.9957,31.6483,270.8408,60,1) ;
  3174. AddStaticVehicle(533,-1761.6075,613.7797,26.9520,89.3371,79,1) ;
  3175. AddStaticVehicle(429,-2019.1703,1029.0781,55.1885,272.6768,13,13) ;
  3176. AddStaticVehicle(442,-2041.7661,1116.0492,53.1165,175.0672,11,105) ;
  3177. AddStaticVehicle(421,-2052.5154,1112.8059,53.1715,181.2767,13,1) ;
  3178. AddStaticVehicle(560,-2557.4421,1143.5118,55.4319,165.8663,9,39) ;
  3179. AddStaticVehicle(402,-2541.8601,1141.0548,55.3862,170.3531,35,1) ;
  3180. AddStaticVehicle(496,-2499.5383,1137.9291,55.4432,180.4333,53,56 );
  3181. AddStaticVehicle(536,-2485.8357,1137.9993,55.4642,180.9101,12,1);
  3182. AddStaticVehicle(541,-2458.5952,1138.3412,55.3516,178.5045,58,8) ;
  3183. AddStaticVehicle(541,-2431.1118,1136.0994,55.5330,175.6763,69,1) ;
  3184. AddStaticVehicle(541,-2377.0164,1122.4816,55.3515,340.0099,60,1) ;
  3185. AddStaticVehicle(508,-2413.5251,1026.2301,50.7658,0.0956,1,1) ;
  3186. AddStaticVehicle(575,-2408.1653,974.7092,44.9025,182.2524,19,96) ;
  3187. AddStaticVehicle(575,-2406.2703,944.5644,44.9790,266.8056,72,1) ;
  3188. AddStaticVehicle(559,-2352.3479,981.5965,50.3515,5.7404,58,8) ;
  3189. AddStaticVehicle(437,-2366.8171,1023.6387,50.8246,181.9107,79,7) ;
  3190. AddStaticVehicle(405,-2239.0337,893.4630,66.5312,89.8170,24,1) ;
  3191. AddStaticVehicle(426,-2233.8440,930.8287,66.3919,180.1113,10,10 );
  3192. AddStaticVehicle(587,-2220.6704,813.1365,49.0857,90.0399,53,1 );
  3193. AddStaticVehicle(500,-2292.3335,812.4420,49.0650,88.5746,9,39 );
  3194. AddStaticVehicle(466,-2273.5481,1038.3989,83.5060,179.7762,68,76 );
  3195. AddStaticVehicle(436,-2135.5122,1036.8539,79.6184,0.2546,87,1) ;
  3196. AddStaticVehicle(547,-2285.7629,1101.4392,79.8592,268.6749,123,1) ;
  3197. AddStaticVehicle(480,-2238.0720,1184.7144,55.3492,91.5899,2,2) ;
  3198. AddStaticVehicle(561,-2233.6113,1104.8516,79.8828,180.3517,101,1) ;
  3199. AddStaticVehicle(521,-2034.3132,167.2029,28.4100,276.3217,75,13) ;
  3200. AddStaticVehicle(549,-2033.3455,177.7978,28.7383,266.0410,57,8) ;
  3201. AddStaticVehicle(486,-2122.9641,176.7403,35.5823,269.0041,1,1) ;
  3202. AddStaticVehicle(486,-2128.7603,292.7856,35.0132,268.8581,1,1) ;
  3203. AddStaticVehicle(486,-2066.6992,295.1810,35.3575,185.6239,18,20) ;
  3204. AddStaticVehicle(482,-2126.2490,202.0597,35.4645,271.6610,102,65) ;
  3205. AddStaticVehicle(493,-2941.2458,500.9425,1.9118,356.2562,1,9 );
  3206. AddStaticVehicle(421,-2151.0249,835.4579,69.2326,181.8154,71,72) ;
  3207. AddStaticVehicle(516,-1892.3840,823.9651,34.9240,1.1847,119,1) ;
  3208. AddStaticVehicle(500,-1983.7811,896.3951,45.3164,161.2541,28,119) ;
  3209. AddStaticVehicle(482,-1878.1260,1073.6155,45.3833,1.0803,88,1) ;
  3210. AddStaticVehicle(518,-2027.1711,1228.7698,31.3190,268.9391,9,39 );
  3211. AddStaticVehicle(424,-2051.5183,1160.1519,45.2263,15.6148,2,2) ;
  3212. AddStaticVehicle(558,-2143.7021,1221.0677,46.9019,92.5564,24,1) ;
  3213. AddStaticVehicle(496,-2354.3687,1323.6498,14.6058,77.0716,42,42) ;
  3214. AddStaticVehicle(603,-2697.6223,783.2014,49.8749,267.5988,87,74 );
  3215. AddStaticVehicle(603,-2637.6653,802.7455,49.7702,1.1551,34,1 );
  3216. AddStaticVehicle(522,-2594.9675,841.6440,49.9161,84.3496,51,118) ;
  3217. AddStaticVehicle(463,-2464.2109,919.5464,62.5336,160.6213,7,7) ;
  3218. AddStaticVehicle(428,-1893.1501,878.8957,35.1399,0.5215,4,75) ;
  3219. AddStaticVehicle(500,-1920.9349,900.0209,35.5579,206.1858,14,123) ;
  3220. AddStaticVehicle(409,-1736.3384,947.9546,24.5472,65.3048,1,1 );
  3221. AddStaticVehicle(540,-1502.9904,938.4938,7.0463,124.6396,62,62) ;
  3222. AddStaticVehicle(550,-1788.1842,802.8976,24.7103,359.7563,42,42) ;
  3223. AddStaticVehicle(561,-1784.4341,692.7875,34.9859,182.2400,57,8 );
  3224. AddStaticVehicle(443,-1851.9319,116.8267,15.7521,284.3587,20,1) ;
  3225. AddStaticVehicle(482,-1855.5973,146.2494,15.2417,277.9544,85,85 );
  3226. AddStaticVehicle(549,-2048.1506,124.8951,28.6802,182.0321,47,76 );
  3227. AddStaticVehicle(600,-2160.9421,515.2612,34.8894,119.1082,32,8) ;
  3228. AddStaticVehicle(582,-2089.2358,479.1807,35.1022,78.0878,62,62 );
  3229. AddStaticVehicle(461,-1962.3229,466.2146,34.8407,64.7884,53,53 );
  3230. AddStaticVehicle(401,-1905.3840,710.6555,45.0761,179.5601,47,47) ;
  3231. AddStaticVehicle(401,-2539.3262,939.0101,64.2301,90.3424,47,47) ;
  3232. AddStaticVehicle(401,-2569.1545,981.8585,78.1545,358.0872,25,1 );
  3233. AddStaticVehicle(541,-2692.8362,455.8668,3.9608,87.0999,13,8 );
  3234. AddStaticVehicle(400,-2279.4724,-247.3415,42.5332,18.4825,40,1 );
  3235. AddStaticVehicle(444,-2354.2649,-371.5601,69.0405,313.2816,32,42) ;
  3236. AddStaticVehicle(461,-1704.8201,1339.3179,6.7801,93.7506,3,6) ;
  3237. AddStaticVehicle(405,-1696.4670,1348.2159,7.0546,99.7830,4,1) ;
  3238. AddStaticVehicle(461,-1648.1644,1307.4525,6.6986,130.5739,3,3) ;
  3239. AddStaticVehicle(479,-1915.3132,1256.0265,19.2396,89.3746,95,105) ;
  3240. AddStaticVehicle(402,-2178.9719,1227.6172,33.7613,358.4316,22,22 );
  3241. AddStaticVehicle(482,-1987.7301,1338.3241,7.2635,176.6010,105,1 );
  3242. AddStaticVehicle(405,-1977.9648,-1020.8948,32.0504,332.2476,36,1 );
  3243. AddStaticVehicle(487,-1970.8481,-829.0056,39.7330,1.5030,26,3) ;
  3244. AddStaticVehicle(421,-2148.8938,-879.1363,31.9059,269.8967,24,118 );
  3245. AddStaticVehicle(461,-1720.9136,1007.3600,17.1706,91.6206,37,1) ;
  3246. AddStaticVehicle(439,-1703.6799,1028.5684,17.2701,271.2751,68,1 );
  3247. AddStaticVehicle(516,-1385.4271,-207.9932,5.6252,269.5264,60,1 );
  3248. AddStaticVehicle(400,-1370.5370,-108.5120,5.7368,90.5826,30,96) ;
  3249. AddStaticVehicle(410,-1427.6842,-71.5402,5.6544,92.1527,9,1) ;
  3250. AddStaticVehicle(516,-1338.1565,-175.1089,5.7248,267.4071,2,62 );
  3251. AddStaticVehicle(496,-2436.2021,1257.5581,30.2190,90.0063,11,11) ;
  3252. AddStaticVehicle(579,-1643.6743,-1049.7825,102.4422,184.7762,62,62 );
  3253. AddStaticVehicle(468,-1539.1002,-988.9670,159.2563,171.1934,46,46) ;
  3254. AddStaticVehicle(457,-2477.0815,-310.3790,41.1381,313.3356,10,1 );
  3255. AddStaticVehicle(560,-2486.6094,262.4621,34.8724,271.1458,17,1 );
  3256. AddStaticVehicle(549,-2585.9888,712.8341,27.5820,89.5528,84,36 );
  3257. AddStaticVehicle(466,-1837.0461,339.5637,16.9045,331.3646,78,76 );
  3258. AddStaticVehicle(558,-1956.2533,297.6264,35.0939,64.6876,116,1) ;
  3259. AddStaticVehicle(560,-1957.6255,276.9994,35.1773,132.1875,9,39 );
  3260. AddStaticVehicle(561,-1950.4956,259.6261,35.2702,53.4263,8,17) ;
  3261. AddStaticVehicle(562,-1952.4977,265.6259,40.7239,292.5037,35,1 );
  3262. AddStaticVehicle(567,-1952.7600,258.7500,40.9200,258.7441,88,64 );
  3263.  
  3264.  
  3265.      //Bank
  3266.     CreateObject(13007, 4710.8979492188, -5842.5405273438, 3382.8020019531, 0, 0, 0);
  3267.     CreateObject(2946, 4703.7958984375, -5834.1953125, 3381.0129394531, 0, 0, 89.324493408203);
  3268.     CreateObject(2946, 4705.3662109375, -5834.2016601563, 3381.0129394531, 0, 0, 89.324340820313);
  3269.     CreateObject(3062, 4720.7329101563, -5846.0717773438, 3382.41015625, 0, 0, 91.309509277344);
  3270.     //
  3271.  
  3272.    //CITYHALL
  3273.     CreateObject(14602, 4008.908203125, -5358.7646484375, 1755.1164550781, 0, 0, 0);
  3274.     CreateObject(2190, 3993.146484375, -5359.306640625, 1750.4758300781, 0, 0, 242.1689453125);
  3275.     CreateObject(1715, 3991.5048828125, -5358.9448242188, 1749.7557373047, 0, 0, 89.324493408203);
  3276.     CreateObject(1715, 3991.0209960938, -5357.6235351563, 1749.7557373047, 0, 0, 132.994140625);
  3277.     CreateObject(1715, 3991.068359375, -5360.13671875, 1749.7492675781, 0, 0, 45.653686523438);
  3278.     CreateObject(1776, 3995.6254882813, -5373.9526367188, 1750.8486328125, 0, 0, 180.63439941406);
  3279.     CreateObject(1491, 4003.6220703125, -5365.8803710938, 1749.7999267578, 0, 0, 0);
  3280.     CreateObject(5302, 4004.1730957031, -5372.58203125, 1752.0794677734, 0, 0, 87.339508056641);
  3281.     CreateObject(2525, 4004.3830566406, -5372.08203125, 1749.7557373047, 0, 0, 178.6494140625);
  3282.     CreateObject(2523, 4005.5417480469, -5370.33203125, 1749.7557373047, 0, 0, 264.720703125);
  3283.     CreateObject(2967, 3992.8630371094, -5358.3227539063, 1750.4758300781, 0, 0, 83.369506835938);
  3284.     CreateObject(2163, 3986.216796875, -5357.4467773438, 1749.8468017578, 0, 0, 89.324340820313);
  3285.     CreateObject(2163, 3986.2001953125, -5359.2158203125, 1749.8481445313, 0, 0, 89.31884765625);
  3286.     CreateObject(2162, 3986.1801757813, -5360.9697265625, 1749.8481445313, 0, 0, 89.32080078125);
  3287.     CreateObject(2685, 3986.2006835938, -5371.5810546875, 1752.6325683594, 0, 0, 87.339508056641);
  3288.     CreateObject(1808, 3986.2006835938, -5372.3842773438, 1749.6058349609, 0, 0, 89.324493408203);
  3289.     CreateObject(1808, 4008.3984375, -5343.3940429688, 1749.6058349609, 0, 0, 5.9547119140625);
  3290.     CreateObject(1507, 3998.1889648438, -5343.0517578125, 1749.7602539063, 0, 0, 358.01501464844);
  3291.     CreateObject(2315, 4004.8039550781, -5348.001953125, 1749.7557373047, 0, 0, 0);
  3292.     CreateObject(1715, 4004.5270996094, -5349.2475585938, 1749.7492675781, 0, 0, 178.6484375);
  3293.     CreateObject(1715, 4006.3420410156, -5349.2060546875, 1749.7492675781, 0, 0, 182.61511230469);
  3294.     CreateObject(1715, 4007.3774414063, -5347.9721679688, 1749.7557373047, 0, 0, 271.93841552734);
  3295.     CreateObject(1715, 4003.6606445313, -5347.9228515625, 1749.7557373047, 0, 0, 89.314575195313);
  3296.     CreateObject(1715, 4004.8591308594, -5346.685546875, 1749.7557373047, 0, 0, 358.00366210938);
  3297.     CreateObject(1715, 4006.1540527344, -5346.6215820313, 1749.7557373047, 0, 0, 358.00048828125);
  3298.     CreateObject(1510, 4004.7404785156, -5348.001953125, 1750.2513427734, 0, 0, 0);
  3299.     CreateObject(1520, 4005.8889160156, -5348.0771484375, 1750.2513427734, 0, 0, 0);
  3300.     CreateObject(1667, 4006.3151855469, -5347.6801757813, 1750.3399658203, 0, 0, 0);
  3301.     CreateObject(1667, 4005.0300292969, -5347.646484375, 1750.3399658203, 0, 0, 0);
  3302.     CreateObject(1667, 4004.5419921875, -5348.328125, 1750.3399658203, 0, 0, 0);
  3303.     CreateObject(1667, 4006.1853027344, -5348.318359375, 1750.3399658203, 0, 0, 0);
  3304.    //
  3305.  
  3306.  
  3307.  
  3308.  
  3309. //Organization vehicles
  3310.  
  3311.     SFPD[0] = CreateVehicle(597,-1588.4078,673.0458,7.3151,176.8283,0,1,800) ; //SFPD
  3312.     SFPD[1] = CreateVehicle(597,-1594.1102,673.2027,7.3152,178.9346,0,1,800); // SFPD
  3313.     SFPD[2] = CreateVehicle(597,-1599.9313,673.6658,7.3142,178.6316,0,1,800); // SFPD
  3314.     SFPD[3] = CreateVehicle(523,-1606.1407,673.7606,7.3155,179.0799,0,1,800); // HPV1000
  3315.     SFFD[0] = CreateVehicle(407,-2020.7155,75.7732,27.7179,273.7722,79,1,800); // Firetruck
  3316.     SFFD[1] = CreateVehicle(407,-2020.1428,84.7187,27.6232,272.7130,79,1,800); // Firetruck
  3317.     SFFD[2] = CreateVehicle(407,-2020.0581,93.4380,27.6339,272.2723,79,1,800); // Firetruck
  3318.     TriadCars[0] = CreateVehicle(567,-2124.6729,-242.8121,35.2262,18.3732,99,81,800); // Triads Savanna
  3319.     TriadCars[1] = CreateVehicle(410,-2162.8362,-196.4179,35.1883,181.1792,99,81,800); // Triads Manana
  3320.     TriadCars[2] = CreateVehicle(411,-2156.5271,-196.8876,35.1877,181.1676,99,81,800); // Triads Infernus
  3321.     LoadProperties();
  3322.     MP = GetMaxPlayers();
  3323.     for(new i; i<MP; i++)
  3324.     {
  3325.         if(IsPlayerConnected(i))
  3326.         {
  3327.             new pName[MAX_PLAYER_NAME];
  3328.             GetPlayerName(i, pName, MAX_PLAYER_NAME);
  3329.             for(new propid; propid < PropertiesAmount; propid++)
  3330.             {
  3331.                 if(PropInfo[propid][PropIsBought] == 1)
  3332.                 {
  3333.                     if(strcmp(PropInfo[propid][PropOwner], pName, true)==0)
  3334.                     {
  3335.                         EarningsForPlayer[i] += PropInfo[propid][PropEarning];
  3336.                         PlayerProps[i]++;
  3337.                     }
  3338.                 }
  3339.             }
  3340.         }
  3341.     }
  3342.     #if ENABLE_MAP_ICON_STREAMER == 1
  3343.     SetTimer("MapIconStreamer", 500, 1);
  3344.     SetTimer("InfoDelete", 4500, 1);
  3345.     #endif
  3346.     SetTimer("PropertyPayout", 1800000, 1);
  3347. //
  3348.     AddStaticVehicle(490,-1574.3214,718.2319,-5.1140,89.8176,0,0) ;
  3349.     AddStaticVehicle(472,-1076.0149,-207.4982,0.0197,201.3848,56,53) ;
  3350.  
  3351.     for(new Vehicles = 0; Vehicles < MAX_VEHICLES; Vehicles++)
  3352.     {
  3353.     Fuel[Vehicles] = Random(SPAWN_GAS_MIN, SPAWN_GAS_MAX); //Set vehicles fuel
  3354.     }
  3355.  
  3356.     SetTimer("StatsSave",3000,1);
  3357.     SetTimer("ScoreUpgrade",700000,1);
  3358.     SetTimer("Speedometer", 700, 1);
  3359.     SetTimer("Wage", 350000, 1);
  3360.     SetTimer("ExitArea", 500, 1);
  3361.     SetTimer("LocationUpdate", 500, 1);
  3362.    
  3363.     return 1;
  3364. }
  3365.  
  3366. public OnGameModeExit()
  3367. {
  3368. SaveProperties();
  3369. }
  3370.  
  3371. public OnPlayerStateChange(playerid, newstate,oldstate)
  3372. {
  3373. if (newstate == PLAYER_STATE_ONFOOT) {
  3374. TextDrawHideForPlayer(playerid, Speedom[playerid]);
  3375. }
  3376.  
  3377.  
  3378. if (newstate == PLAYER_STATE_DRIVER) {
  3379. new getthecar = GetPlayerVehicleID(playerid);
  3380.  
  3381. if (HaveDrivingLic[playerid] == 0  && GetVehicleModel(GetPlayerVehicleID(playerid)) !=481 && GetVehicleModel(GetPlayerVehicleID(playerid)) !=510 && GetVehicleModel(GetPlayerVehicleID(playerid)) !=509 && GetPlayerVehicleID(playerid) != Drivingschoolcar[playerid]) {
  3382. SendClientMessage(playerid, COLOR_ORED,"Error: You must complete your driving test first!");
  3383. RemovePlayerFromVehicle(playerid);
  3384. }
  3385.  
  3386. for(new i=0; i<sizeof(SFPD); i++)
  3387. {
  3388. if (getthecar == SFPD[i]) {
  3389. if (Job[playerid] != 1) {
  3390. SendClientMessage(playerid, COLOR_WHITE,"Error: This vehicle is property of San Fierro Police Department");
  3391. RemovePlayerFromVehicle(playerid);
  3392. }
  3393. }
  3394. }
  3395.  
  3396. for(new i=0; i<sizeof(SFFD); i++)
  3397. {
  3398. if (getthecar == SFFD[i]) {
  3399. if (Job[playerid] != 2) {
  3400. SendClientMessage(playerid, COLOR_WHITE,"Error: This vehicle is property of San Fierro Fire Department");
  3401. RemovePlayerFromVehicle(playerid);
  3402. }
  3403. }
  3404. }
  3405. for(new i=0; i<sizeof(TriadCars); i++)
  3406. {
  3407. if (getthecar == TriadCars[i]) {
  3408. if (Job[playerid] != 3) {
  3409. SendClientMessage(playerid, COLOR_WHITE,"Error: This vehicle is property of The Triads");
  3410. RemovePlayerFromVehicle(playerid);
  3411. }
  3412. }
  3413. }
  3414.  
  3415.  
  3416.  
  3417. }
  3418. return 0;
  3419. }
  3420. stock SendClientMessageToAllEx(exception, clr, const message[])
  3421. {
  3422.     for(new i; i<MAX_PLAYERS; i++)
  3423.     {
  3424.         if(IsPlayerConnected(i))
  3425.     {
  3426.         if(i != exception)
  3427.         {
  3428.             SendClientMessage(i, clr, message);
  3429.         }
  3430.     }
  3431.     }
  3432. }
  3433. stock SetPlayerDiner(playerid,dinerid)
  3434. {
  3435. SetPlayerPos(playerid,457.304748,-88.428497,999.554687);
  3436. PlayerDiner[playerid] = dinerid;
  3437. SetPlayerInterior(playerid, 4);
  3438. SendClientMessage(playerid, COLOR_BROWN,"Diner - Welcome!");
  3439. }
  3440. stock SetPlayerBank(playerid,bankid)
  3441. {
  3442. SetPlayerPos(playerid,4704.7026,-5838.9965,3382.0129);
  3443. PlayerBank[playerid] = bankid;
  3444. SetPlayerInterior(playerid, 1);
  3445. SendClientMessage(playerid, COLOR_GREEN,"San Fierro Bank - Type /bankhelp to get started using the bank");
  3446. }
  3447. OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
  3448. {
  3449.     ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
  3450. }
  3451.  
  3452. stock strrest(const string[], &index)
  3453. {
  3454.     new length = strlen(string);
  3455.     while ((index < length) && (string[index] <= ' '))
  3456.     {
  3457.         index++;
  3458.     }
  3459.     new offset = index;
  3460.     new result[128];
  3461.     while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
  3462.     {
  3463.         result[index - offset] = string[index];
  3464.         index++;
  3465.     }
  3466.     result[index - offset] = EOS;
  3467.     return result;
  3468. }
  3469.  
  3470. stock LoadProperties()
  3471. {
  3472.     if(fexist("PropertyFolder/PropertyInfo.txt"))
  3473.     {
  3474.         CountProperties();
  3475.         new Argument[9][70];
  3476.         new entry[256], BoughtProps;
  3477.         new tlabe[256];
  3478.         new File: propfile = fopen("PropertyFolder/PropertyInfo.txt", io_read);
  3479.         if (propfile)
  3480.         {
  3481.             for(new id; id<PropertiesAmount; id++)
  3482.             {
  3483.                 fread(propfile, entry);
  3484.                 split(entry, Argument, ',');
  3485.                 format(PropInfo[id][PropName], 64, "%s", Argument[0]);
  3486.                 PropInfo[id][PropX] = floatstr(Argument[1]);
  3487.                 PropInfo[id][PropY] = floatstr(Argument[2]);
  3488.                 PropInfo[id][PropZ] = floatstr(Argument[3]);
  3489.                 PropInfo[id][PropValue] = strval(Argument[4]);
  3490.                 PropInfo[id][PropEarning] = strval(Argument[5]);
  3491.                 format(PropInfo[id][PropOwner], MAX_PLAYER_NAME, "%s", Argument[6]);
  3492.                 PropInfo[id][PropIsBought] = strval(Argument[7]);
  3493.                 PropInfo[id][PropUnbuyableTime] = strval(Argument[8]);
  3494.                 PropInfo[id][PickupNr] = CreatePickup(1272, 1, PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ]);
  3495.                 format(tlabe, 128, "Property: %s || Owner: %s",PropInfo[id][PropName],PropInfo[id][PropOwner]);
  3496.                 Create3DTextLabel(tlabe,0xFFFFFFAA,PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ]+1,60.0,0,1);
  3497.                 if(PropInfo[id][PropIsBought] == 1)
  3498.                 {
  3499.                     BoughtProps++;
  3500.                 }
  3501.             }
  3502.             fclose(propfile);
  3503.             printf("==Properties Info:==");
  3504.             printf("==Total properties: %d==", PropertiesAmount);
  3505.             printf("==Bought properties: %d / %d==", BoughtProps,PropertiesAmount);
  3506.         }
  3507.     }
  3508. }
  3509.  
  3510. stock SaveProperties()
  3511. {
  3512.     new entry[256];
  3513.     new File: propfile = fopen("PropertyFolder/PropertyInfo.txt", io_write);
  3514.     for(new id; id<PropertiesAmount; id++)
  3515.     {
  3516.         format(entry, 128, "%s,%.2f,%.2f,%.2f,%d,%d,%s,%d,%d \r\n",PropInfo[id][PropName], PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ], PropInfo[id][PropValue], PropInfo[id][PropEarning], PropInfo[id][PropOwner], PropInfo[id][PropIsBought], PropInfo[id][PropUnbuyableTime]);
  3517.         fwrite(propfile, entry);
  3518.     }
  3519.     printf("Saved %d Properties!", PropertiesAmount);
  3520.     fclose(propfile);
  3521. }
  3522.  
  3523. forward split(const strsrc[], strdest[][], delimiter);
  3524. public split(const strsrc[], strdest[][], delimiter)
  3525. {
  3526.     new i, li;
  3527.     new aNum;
  3528.     new len;
  3529.     while(i <= strlen(strsrc)){
  3530.         if(strsrc[i]==delimiter || i==strlen(strsrc)){
  3531.             len = strmid(strdest[aNum], strsrc, li, i, 128);
  3532.             strdest[aNum][len] = 0;
  3533.             li = i+1;
  3534.             aNum++;
  3535.         }
  3536.         i++;
  3537.     }
  3538.     return 1;
  3539. }
  3540.  
  3541. stock CountProperties()
  3542. {
  3543.     new entry[256];
  3544.     new File: propfile = fopen("PropertyFolder/PropertyInfo.txt", io_read);
  3545.     while(fread(propfile, entry, 256))
  3546.     {
  3547.         PropertiesAmount++;
  3548.     }
  3549.     fclose(propfile);
  3550. }
  3551.  
  3552. forward IsPlayerNearProperty(playerid);
  3553. public IsPlayerNearProperty(playerid)
  3554. {
  3555.     new Float:Distance;
  3556.     for(new prop; prop<PropertiesAmount; prop++)
  3557.     {
  3558.         Distance = GetDistanceToProperty(playerid, prop);
  3559.         if(Distance < 1.0)
  3560.         {
  3561.             return prop;
  3562.         }
  3563.     }
  3564.     return -1;
  3565. }
  3566.  
  3567. forward Float:GetDistanceToProperty(playerid, Property);
  3568. public Float:GetDistanceToProperty(playerid, Property)
  3569. {
  3570.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  3571.     GetPlayerPos(playerid,x1,y1,z1);
  3572.     x2 = PropInfo[Property][PropX];
  3573.     y2 = PropInfo[Property][PropY];
  3574.     z2 = PropInfo[Property][PropZ];
  3575.     return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  3576. }
  3577.  
  3578. stock GetPlayerID(const Name[])
  3579. {
  3580.     for(new i; i<MAX_PLAYERS; i++)
  3581.     {
  3582.         if(IsPlayerConnected(i))
  3583.         {
  3584.             new pName[MAX_PLAYER_NAME];
  3585.             GetPlayerName(i, pName, sizeof(pName));
  3586.             if(strcmp(Name, pName, true)==0)
  3587.             {
  3588.                 return i;
  3589.             }
  3590.         }
  3591.     }
  3592.     return -1;
  3593. }
  3594. stock encodepass(buf[]) {
  3595.     new length=strlen(buf);
  3596.     new s1 = 1;
  3597.     new s2 = 0;
  3598.     new n;
  3599.     for (n=0; n<length; n++)
  3600.     {
  3601.        s1 = (s1 + buf[n]) % 65521;
  3602.        s2 = (s2 + s1)     % 65521;
  3603.     }
  3604.     return (s2 << 16) + s1;
  3605. }
  3606.  
  3607. forward MapIconStreamer();
  3608. public MapIconStreamer()
  3609. {
  3610.     for(new i; i<MP; i++)
  3611.     {
  3612.         if(IsPlayerConnected(i))
  3613.         {
  3614.             new Float:SmallestDistance = 99999.9;
  3615.             new CP, Float:OldDistance;
  3616.             for(new propid; propid<PropertiesAmount; propid++)
  3617.             {
  3618.                 OldDistance = GetDistanceToProperty(i, propid);
  3619.                 if(OldDistance < SmallestDistance)
  3620.                 {
  3621.                     SmallestDistance = OldDistance;
  3622.                     CP = propid;
  3623.                 }
  3624.             }
  3625.             RemovePlayerMapIcon(i, 31);
  3626.             if(PropInfo[CP][PropIsBought] == 1)
  3627.             {
  3628.                 SetPlayerMapIcon(i, 31, PropInfo[CP][PropX], PropInfo[CP][PropY], PropInfo[CP][PropZ], 32, 0);
  3629.             }
  3630.             else
  3631.             {
  3632.                 SetPlayerMapIcon(i, 31, PropInfo[CP][PropX], PropInfo[CP][PropY], PropInfo[CP][PropZ], 31, 0);
  3633.             }
  3634.         }
  3635.     }
  3636. }
  3637.  
  3638. forward PropertyPayout();
  3639. public PropertyPayout()
  3640. {
  3641.     new str[64];
  3642.     for(new i; i<MAX_PLAYERS; i++)
  3643.     {
  3644.         if(IsPlayerConnected(i))
  3645.         {
  3646.             if(PlayerProps[i] > 0)
  3647.             {
  3648.                 GivePlayerMoney(i, EarningsForPlayer[i]);
  3649.                 format(str, 64, "You have earned $%d profit from your properties!", EarningsForPlayer[i]);
  3650.                 SendClientMessage(i, 0xFFFF00AA, str);
  3651.             }
  3652.         }
  3653.     }
  3654. }
  3655. forward InfoDelete();
  3656. public InfoDelete()
  3657. {
  3658. //  new str[64];
  3659.     for(new i; i<MAX_PLAYERS; i++)
  3660.     {
  3661.         if(IsPlayerConnected(i))
  3662.         {
  3663.             InfoShowed[i] = 0;
  3664.             }
  3665.     }
  3666. }
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672. stock Wait(time)
  3673. {
  3674.     new stamp = tickcount();
  3675.     while (tickcount() - stamp < time)
  3676.     {
  3677.     }
  3678.     return 1;
  3679. }
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688. //DO NOT REMOVE THE CREDITS! IT IS ILLEGAL AS YOU KNOW (COPYRIGHT) J/a/k/k/u (C) 2010
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement