Advertisement
Guest User

Untitled

a guest
Jun 5th, 2010
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 40.48 KB | None | 0 0
  1. #include <a_samp>
  2. #pragma tabsize 0
  3.  
  4. // DEFINES FOR KEYS BEIGN PRESSED
  5. #define HOLDING(%0) ((newkeys & (%0)) == (%0))
  6. #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  7. #define RELESEAD(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
  8. // OTHER DEFINES
  9. #define SPRAYMSG GameTextForPlayer(playerid,"~y~~h~Spraying!",1000,4);
  10.  
  11. forward OnPlayerSpray(playerid, sprayid, Float:x, Float:y , Float:z, Float:angle, int:prize);
  12.  
  13. //new Sprays[100][2]
  14.  
  15. enum Tags
  16. {
  17.      id,
  18.      obj,
  19.      Text3D:label
  20. }
  21.  
  22. new Sprays[150][Tags];
  23.  
  24. new Graffities[7] =
  25. {
  26.     1490,
  27.     1524,
  28.     1525,
  29.     1526,
  30.     1527,
  31.     1529,
  32.     1531
  33. };
  34.  
  35. public OnFilterScriptInit() // > OnGameModeInit
  36. {
  37.    for( new i=0; i < MAX_PLAYERS; i++)
  38.    {
  39.      if(IsPlayerConnected(i) && !IsPlayerNPC(i))
  40.      {
  41.         SetPlayerMapIcon( i, 0, 893.2590,-1116.1653,24.2183, 38, 0 );
  42.         SetPlayerMapIcon( i, 1, 815.4355,-1091.4939,25.7899, 38, 0 );
  43.         SetPlayerMapIcon( i, 2, 939.8045,-1085.1536,28.0337, 38, 0 );
  44.         SetPlayerMapIcon( i, 3, 982.8483,-1073.0897,31.4086, 38, 0 );
  45.         SetPlayerMapIcon( i, 4, 1056.9097,-1102.0345,24.3553, 38, 0 );
  46.         SetPlayerMapIcon( i, 7, 732.4426,-1350.0537,13.5062, 38, 0 );
  47.         SetPlayerMapIcon( i, 8, 827.1077,-1348.4089,13.5403, 38, 0 );
  48.        
  49.         SetPlayerMapIcon( i, 9,  477.0970,-1480.4791,19.8471, 38, 0 );
  50.         SetPlayerMapIcon( i, 10, 512.1003,-1624.9535,26.0938, 38, 0 );
  51.         SetPlayerMapIcon( i, 11, 655.9789,-1621.8478,20.4206, 38, 0 );
  52.         SetPlayerMapIcon( i, 12, 725.8309,-1476.2097,5.4688, 38, 0 );
  53.         SetPlayerMapIcon( i, 13, 834.1522,-1455.6680,13.6079, 38, 0 );
  54.         SetPlayerMapIcon( i, 14, 1020.8724,-1463.7822,13.5671, 38, 0 );
  55.        
  56.         SetPlayerMapIcon( i, 15, 1127.4692,-1656.8375,18.6103, 38, 0 );
  57.         SetPlayerMapIcon( i, 16, 1082.6774,-1698.4708,19.5469, 38, 0 );
  58.         SetPlayerMapIcon( i, 17, 1181.0287,-1877.8323,13.5643, 38, 0 );
  59.         SetPlayerMapIcon( i, 18, 845.261840,-1852.780151,8.485266, 38, 0 );
  60.         SetPlayerMapIcon( i, 19, 528.168640,-1761.933959,5.678244, 38, 0 );
  61.         SetPlayerMapIcon( i, 20, 378.545593,-2059.618652,7.835937, 38, 0 );
  62.         SetPlayerMapIcon( i, 23, 462.958190,-1330.750854,20.421875, 38, 0 );
  63.         SetPlayerMapIcon( i, 24, 1291.786132,-1210.652221,13.679687, 38, 0 );
  64.         SetPlayerMapIcon( i, 25, 1295.805664,-1006.533264,33.904052, 38, 0 );
  65.         SetPlayerMapIcon( i, 26, 1173.222412,-1347.600830,19.460163, 38, 0 );
  66.         SetPlayerMapIcon( i, 28, 1283.507690,-1508.246582,10.046875, 38, 0 );
  67.         SetPlayerMapIcon( i, 29, 1396.570312,-1461.781005,8.660701, 38, 0 );
  68.         SetPlayerMapIcon( i, 30, 1494.805908,-1664.960449,14.046875, 38, 0 );
  69.         SetPlayerMapIcon( i, 31, 1467.936279,-1767.355102,18.795755, 38, 0 );
  70.         SetPlayerMapIcon( i, 32, 1338.649169,-1784.684814,13.554653, 38, 0 );
  71.         SetPlayerMapIcon( i, 33, 1658.517456,-1656.062988,22.515625, 38, 0 );
  72.         SetPlayerMapIcon( i, 35, 1491.557861,-1726.793945,6.665757, 36, 0 );
  73.         SetPlayerMapIcon( i, 36, 1631.495239,-1513.944580,13.596755, 38, 0 );
  74.         SetPlayerMapIcon( i, 37, 1670.386108,-1370.517089,17.453125, 38, 0 );
  75.         SetPlayerMapIcon( i, 38, 1529.083496,-1235.503784,14.538536, 38, 0 );
  76.         SetPlayerMapIcon( i, 39, 1670.185302,-1200.896362,19.809432, 38, 0 );
  77.         SetPlayerMapIcon( i, 40, 1426.844482,-1348.344360,13.580536, 38, 0 );
  78.         SetPlayerMapIcon( i, 41, 1346.494750,-1656.222290,13.589862, 38, 0 );
  79.         SetPlayerMapIcon( i, 42, 1680.398315,-992.791870,24.078125, 38, 0 );
  80.         SetPlayerMapIcon( i, 43, 1431.649658,-1086.406127,17.566291, 38, 0 );
  81.         SetPlayerMapIcon( i, 44, 1201.071655,-1121.971435,24.235982, 38, 0 );
  82.         SetPlayerMapIcon( i, 46, 1141.765136,-1215.235839,18.513475, 38, 0 );
  83.         SetPlayerMapIcon( i, 47, 1114.818481,-873.780151,43.390625, 38, 0 );
  84.         SetPlayerMapIcon( i, 48, 1304.617797,-863.484680,39.578125, 38, 0 );
  85.         SetPlayerMapIcon( i, 49, 686.850158,-1127.623291,16.789146, 38, 0 );
  86.         SetPlayerMapIcon( i, 50, 294.495452,-1440.990844,31.367750, 38, 0 );
  87.        
  88.        
  89.         // Especiales
  90.         SetPlayerMapIcon( i, 5, 952.1675,-1294.1095,22.5553, 36, 0 );
  91.         SetPlayerMapIcon( i, 6, 951.0120,-1233.2150,26.5938, 36, 0 );
  92.         //SetPlayerMapIcon( i, 21, 412.984924,-1746.438842,14.675587, 36, 0 );
  93.         //SetPlayerMapIcon( i, 22, 316.962768,-1512.869140,24.921875, 36, 0 );
  94.        
  95.       }
  96.    }
  97.    
  98.    Sprays[0][label] = Create3DTextLabel("Spray!",0x008080FF,893.2590,-1116.1653,24.7183,15.0,0,1);
  99.    Sprays[1][label] = Create3DTextLabel("Spray!",0x008080FF,815.4355,-1091.4939,26.4899,15.0,0,1);
  100.    Sprays[2][label] = Create3DTextLabel("Spray!",0x008080FF,939.8045,-1085.1536,28.5337,15.0,0,1);
  101.    Sprays[3][label] = Create3DTextLabel("Spray!",0x008080FF,982.8483,-1073.0897,31.9086,15.0,0,1);
  102.    Sprays[4][label] = Create3DTextLabel("Spray!",0x008080FF,1056.9097,-1102.0345,24.8553,15.0,0,1);
  103.    Sprays[5][label] = Create3DTextLabel("Spray!",0x008080FF,952.1675,-1294.1095,22.9553,15.0,0,1);
  104.    Sprays[6][label] = Create3DTextLabel("Spray!",0x008080FF,951.0120,-1233.2150,26.9938,15.0,0,1);
  105.    Sprays[7][label] = Create3DTextLabel("Spray!",0x008080FF,732.4426,-1350.0537,13.9062,15.0,0,1);
  106.    Sprays[8][label] = Create3DTextLabel("Spray!",0x008080FF,827.1077,-1348.4089,13.9403,15.0,0,1);
  107.    Sprays[9][label] = Create3DTextLabel("Spray!",0x008080FF,477.0970,-1480.4791,19.8471,15.0,0,1);
  108.    Sprays[10][label] = Create3DTextLabel("Spray!",0x008080FF,512.1003,-1624.9535,26.0938,15.0,0,1);
  109.    Sprays[11][label] = Create3DTextLabel("Spray!",0x008080FF,655.9789,-1621.8478,20.4206,15.0,0,1);
  110.    Sprays[12][label] = Create3DTextLabel("Spray!",0x008080FF,725.8309,-1476.2097,5.4688,15.0,0,1);
  111.    Sprays[13][label] = Create3DTextLabel("Spray!",0x008080FF,834.1522,-1455.6680,13.6079,15.0,0,1);
  112.    Sprays[14][label] = Create3DTextLabel("Spray!",0x008080FF,1020.8724,-1463.7822,13.5671,15.0,0,1);
  113.    Sprays[15][label] = Create3DTextLabel("Spray!",0x008080FF,1127.4692,-1656.8375,18.6103,15.0,0,1);
  114.    Sprays[16][label] = Create3DTextLabel("Spray!",0x008080FF,1082.6774,-1698.4708,19.5469,15.0,0,1);
  115.    Sprays[17][label] = Create3DTextLabel("Spray!",0x008080FF,1181.1991,-1876.6,13.5520,15.0,0,1);
  116.    Sprays[18][label] = Create3DTextLabel("Spray!",0x008080FF,845.261840,-1852.780151,8.485266,15.0,0,1);
  117.    Sprays[19][label] = Create3DTextLabel("Spray!",0x008080FF,528.168640,-1761.933959,5.678244,15.0,0,1);
  118.    Sprays[20][label] = Create3DTextLabel("Spray!",0x008080FF,378.545593,-2059.618652,7.835937,15.0,0,1);
  119.    Sprays[21][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,412.984924,-1746.4,14.675587,50.0,0,1); // special
  120.    Sprays[22][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,316.962768,-1512.869140,24.921875,15.0,0,1);// special
  121.    Sprays[23][label] = Create3DTextLabel("Spray!",0x008080FF,462.958190,-1330.750854,20.421875,15.0,0,1);
  122.    Sprays[24][label] = Create3DTextLabel("Spray!",0x008080FF,1291.786132,-1210.652221,13.679687,15.0,0,1);
  123.    Sprays[25][label] = Create3DTextLabel("Spray!",0x008080FF,1295.805664,-1006.533264,33.904052,15.0,0,1);
  124.    Sprays[26][label] = Create3DTextLabel("Spray!",0x008080FF,1173.222412,-1347.600830,19.460163,15.0,0,1);
  125.    Sprays[27][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,1299.292480,-1438.448364,20.560392,15.0,0,1); // special
  126.    Sprays[28][label] = Create3DTextLabel("Spray!",0x008080FF,1283.507690,-1508.246582,10.046875,15.0,0,1);
  127.    Sprays[29][label] = Create3DTextLabel("Spray!",0x008080FF,1396.570312,-1461.781005,8.660701,15.0,0,1);
  128.    Sprays[30][label] = Create3DTextLabel("Spray!",0x008080FF,1494.805908,-1664.960449,14.046875,15.0,0,1);
  129.    Sprays[31][label] = Create3DTextLabel("Spray!",0x008080FF,1467.936279,-1767.355102,18.795755,15.0,0,1);
  130.    Sprays[32][label] = Create3DTextLabel("Spray!",0x008080FF,1338.649169,-1784.684814,13.554653,15.0,0,1);
  131.    Sprays[33][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,1654.384765,-1622.615112,22.515625,25.0,0,1); // special
  132.    Sprays[34][label] = Create3DTextLabel("Spray!",0x008080FF,1658.517456,-1656.062988,22.515625,15.0,0,1);
  133.    Sprays[35][label] = Create3DTextLabel("Spray!",0x008080FF,1491.557861,-1726.793945,6.665757,15.0,0,1);
  134.    Sprays[36][label] = Create3DTextLabel("Spray!",0x008080FF,1631.495239,-1513.944580,13.596755,15.0,0,1);
  135.    Sprays[37][label] = Create3DTextLabel("Spray!",0x008080FF,1670.386108,-1370.517089,17.453125,15.0,0,1);
  136.    Sprays[38][label] = Create3DTextLabel("Spray!",0x008080FF,1529.083496,-1235.503784,14.538536,15.0,0,1);
  137.    Sprays[39][label] = Create3DTextLabel("Spray!",0x008080FF,1670.185302,-1200.896362,19.809432,15.0,0,1);
  138.    Sprays[40][label] = Create3DTextLabel("Spray!",0x008080FF,1426.844482,-1348.344360,13.580536,15.0,0,1);
  139.    Sprays[41][label] = Create3DTextLabel("Spray!",0x008080FF,1346.494750,-1656.222290,13.589862,15.0,0,1);
  140.    Sprays[42][label] = Create3DTextLabel("Spray!",0x008080FF,1680.398315,-992.791870,24.078125,15.0,0,1);
  141.    Sprays[43][label] = Create3DTextLabel("Spray!",0x008080FF,1431.649658,-1086.406127,17.566291,15.0,0,1);
  142.    Sprays[44][label] = Create3DTextLabel("Spray!",0x008080FF,1201.071655,-1121.971435,24.235982,15.0,0,1);
  143.    Sprays[45][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,1194.8,-1186.0950,32.5,15.0,0,1);  // special
  144.    Sprays[46][label] = Create3DTextLabel("Spray!",0x008080FF,1141.765136,-1215.235839,18.513475,15.0,0,1);
  145.    Sprays[47][label] = Create3DTextLabel("Spray!",0x008080FF,1114.818481,-873.780151,43.390625,15.0,0,1);
  146.    Sprays[48][label] = Create3DTextLabel("Spray!",0x008080FF,1304.617797,-863.484680,39.578125,15.0,0,1);
  147.    Sprays[49][label] = Create3DTextLabel("Spray!",0x008080FF,686.850158,-1127.623291,16.789146,15.0,0,1);
  148.    Sprays[50][label] = Create3DTextLabel("Spray!",0x008080FF,294.495452,-1440.990844,31.367750,15.0,0,1);
  149.    
  150.    return 1;
  151. }
  152.  
  153. public OnFilterScriptExit()
  154. {
  155.    for( new i=0; i < MAX_PLAYERS; i++)
  156.    {
  157.      if(IsPlayerConnected(i) && !IsPlayerNPC(i))
  158.      {
  159.         RemovePlayerMapIcon( i, 0 );
  160.         RemovePlayerMapIcon( i, 1 );
  161.         RemovePlayerMapIcon( i, 2 );
  162.         RemovePlayerMapIcon( i, 3 );
  163.         RemovePlayerMapIcon( i, 4 );
  164.         RemovePlayerMapIcon( i, 5 );
  165.         RemovePlayerMapIcon( i, 6 );
  166.       }
  167.      
  168.       DestroyObject(Sprays[i][obj]);
  169.       Delete3DTextLabel(Sprays[i][label]);
  170.    }
  171.    
  172.    return 1;
  173. }
  174.  
  175. public OnPlayerSpawn(playerid)
  176. {
  177.     //Set Map Icons
  178.     // Cementerio
  179.     SetPlayerMapIcon( playerid, 0, 893.2590,-1116.1653,24.2183, 38, 0 );
  180.     SetPlayerMapIcon( playerid, 1, 815.4355,-1091.4939,25.7899, 38, 0 );
  181.     SetPlayerMapIcon( playerid, 2, 939.8045,-1085.1536,28.0337, 38, 0 );
  182.     SetPlayerMapIcon( playerid, 3, 982.8483,-1073.0897,31.4086, 38, 0 );
  183.     SetPlayerMapIcon( playerid, 4, 1056.9097,-1102.0345,24.3553, 38, 0 );
  184.     SetPlayerMapIcon( playerid, 7, 732.4426,-1350.0537,13.5062, 38, 0 );
  185.     SetPlayerMapIcon( playerid, 8, 827.1077,-1348.4089,13.5403, 38, 0 );
  186.  
  187.     SetPlayerMapIcon( playerid, 9,  477.0970,-1480.4791,19.8471, 38, 0 );
  188.     SetPlayerMapIcon( playerid, 10, 512.1003,-1624.9535,26.0938, 38, 0 );
  189.     SetPlayerMapIcon( playerid, 11, 655.9789,-1621.8478,20.4206, 38, 0 );
  190.     SetPlayerMapIcon( playerid, 12, 725.8309,-1476.2097,5.4688, 38, 0 );
  191.     SetPlayerMapIcon( playerid, 13, 834.1522,-1455.6680,13.6079, 38, 0 );
  192.     SetPlayerMapIcon( playerid, 14, 1020.8724,-1463.7822,13.5671, 38, 0 );
  193.  
  194.     SetPlayerMapIcon( playerid, 15, 1127.4692,-1656.8375,18.6103, 38, 0 );
  195.     SetPlayerMapIcon( playerid, 16, 1082.6774,-1698.4708,19.5469, 38, 0 );
  196.     SetPlayerMapIcon( playerid, 17, 1181.0287,-1877.8323,13.5643, 38, 0 );
  197.     SetPlayerMapIcon( playerid, 18, 845.261840,-1852.780151,8.485266, 38, 0 );
  198.     SetPlayerMapIcon( playerid, 19, 528.168640,-1761.933959,5.678244, 38, 0 );
  199.     SetPlayerMapIcon( playerid, 20, 378.545593,-2059.618652,7.835937, 38, 0 );
  200.     SetPlayerMapIcon( playerid, 23, 462.958190,-1330.750854,20.421875, 38, 0 );
  201.     SetPlayerMapIcon( playerid, 24, 1291.786132,-1210.652221,13.679687, 38, 0 );
  202.     SetPlayerMapIcon( playerid, 25, 1295.805664,-1006.533264,33.904052, 38, 0 );
  203.     SetPlayerMapIcon( playerid, 26, 1173.222412,-1347.600830,19.460163, 38, 0 );
  204.     SetPlayerMapIcon( playerid, 28, 1283.507690,-1508.246582,10.046875, 38, 0 );
  205.     SetPlayerMapIcon( playerid, 29, 1396.570312,-1461.781005,8.660701, 38, 0 );
  206.     SetPlayerMapIcon( playerid, 30, 1494.805908,-1664.960449,14.046875, 38, 0 );
  207.     SetPlayerMapIcon( playerid, 31, 1467.936279,-1767.355102,18.795755, 38, 0 );
  208.     SetPlayerMapIcon( playerid, 32, 1338.649169,-1784.684814,13.554653, 38, 0 );
  209.     SetPlayerMapIcon( playerid, 33, 1658.517456,-1656.062988,22.515625, 38, 0 );
  210.     SetPlayerMapIcon( playerid, 35, 1491.557861,-1726.793945,6.665757, 36, 0 );
  211.     SetPlayerMapIcon( playerid, 36, 1631.495239,-1513.944580,13.596755, 38, 0 );
  212.     SetPlayerMapIcon( playerid, 37, 1670.386108,-1370.517089,17.453125, 38, 0 );
  213.     SetPlayerMapIcon( playerid, 38, 1529.083496,-1235.503784,14.538536, 38, 0 );
  214.     SetPlayerMapIcon( playerid, 39, 1670.185302,-1200.896362,19.809432, 38, 0 );
  215.     SetPlayerMapIcon( playerid, 40, 1426.844482,-1348.344360,13.580536, 38, 0 );
  216.     SetPlayerMapIcon( playerid, 41, 1346.494750,-1656.222290,13.589862, 38, 0 );
  217.     SetPlayerMapIcon( playerid, 42, 1680.398315,-992.791870,24.078125, 38, 0 );
  218.     SetPlayerMapIcon( playerid, 43, 1431.649658,-1086.406127,17.566291, 38, 0 );
  219.     SetPlayerMapIcon( playerid, 44, 1201.071655,-1121.971435,24.235982, 38, 0 );
  220.     SetPlayerMapIcon( playerid, 46, 1141.765136,-1215.235839,18.513475, 38, 0 );
  221.     SetPlayerMapIcon( playerid, 47, 1114.818481,-873.780151,43.390625, 38, 0 );
  222.     SetPlayerMapIcon( playerid, 48, 1304.617797,-863.484680,39.578125, 38, 0 );
  223.     SetPlayerMapIcon( playerid, 49, 686.850158,-1127.623291,16.789146, 38, 0 );
  224.     SetPlayerMapIcon( playerid, 50, 294.495452,-1440.990844,31.367750, 38, 0 );
  225.  
  226.     // Especiales
  227.     SetPlayerMapIcon( playerid, 5, 952.1675,-1294.1095,22.5553, 36, 0 );
  228.     SetPlayerMapIcon( playerid, 6, 951.0120,-1233.2150,26.5938, 36, 0 );
  229.  
  230.     //3d Text Labels
  231.     Sprays[0][label] = Create3DTextLabel("Spray!",0x008080FF,893.2590,-1116.1653,24.7183,15.0,0,1);
  232.     Sprays[1][label] = Create3DTextLabel("Spray!",0x008080FF,815.4355,-1091.4939,26.4899,15.0,0,1);
  233.     Sprays[2][label] = Create3DTextLabel("Spray!",0x008080FF,939.8045,-1085.1536,28.5337,15.0,0,1);
  234.     Sprays[3][label] = Create3DTextLabel("Spray!",0x008080FF,982.8483,-1073.0897,31.9086,15.0,0,1);
  235.     Sprays[4][label] = Create3DTextLabel("Spray!",0x008080FF,1056.9097,-1102.0345,24.8553,15.0,0,1);
  236.     Sprays[5][label] = Create3DTextLabel("Spray!",0x008080FF,952.1675,-1294.1095,22.9553,15.0,0,1);
  237.     Sprays[6][label] = Create3DTextLabel("Spray!",0x008080FF,951.0120,-1233.2150,26.9938,15.0,0,1);
  238.     Sprays[7][label] = Create3DTextLabel("Spray!",0x008080FF,732.4426,-1350.0537,13.9062,15.0,0,1);
  239.     Sprays[8][label] = Create3DTextLabel("Spray!",0x008080FF,827.1077,-1348.4089,13.9403,15.0,0,1);
  240.     Sprays[9][label] = Create3DTextLabel("Spray!",0x008080FF,477.0970,-1480.4791,19.8471,15.0,0,1);
  241.     Sprays[10][label] = Create3DTextLabel("Spray!",0x008080FF,512.1003,-1624.9535,26.0938,15.0,0,1);
  242.     Sprays[11][label] = Create3DTextLabel("Spray!",0x008080FF,655.9789,-1621.8478,20.4206,15.0,0,1);
  243.     Sprays[12][label] = Create3DTextLabel("Spray!",0x008080FF,725.8309,-1476.2097,5.4688,15.0,0,1);
  244.     Sprays[13][label] = Create3DTextLabel("Spray!",0x008080FF,834.1522,-1455.6680,13.6079,15.0,0,1);
  245.     Sprays[14][label] = Create3DTextLabel("Spray!",0x008080FF,1020.8724,-1463.7822,13.5671,15.0,0,1);
  246.     Sprays[15][label] = Create3DTextLabel("Spray!",0x008080FF,1127.4692,-1656.8375,18.6103,15.0,0,1);
  247.     Sprays[16][label] = Create3DTextLabel("Spray!",0x008080FF,1082.6774,-1698.4708,19.5469,15.0,0,1);
  248.     Sprays[17][label] = Create3DTextLabel("Spray!",0x008080FF,1181.1991,-1876.6,13.5520,15.0,0,1);
  249.     Sprays[18][label] = Create3DTextLabel("Spray!",0x008080FF,845.261840,-1852.780151,8.485266,15.0,0,1);
  250.     Sprays[19][label] = Create3DTextLabel("Spray!",0x008080FF,528.168640,-1761.933959,5.678244,15.0,0,1);
  251.     Sprays[20][label] = Create3DTextLabel("Spray!",0x008080FF,378.545593,-2059.618652,7.835937,15.0,0,1);
  252.     Sprays[21][label] = Create3DTextLabel("Hidden Spray!",0x008080FF,412.984924,-1746.4,14.675587,15.0,0,1); // special
  253.     Sprays[22][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,316.962768,-1512.869140,24.921875,15.0,0,1); // special
  254.     Sprays[23][label] = Create3DTextLabel("Spray!",0x008080FF,462.958190,-1330.750854,20.421875,15.0,0,1);
  255.     Sprays[24][label] = Create3DTextLabel("Spray!",0x008080FF,1291.786132,-1210.652221,13.679687,15.0,0,1);
  256.     Sprays[25][label] = Create3DTextLabel("Spray!",0x008080FF,1295.805664,-1006.533264,33.904052,15.0,0,1);
  257.     Sprays[26][label] = Create3DTextLabel("Spray!",0x008080FF,1173.222412,-1347.600830,19.460163,15.0,0,1);
  258.     Sprays[27][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,1299.292480,-1438.448364,20.560392,15.0,0,1); // special
  259.     Sprays[28][label] = Create3DTextLabel("Spray!",0x008080FF,1283.507690,-1508.246582,10.046875,15.0,0,1);
  260.     Sprays[29][label] = Create3DTextLabel("Spray!",0x008080FF,1396.570312,-1461.781005,8.660701,15.0,0,1);
  261.     Sprays[30][label] = Create3DTextLabel("Spray!",0x008080FF,1494.805908,-1664.960449,14.046875,15.0,0,1);
  262.     Sprays[31][label] = Create3DTextLabel("Spray!",0x008080FF,1467.936279,-1767.355102,18.795755,15.0,0,1);
  263.     Sprays[32][label] = Create3DTextLabel("Spray!",0x008080FF,1338.649169,-1784.684814,13.554653,15.0,0,1);
  264.     Sprays[33][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,1654.384765,-1622.615112,22.515625,25.0,0,1); // special
  265.     Sprays[34][label] = Create3DTextLabel("Spray!",0x008080FF,1658.517456,-1656.062988,22.515625,15.0,0,1);
  266.     Sprays[35][label] = Create3DTextLabel("Spray!",0x008080FF,1491.557861,-1726.793945,6.665757,15.0,0,1);
  267.     Sprays[36][label] = Create3DTextLabel("Spray!",0x008080FF,1631.495239,-1513.944580,13.596755,15.0,0,1);
  268.     Sprays[37][label] = Create3DTextLabel("Spray!",0x008080FF,1670.386108,-1370.517089,17.453125,15.0,0,1);
  269.     Sprays[38][label] = Create3DTextLabel("Spray!",0x008080FF,1529.083496,-1235.503784,14.538536,15.0,0,1);
  270.     Sprays[39][label] = Create3DTextLabel("Spray!",0x008080FF,1670.185302,-1200.896362,19.809432,15.0,0,1);
  271.     Sprays[40][label] = Create3DTextLabel("Spray!",0x008080FF,1426.844482,-1348.344360,13.580536,15.0,0,1);
  272.     Sprays[41][label] = Create3DTextLabel("Spray!",0x008080FF,1346.494750,-1656.222290,13.589862,15.0,0,1);
  273.     Sprays[42][label] = Create3DTextLabel("Spray!",0x008080FF,1680.398315,-992.791870,24.078125,15.0,0,1);
  274.     Sprays[43][label] = Create3DTextLabel("Spray!",0x008080FF,1431.649658,-1086.406127,17.566291,15.0,0,1);
  275.     Sprays[44][label] = Create3DTextLabel("Spray!",0x008080FF,1201.071655,-1121.971435,24.235982,15.0,0,1);
  276.     Sprays[45][label] = Create3DTextLabel("Hidden Spray!",0xff0000ff,1194.8,-1186.0950,32.5,15.0,0,1);  // special
  277.     Sprays[46][label] = Create3DTextLabel("Spray!",0x008080FF,1141.765136,-1215.235839,18.513475,15.0,0,1);
  278.     Sprays[47][label] = Create3DTextLabel("Spray!",0x008080FF,1114.818481,-873.780151,43.390625,15.0,0,1);
  279.     Sprays[48][label] = Create3DTextLabel("Spray!",0x008080FF,1304.617797,-863.484680,39.578125,15.0,0,1);
  280.     Sprays[49][label] = Create3DTextLabel("Spray!",0x008080FF,686.850158,-1127.623291,16.789146,15.0,0,1);
  281.     Sprays[50][label] = Create3DTextLabel("Spray!",0x008080FF,294.495452,-1440.990844,31.367750,15.0,0,1);
  282.    
  283.     return 1;
  284. }
  285.  
  286. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  287. {
  288.    if(!IsPlayerInAnyVehicle(playerid) && SLEEPING == 0 && URINATING == 0)
  289.    {
  290.       if(PRESSED(KEY_FIRE) && GetPlayerWeapon(playerid) == 41)
  291.       {
  292.           new Float:angle;
  293.           GetPlayerFacingAngle(playerid, angle);
  294.  
  295.           if(IsPlayerInRangeOfPoint(playerid, 1.0, 893.3028,-1117.3040,24.1885) && (angle >= 172 && angle <= 205))
  296.           {
  297.                    SetPlayerPos(playerid, 893.2590,-1116.1653,24.2183);
  298.                    SetPlayerFacingAngle( playerid, 182 );
  299.                    SPRAYMSG
  300.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,0,893.3028,-1117.6,24.1885,270.0,100);
  301.           }
  302.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 815.4355,-1091.4939,25.7899) && (angle >= 0 && angle <= 25))
  303.           {
  304.                    SetPlayerPos(playerid, 815.3524,-1092.4591,25.7898);
  305.                    SetPlayerFacingAngle( playerid, 0.8061 );
  306.                    SPRAYMSG
  307.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,1,815.4355,-1091.3,25.7899,90.0,100);
  308.           }
  309.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 939.8081,-1084.8080,28.5672) && (angle >= 0 && angle <= 25))
  310.           {
  311.  
  312.                    SetPlayerPos(playerid, 939.8045,-1085.1536,28.0337);
  313.                    SetPlayerFacingAngle( playerid, 1.0961 );
  314.                    SPRAYMSG
  315.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,2,939.8081,-1084.4,28.5672,90.0,100);
  316.           }
  317.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 982.8483,-1073.0897,31.4086) && (angle >= 0 && angle <= 25))
  318.           {
  319.                    SetPlayerPos(playerid, 982.8846,-1073.7616,31.4086);
  320.                    SetPlayerFacingAngle( playerid, 2.4015 );
  321.                    SPRAYMSG
  322.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,3,982.8483,-1072.9,31.4086,90.0,100);
  323.           }
  324.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1056.9097,-1102.0345,24.3553) && (angle >= 250 && angle <= 290) )
  325.           {
  326.                    SetPlayerPos(playerid, 1056.2628,-1102.0345,24.2970);
  327.                    SetPlayerFacingAngle( playerid, 269.9910 );
  328.                    SPRAYMSG
  329.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,4,1057.2,-1102.0345,24.3553,360.0,100);
  330.           }
  331.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 952.1675,-1294.1095,22.5553) && (angle >= 260 && angle <= 300) ) // Cartel 1
  332.           {
  333.                    SetPlayerPos(playerid, 951.6037,-1294.1396,22.5553);
  334.                    SetPlayerFacingAngle( playerid, 272.4410 );
  335.                    SPRAYMSG
  336.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,5,952.52,-1294.1095,22.5553,1.0,500);
  337.           }
  338.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 951.0120,-1233.2150,26.5938) && (angle >= 300 && angle <= 360) ) // Cartel 2
  339.           {
  340.                    SetPlayerPos(playerid, 950.6517,-1233.5115,26.5938);
  341.                    SetPlayerFacingAngle( playerid, 310.0 );
  342.                    SPRAYMSG
  343.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,6,951.60,-1233.2150,26.5938,36.0,500);
  344.           }
  345.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 732.4426,-1350.0537,13.5062) && (angle >= 80 && angle <= 125) )
  346.           {
  347.                    SetPlayerPos(playerid, 733.2525,-1350.0721,13.5062);
  348.                    SetPlayerFacingAngle( playerid, 91.0 );
  349.                    SPRAYMSG
  350.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,7,732.1,-1350.0537,13.5062,180.0,100);
  351.           }
  352.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 827.1077,-1348.4089,13.5403) && (angle >= 260 && angle <= 300) )
  353.           {
  354.                    SetPlayerPos(playerid, 826.3533,-1348.4375,13.5335);
  355.                    SetPlayerFacingAngle( playerid, 270.0 );
  356.                    SPRAYMSG
  357.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,8,827.5,-1348.4089,13.5403,360.0,100);
  358.           }
  359.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 477.0970,-1480.4791,19.8471) && (angle >= 68 && angle <= 100) )
  360.           {
  361.                    SetPlayerPos(playerid, 478.2044,-1480.4751,19.8350);
  362.                    SetPlayerFacingAngle( playerid, 78.0 );
  363.                    SPRAYMSG
  364.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,9,476.7,-1480.4791,19.8471,168.5,100);
  365.           }
  366.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 512.1003,-1624.9535,26.0938) && (angle >= 170 && angle <= 220) )
  367.           {
  368.                    SetPlayerPos(playerid, 512.0818,-1624.4108,26.0938);
  369.                    SetPlayerFacingAngle( playerid, 180.0 );
  370.                    SPRAYMSG
  371.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,10,512.1003,-1625.2,26.0938,270.0,100);
  372.           }
  373.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 655.9789,-1621.8478,20.4206) && (angle >= 170 && angle <= 220) )
  374.           {
  375.                    SetPlayerPos(playerid, 656.0445,-1620.8605,20.4206);
  376.                    SetPlayerFacingAngle( playerid, 180.0 );
  377.                    SPRAYMSG
  378.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,11,655.9789,-1622.22,20.3500,270.0,100);
  379.           }
  380.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 725.7427,-1476.0,5.4688) && (angle >= 0 && angle <= 25) )
  381.           {
  382.                    SetPlayerPos(playerid, 725.8496,-1477.1033,5.4688);
  383.                    SetPlayerFacingAngle( playerid, 5.0 );
  384.                    SPRAYMSG
  385.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,12,725.8309,-1475.9,5.4,90.0,100);
  386.           }
  387.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 834.1522,-1455.6680,13.6079) && (angle >= 170 && angle <= 220) )
  388.           {
  389.                    SetPlayerPos(playerid, 834.1060,-1454.2032,13.6008);
  390.                    SetPlayerFacingAngle( playerid, 184.0 );
  391.                    SPRAYMSG
  392.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,13,834.1522,-1456.0,13.6079,270.0,100);
  393.           }
  394.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1020.8724,-1463.7822,13.5671) && (angle >= 170 && angle <= 220) )
  395.           {
  396.                    SetPlayerPos(playerid, 1020.9099,-1462.7952,13.5628);
  397.                    SetPlayerFacingAngle( playerid, 180.0 );
  398.                    SPRAYMSG
  399.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,14,1020.8724,-1464.51,13.5671,270.0,100);
  400.           }
  401.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1127.4692,-1656.8375,18.6103) && (angle >= 75 && angle <= 120) )
  402.           {
  403.                    SetPlayerPos(playerid, 1128.2518,-1656.7513,18.6110);
  404.                    SetPlayerFacingAngle( playerid, 90.0 );
  405.                    SPRAYMSG
  406.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,15,1127.22,-1656.8375,18.6103,180.0,100);
  407.           }
  408.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1082.6774,-1698.4708,19.5469) && (angle >= 0 && angle <= 45) )
  409.           {
  410.                    SetPlayerPos(playerid, 1082.6996,-1699.0251,19.5469);
  411.                    SetPlayerFacingAngle( playerid, 0.0 );
  412.                    SPRAYMSG
  413.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,16,1082.6996,-1698.15,19.1,90.0,150);
  414.           }
  415.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1181.1991,-1876.7766,13.5520) && (angle >= 0 && angle <= 45) )
  416.           {
  417.                 SetPlayerPos(playerid, 1181.0287,-1877.8323,13.5643);
  418.                    SetPlayerFacingAngle( playerid, 0.0 );
  419.                    SPRAYMSG
  420.                    SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,17,1181.1991,-1876.5,13.5520,90.0,100);
  421.           }
  422.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 845.2870,-1852.7802,8.4855) && (angle >= 0 && angle <= 45) )
  423.           {
  424.                 SetPlayerPos(playerid, 845.3514,-1853.6450,8.4852);
  425.                 SetPlayerFacingAngle( playerid, 0.0 );
  426.                 SPRAYMSG
  427.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,18,845.2870,-1852.45,8.4855,90.0,100);
  428.           }
  429.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 528.1686,-1761.9282,5.6782) && (angle >= 0 && angle <= 45) )
  430.           {
  431.                 SetPlayerPos(playerid, 528.1497,-1762.8901,5.6786);
  432.                 SetPlayerFacingAngle( playerid, 0.0 );
  433.                 SPRAYMSG
  434.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,19,528.1686,-1761.6,5.6782,90.0,100);
  435.           }
  436.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 378.5455,-2059.5425,7.8359) && (angle >= 75 && angle <= 120) )
  437.           {
  438.                 SetPlayerPos(playerid, 379.5522,-2059.6375,7.8359);
  439.                 SetPlayerFacingAngle( playerid, 90.0 );
  440.                 SPRAYMSG
  441.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,20,378.3,-2059.6187,7.8359,180.0,100);
  442.           }
  443.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 412.9849,-1746.4388,14.6756) && (angle >= 0 && angle <= 45) )
  444.           {
  445.                 SetPlayerPos(playerid, 413.0900,-1747.4247,14.6713);
  446.                 SetPlayerFacingAngle( playerid, 0.0 );
  447.                 SPRAYMSG
  448.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,21,412.9849,-1746.2,14.6756,90.0,500);
  449.           }
  450.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 316.9628,-1512.8691,24.9219) && (angle >= 215 && angle <= 265) )
  451.           {
  452.                 SetPlayerPos(playerid, 316.3103,-1512.2034,24.9219);
  453.                 SetPlayerFacingAngle( playerid, 235.0 );
  454.                 SPRAYMSG
  455.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,22,317.2,-1513.0,24.9219,325.0,250);
  456.           }
  457.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 462.9635,-1330.7458,20.4219) && (angle >= 150 && angle <= 190) )
  458.           {
  459.                 SetPlayerPos(playerid, 463.0425,-1330.1271,20.4219);
  460.                 SetPlayerFacingAngle( playerid, 162.0 );
  461.                 SPRAYMSG
  462.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,23,462.6,-1330.7458,22.5,250.0,125);
  463.           }
  464.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1291.7845,-1210.6592,13.6797) && (angle >= 0 && angle <= 45) )
  465.           {
  466.                 SetPlayerPos(playerid, 1291.8827,-1211.4441,13.6797);
  467.                 SetPlayerFacingAngle( playerid, 0.0 );
  468.                 SPRAYMSG
  469.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,24,1291.7845,-1210.3,13.6797,90.0,100);
  470.           }
  471.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1295.8057,-1006.5333,33.9041) && (angle >= 0 && angle <= 45) )
  472.           {
  473.                 SetPlayerPos(playerid, 1295.8127,-1007.4,33.9041);
  474.                 SetPlayerFacingAngle( playerid, 0.0 );
  475.                 SPRAYMSG
  476.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,25,1295.8057,-1006.2,33.9041,90.0,100);
  477.           }
  478.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1173.2224,-1347.6008,19.4602) && (angle >= 75 && angle <= 130) )
  479.           {
  480.                 SetPlayerPos(playerid, 1174.4968,-1347.5966,19.4633);
  481.                 SetPlayerFacingAngle( playerid, 90.0 );
  482.                 SPRAYMSG
  483.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,26,1173.0,-1347.6008,19.4602,180.0,150);
  484.           }
  485.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1299.2925,-1438.4484,20.5604) && (angle >= 0 && angle <= 45) )
  486.           {
  487.                 SetPlayerPos(playerid, 1299.3081,-1439.5317,20.3277);
  488.                 SetPlayerFacingAngle( playerid, 0.0 );
  489.                 SPRAYMSG
  490.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,27,1299.2925,-1438.14,20.75,90.0,500);
  491.           }
  492.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1283.5077,-1508.2466,10.0469) && (angle >= 0 && angle <= 45) )
  493.           {
  494.                 SetPlayerPos(playerid, 1283.6693,-1509.0781,10.0469);
  495.                 SetPlayerFacingAngle( playerid, 0.0 );
  496.                 SPRAYMSG
  497.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,28,1283.5077,-1507.9,10.0469,90.0,150);
  498.           }
  499.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1396.5703,-1461.7810,8.6607) && (angle >= 40 && angle <= 125) )
  500.           {
  501.                 SetPlayerPos(playerid, 1397.4303,-1462.0782,8.6652);
  502.                 SetPlayerFacingAngle( playerid, 70.0 );
  503.                 SPRAYMSG
  504.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,29,1396.15,-1462.0782,8.6607,162.0,100);
  505.           }
  506.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1494.8059,-1664.9604,14.0469) && (angle >= 250 && angle <= 320) )
  507.           {
  508.                 SetPlayerPos(playerid, 1493.7311,-1665.0725,14.0469);
  509.                 SetPlayerFacingAngle( playerid, 270.0 );
  510.                 SPRAYMSG
  511.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,30,1495.1,-1664.9604,14.0469,360.0,130);
  512.           }
  513.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1467.9363,-1767.3551,18.7958) && (angle >= 75 && angle <= 135) )
  514.           {
  515.                 SetPlayerPos(playerid, 1468.7540,-1767.3281,18.7958);
  516.                 SetPlayerFacingAngle( playerid, 90.0 );
  517.                 SPRAYMSG
  518.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,31,1467.65,-1767.3551,18.7958,180.0,100);
  519.           }
  520.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1338.6492,-1784.6848,13.5547) && (angle >= 75 && angle <= 135) )
  521.           {
  522.                 SetPlayerPos(playerid, 1339.7914,-1784.6808,13.5547);
  523.                 SetPlayerFacingAngle( playerid, 90.0 );
  524.                 SPRAYMSG
  525.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,32,1338.35,-1784.6848,13.5547,180.0,100);
  526.           }
  527.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1654.3848,-1622.6151,22.5156) && (angle >= 160 && angle <= 225) )
  528.           {
  529.                 SetPlayerPos(playerid, 1654.1855,-1621.5541,22.5156);
  530.                 SetPlayerFacingAngle( playerid, 180.0 );
  531.                 SPRAYMSG
  532.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,33,1654.3848,-1622.9,22.5156,270.0,500);
  533.           }
  534.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1658.5175,-1656.0630,22.5156) && (angle >= 0 && angle <= 45) )
  535.           {
  536.                 SetPlayerPos(playerid, 1658.5391,-1657.2717,22.5156);
  537.                 SetPlayerFacingAngle( playerid, 0.0 );
  538.                 SPRAYMSG
  539.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,34,1658.5175,-1655.72,22.5156,90.0,100);
  540.           }
  541.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1491.5579,-1726.7939,6.6658) && (angle >= 310 && angle <= 360) )
  542.           {
  543.                 SetPlayerPos(playerid, 1491.2069,-1727.6163,6.6671);
  544.                 SetPlayerFacingAngle( playerid, 350.0 );
  545.                 SPRAYMSG
  546.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,35,1491.5579,-1726.5,6.6658,80.0,300);
  547.           }
  548.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1631.4952,-1513.9446,13.5968) && (angle >= 255 && angle <= 325) )
  549.           {
  550.                 SetPlayerPos(playerid, 1630.4738,-1514.0077,13.5981);
  551.                 SetPlayerFacingAngle( playerid, 270.0 );
  552.                 SPRAYMSG
  553.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,36,1631.78,-1513.9446,13.5968,0.0,100);
  554.           }
  555.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1670.3861,-1370.5171,17.4531) && (angle >= 165 && angle <= 225) )
  556.           {
  557.                 SetPlayerPos(playerid, 1670.3342,-1369.5138,17.4531);
  558.                 SetPlayerFacingAngle( playerid, 180.0 );
  559.                 SPRAYMSG
  560.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,37,1670.3861,-1370.85,17.4531,270.0,100);
  561.           }
  562.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1529.0835,-1235.5038,14.5385) && (angle >= 260 && angle <= 305) )
  563.           {
  564.                 SetPlayerPos(playerid, 1528.2404,-1235.5140,14.5291);
  565.                 SetPlayerFacingAngle( playerid, 270.0 );
  566.                 SPRAYMSG
  567.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,38,1529.38,-1235.5038,14.5385,360.0,100);
  568.           }
  569.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1670.1853,-1200.8964,19.8094) && (angle >= 0 && angle <= 45) )
  570.           {
  571.                 SetPlayerPos(playerid, 1670.3265,-1201.9503,19.8108);
  572.                 SetPlayerFacingAngle( playerid, 0.0 );
  573.                 SPRAYMSG
  574.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,39,1670.1853,-1200.65,19.8094,90.0,100);
  575.           }
  576.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1426.8445,-1348.3444,13.5805) && (angle >= 245 && angle <= 315) )
  577.           {
  578.                 SetPlayerPos(playerid, 1425.9227,-1348.3405,13.5785);
  579.                 SetPlayerFacingAngle( playerid, 270.0 );
  580.                 SPRAYMSG
  581.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,40,1427.2,-1348.3444,13.5805,0.0,100);
  582.           }
  583.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1346.4948,-1656.2223,13.5899) && (angle >= 245 && angle <= 315) )
  584.           {
  585.                 SetPlayerPos(playerid, 1345.7346,-1656.2430,13.5880);
  586.                 SetPlayerFacingAngle( playerid, 270.0 );
  587.                 SPRAYMSG
  588.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,41,1346.75,-1656.2223,13.5899,0.0,100);
  589.           }
  590.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1680.3983,-992.7919,24.0781) && (angle >= 0 && angle <= 45) )
  591.           {
  592.                 SetPlayerPos(playerid, 1680.4799,-993.6778,24.0781);
  593.                 SetPlayerFacingAngle( playerid, 0.0 );
  594.                 SPRAYMSG
  595.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,42,1680.3983,-992.5,24.0781,90.0,100);
  596.           }
  597.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1431.6499,-1086.3334,17.5663) && (angle >= 235 && angle <= 315) )
  598.           {
  599.                 SetPlayerPos(playerid, 1430.6936,-1086.2904,17.5647);
  600.                 SetPlayerFacingAngle( playerid, 270.0 );
  601.                 SPRAYMSG
  602.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,43,1431.9,-1086.3334,17.5663,0.0,100);
  603.           }
  604.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1201.0717,-1121.9714,24.2360) && (angle >= 140 && angle <= 210) )
  605.           {
  606.                 SetPlayerPos(playerid, 1201.0649,-1121.4681,24.2523);
  607.                 SetPlayerFacingAngle( playerid, 180.0 );
  608.                 SPRAYMSG
  609.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,44,1201.0717,-1122.5,24.2360,270.0,100);
  610.           }
  611.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1194.9130,-1186.0950,31.8125) && (angle >= 35 && angle <= 115) )
  612.           {
  613.                 SetPlayerPos(playerid, 1195.2,-1186.0950,31.8125);
  614.                 SetPlayerFacingAngle( playerid, 70.0 );
  615.                 SPRAYMSG
  616.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,45,1193.72,-1186.05,33.7,160.0,600);
  617.           }
  618.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1141.7651,-1215.2358,18.5135) && (angle >= 45 && angle <= 135) )
  619.           {
  620.                 SetPlayerPos(playerid, 1142.2565,-1215.1577,18.5136);
  621.                 SetPlayerFacingAngle( playerid, 90.0 );
  622.                 SPRAYMSG
  623.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,46,1141.45,-1215.2358,18.5135,180.0,100);
  624.           }
  625.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1114.8185,-873.7802,43.3906) && (angle >= 145 && angle <= 225) )
  626.           {
  627.                 SetPlayerPos(playerid, 1114.7092,-873.1791,43.3906);
  628.                 SetPlayerFacingAngle( playerid, 180.0 );
  629.                 SPRAYMSG
  630.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,47,1114.8185,-874.1,43.3906,270.0,100);
  631.           }
  632.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 1304.6178,-863.4847,39.5781) && (angle >= 40 && angle <= 120) )
  633.           {
  634.                 SetPlayerPos(playerid, 1305.3354,-863.5535,39.5781);
  635.                 SetPlayerFacingAngle( playerid, 85.0 );
  636.                 SPRAYMSG
  637.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,48,1304.25,-863.4847,39.5781,180.0,100);
  638.           }
  639.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 686.8502,-1127.6233,16.7891) && (angle >= 40 && angle <= 120) )
  640.           {
  641.                 SetPlayerPos(playerid, 687.3957,-1127.8279,16.7921);
  642.                 SetPlayerFacingAngle( playerid, 70.0 );
  643.                 SPRAYMSG
  644.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,49,686.5,-1127.6233,16.5891,155.0,100);
  645.           }
  646.           else if(IsPlayerInRangeOfPoint(playerid, 1.0, 294.4955,-1440.9908,31.3678) && (angle >= 175 && angle <= 255) )
  647.           {
  648.                 SetPlayerPos(playerid, 293.9173,-1440.2664,31.3678);
  649.                 SetPlayerFacingAngle( playerid, 210.0 );
  650.                 SPRAYMSG
  651.                 SetTimerEx("OnPlayerSpray",2000,false,"diffffi",playerid,50,294.88,-1440.9908,32.0,301.5,100);
  652.           }
  653.       }
  654.    }
  655.    return 1;
  656. }
  657.  
  658. public OnPlayerSpray(playerid, sprayid, Float:x, Float:y , Float:z, Float:angle, int:prize)
  659. {
  660.     new keys,updown,leftright, string[128];
  661.     GetPlayerKeys(playerid,keys,updown,leftright);
  662.     format(string,sizeof(string),"~r~~h~Sprayed!~n~$%i", prize);
  663.  
  664.     if(Sprays[sprayid][id] == 1)
  665.        return GameTextForPlayer(playerid,"~b~~h~You've already sprayed that!",1500,3);
  666.  
  667.     if (keys == KEY_FIRE)
  668.     {
  669.         if(!IsPlayerInRangeOfPoint(playerid, 2.5, x,y,z))
  670.            return GameTextForPlayer(playerid,"~y~~h~Spray cancelado!",1500,3);
  671.        
  672.         if (GetPlayerSkin(playerid) >= 0 && GetPlayerSkin(playerid) < 280)
  673.         {
  674.  
  675.                 Sprays[sprayid][obj] = CreateObject(Graffities[random(7)], x,y,z+0.5, 0.0, 0.0, angle);
  676.                 RemovePlayerMapIcon( playerid, sprayid );
  677.                 Delete3DTextLabel(Sprays[sprayid][label]);
  678.                 Sprays[sprayid][id] = 1;
  679.  
  680.                 GameTextForPlayer(playerid,string,3000,3);
  681.                 GivePlayerMoney(playerid, prize);
  682.                 PlayerPlaySound(playerid,1055,0,0,0);
  683.         }
  684.     }
  685.     return 1;
  686. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement