Advertisement
Guest User

Gangwar

a guest
May 1st, 2011
668
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 263.04 KB | None | 0 0
  1. /* ___________________________________________________
  2. | Gang War v. 1.0.3c |
  3. | |
  4. | Crediti: |
  5. | - Francesco_Ronaldo aka The_Blade: Scripter GM |
  6. | - Allan Jader (CyNiC): Coordinate occhiali(suo FS)|
  7. | - DracoBlue: Dini.inc |
  8. | - Peppinux aka Peppe_Stasu: Teamchat |
  9. | - mitosking: Alcuni aiuti sul Register System |
  10. | - Scrip: Coordinate casco |
  11. | |
  12. | Potete editare la gm, ma lasciando i crediti |
  13. | sopra riportati. |
  14. |___________________________________________________|
  15.  
  16.  
  17. =============================Includes*/
  18. #include <a_samp>
  19. #include <Dini>
  20. #include <Seifader>
  21. #include <gl_common>
  22. #pragma unused Seifader_OnExit
  23.  
  24. /*=============================Colori*/
  25. #define COLORE_GROOVE 0x33AA33AA
  26. #define COLORE_BALLAS 0xB200FFAA
  27. #define COLORE_VAGOS 0xFFFF00AA
  28. #define COLORE_ATZECAS 0x00FFFFFF
  29. #define COLORE_TRIADE 0xFFFFFFAA
  30. #define COLORE_BIKERS 0xF97804AA
  31. #define COLORE_POLIZIA 0x0000FFAA
  32. #define GRIGIO 0xAFAFAFAA
  33. #define ROSA 0xFF66FFAA
  34. #define BLU_CHIARO 0x00BFFFAA
  35. #define COLORE_ERRORE 0xFF4444AA
  36. #define NERO 0x000000AA
  37.  
  38. /*=============================Dialogs*/
  39. #define SCELTA_TEAM 1000
  40. #define REGISTER_DIALOG 1200
  41. #define LOGIN_DIALOG 1300
  42. #define USERPANEL 1400
  43. #define CAMBIAPASS 1500
  44. #define AIUTO 1700
  45. #define REGOLE 1800
  46. #define CREDITI 1900
  47. #define COMANDI 2100
  48. #define ANIMAZIONI 2300
  49. #define BANCA 2400
  50. #define DEPOSITA 2500
  51. #define PRELEVA 2600
  52. #define CAMBIATEAM 2700
  53. #define COMPRADROGA 2800
  54. #define COMPRAPIZZA 2900
  55. #define COMPRABSHOT 3000
  56. #define COMPRADISCO 3100
  57. #define COMPRAVESTITI 3200
  58. #define COMPRARMI 3400
  59. #define ESPLOSIVI 3500
  60. #define FUCILI_POMPA 3600
  61. #define PISTOLE 3700
  62. #define FUCILI_ASSALTO 3800
  63. #define MITRA 3900
  64. #define FUCILI_PREC 4000
  65. #define CMD_ADMIN 4100
  66. #define CMDPOLIZIA 4400
  67. #define EMERGENZA 4500
  68. #define GPS 4600
  69. #define SCEGLILAVORO 4700
  70.  
  71. /*=============================Teams*/
  72. #define Groove 1
  73. #define Ballas 2
  74. #define Vagos 3
  75. #define Atzecas 4
  76. #define Polizia 5
  77. #define Triade 6
  78. #define Bikers 7
  79. #define Medici 8
  80. #define Cittadini 9
  81.  
  82. /*=============================Variabili*/
  83. enum pInfo {pKills, pDeaths, Bannato}
  84. new PlayerInfo[MAX_PLAYERS][pInfo];
  85. new stringa[500], pFile[64], Ip[16];
  86. new Massimoping = 600;
  87. new Skin;
  88. new moto_admin1, auto_admin1, auto_admin2, eli_admin1; //Veicoli Admin
  89. new Avvisi[MAX_PLAYERS] = 0;
  90. new VotiPlayers = 0;
  91. new ZonaGroove, ZonaBallas, ZonaVagos, ZonaAtzecas, ZonaTriade, ZonaBikers;
  92. new PickDisco, PickBurgershot, PickPizzeria, PickBinco, PickProLaps, PickBanca, PickAmmunation, PickBGroove1, PickBGroove2, PickBBallas, PickBVagos, PickBPolizia, PickBBikers, PickBTriade, PickBAtzecas, PickIBanca, IDroga1, IDroga2, IDroga3, IPizzeria, IBurgershot, IDisco, IBinco, IProlaps, IAmmunation, Resp1, Resp2, Resp3, Resp4, Resp5, Resp6, PickComune, IComune, HotD, PizzaB, Camionisti;
  93. new veicoloconsegna1, veicoloconsegna2, veicoloconsegna3, veicoloconsegna4, veicoloconsegna5, veicoloconsegna6, veicoloconsegna7;
  94. /*new affitta1, affitta2, affitta3, affitta4, affitta5, affitta6, affitta7, affitta8, affitta9, affitta10, affitta11, affitta12, affitta13;*/
  95. new pizzaboy1, pizzaboy2, pizzaboy3, pizzaboy4, pizzaboy5, pizzaboy6, pizzaboy7;
  96. new hotdog1, hotdog2, hotdog3, hotdog4;
  97. new banc;
  98. new TimerRapina;
  99. new Text3D: Afk[MAX_PLAYERS];
  100. new Blocco[MAX_PLAYERS];
  101. new Banconota[MAX_PLAYERS];
  102.  
  103. /*=============================Bool*/
  104. new bool: Loggato[MAX_PLAYERS];
  105. new bool: Morto[MAX_PLAYERS];
  106. new bool: Votato[MAX_PLAYERS];
  107. new bool: VotekickAttivo = false;
  108. new bool: RapinaAttiva = false;
  109. new bool: Rapinatore[MAX_PLAYERS];
  110. new bool: StopRapina[MAX_PLAYERS];
  111. new bool: AFK[MAX_PLAYERS];
  112. new bool: PostoDiBlocco[MAX_PLAYERS];
  113. new bool: Jailato[MAX_PLAYERS];
  114. new bool: Acceso[MAX_VEHICLES] = false;
  115. new bool: Luci[MAX_VEHICLES] = false;
  116. new bool: Drogato[MAX_PLAYERS] = false;
  117. new bool: LavoratoreConsegna[MAX_PLAYERS] = false;
  118. new bool: Pizzaboy[MAX_PLAYERS] = false;
  119. new bool: VendHotDog[MAX_PLAYERS] = false;
  120. new bool: Animazione[MAX_PLAYERS] = false;
  121. new bool: Tramortito[MAX_PLAYERS] = false;
  122.  
  123. /*=============================Forwards*/
  124. forward Spawn(playerid);
  125. forward Telecamera(playerid);
  126. forward UpdateTime();
  127. forward FineVoteKick(id, playerid);
  128. forward FineRapina(playerid);
  129. forward FineStopRapina(playerid);
  130. forward EsciPrigione(id);
  131. forward FineDrogato(playerid);
  132. forward PayDay();
  133. forward StopTramortito(id);
  134.  
  135. /*=============================Array*/
  136. new Rskingroove[3][1] =
  137. {
  138. {105},{106},{107}
  139. };
  140. new Rskinballas[3][1] =
  141. {
  142. {102},{103},{104}
  143. };
  144. new Rskinvagos[3][1] =
  145. {
  146. {108},{109},{110}
  147. };
  148. new Rskinatz[3][1] =
  149. {
  150. {114},{115},{116}
  151. };
  152. new Rskintriade[3][1] =
  153. {
  154. {117},{118},{120}
  155. };
  156. new Rskinbikers[3][1] =
  157. {
  158. {247},{248},{254}
  159. };
  160. new Rskinpolizia[3][1] =
  161. {
  162. {280},{281},{284}
  163. };
  164. new Rskinmedici[3][1] =
  165. {
  166. {274},{275},{276}
  167. };
  168. new Rskincittadini[24][1] =
  169. {
  170. {101},{12},{13},{136},{14},{142},{144},{15}, {17},{170},{180},{182},{184},{185},{186},{20}, {206},{21},{22},{214},{223},{234},{250},{261}
  171. };
  172. new Proibite[][] =
  173. {
  174. "bastardo", "puttana", "dio", "madonna", "troia", "motherfucker", "bitch", "asshole"
  175. };
  176. new Spam[][] =
  177. {
  178. "www.", ".it", ".com", ".org"
  179. };
  180.  
  181. /*=============================Altro*/
  182. #define righe 5035
  183. #define aggiornamento "Quotidiano"
  184. #define versione "1.0.3c"
  185. #define VOTI_NECESSARI 8
  186. #define SOLDI_PAYDAY 300
  187.  
  188. /*==============================================================================Server Dos*/
  189. main()
  190. {
  191. print("\n--------------------------------------------------");
  192. print(" GangWar 1.0.3c by Francesco_Ronaldo / The_Blade");
  193. print(" Caricata con Successo!");
  194. print("--------------------------------------------------\n");
  195. }
  196.  
  197. public OnGameModeInit()
  198. {
  199. /*==========================================================================Generale*/
  200. SetGameModeText("GangWar 1.0.3c");
  201. AddPlayerClass(0, 2521.2009, -1475.4996 ,23.9941, 27.3088, 0, 0, 0, 0, 0, 0);
  202. EnableStuntBonusForAll(0);
  203. DisableInteriorEnterExits();
  204. ShowPlayerMarkers(0);
  205. AllowInteriorWeapons(true);
  206. ManualVehicleEngineAndLights();
  207. UpdateTime();
  208. SetTimer("UpdateTime", 1000 * 60, 1);
  209. SetTimer("PayDay", 1800000, true);
  210. for(new i = 0; i < MAX_VEHICLES; i++){ SetVehicleToRespawn(i);}
  211.  
  212. /*==========================================================================Veicoli*/
  213. LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
  214. LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
  215. LoadStaticVehiclesFromFile("vehicles/Veicoli_Groove.txt");
  216. LoadStaticVehiclesFromFile("vehicles/Veicoli_Ballas.txt");
  217. LoadStaticVehiclesFromFile("vehicles/Veicoli_Vagos.txt");
  218. LoadStaticVehiclesFromFile("vehicles/Veicoli_Atzecas.txt");
  219. LoadStaticVehiclesFromFile("vehicles/Veicoli_Triade.txt");
  220. LoadStaticVehiclesFromFile("vehicles/Veicoli_Bikers.txt");
  221. LoadStaticVehiclesFromFile("vehicles/Veicoli_Polizia.txt");
  222. LoadStaticVehiclesFromFile("vehicles/Veicoli_Medici.txt");
  223. //Admin
  224. eli_admin1 = AddStaticVehicle(487, 1291.2463, -786.8067, 96.6687, 112.3016, 166, 1);//Maverick Admin
  225. auto_admin1 = AddStaticVehicle(451, 1242.7451, -804.8408, 84.1406, 179.0912, 166, 1);//Turismo Admin
  226. auto_admin2 = AddStaticVehicle(411, 1248.2983, -804.3279, 84.1406, 185.6713, 166, 1);//Infernus Admin
  227. moto_admin1 = AddStaticVehicle(522, 1255.1449, -804.1754, 84.1406, 179.0912, 166, 1); //Moto privata Admin
  228. //Consegna
  229. veicoloconsegna1 = AddStaticVehicle(414, 780.9424, -1363.6980, 13.5365, 92.6315, 11, 11);
  230. veicoloconsegna2 = AddStaticVehicle(414, 781.0551, -1368.3329, 13.5366, 79.7847, 11, 11);
  231. veicoloconsegna3 = AddStaticVehicle(414, 780.9845, -1376.4435, 13.6139, 90.4381, 11, 11);
  232. veicoloconsegna4 = AddStaticVehicle(414, 770.8369, -1336.3174, 13.5364, 182.5590, 11, 11);
  233. veicoloconsegna5 = AddStaticVehicle(414, 765.8628, -1336.9015, 13.5351, 182.5590, 11, 11);
  234. veicoloconsegna6 = AddStaticVehicle(414, 783.3825, -1347.7689, 13.2448, 90.3079, 11, 11);
  235. veicoloconsegna7 = AddStaticVehicle(414, 783.3726, -1356.8368, 13.4375, 272.7029, 11, 11);
  236. //Pizzaboy
  237. pizzaboy1 = AddStaticVehicle(448, 2097.7898, -1812.9028, 13.3828, 91.0419, 151, 1);
  238. pizzaboy2 = AddStaticVehicle(448, 2097.9609, -1815.6866, 13.3828, 87.9086, 151, 1);
  239. pizzaboy3 = AddStaticVehicle(448, 2097.5603, -1818.2117, 13.3828, 90.1019, 151, 1);
  240. pizzaboy4 = AddStaticVehicle(448, 2097.8145, -1821.0215, 13.3828, 90.1019, 151, 1);
  241. pizzaboy5 = AddStaticVehicle(448, 2097.8708, -1801.4630, 13.3828, 92.6086, 151, 1);
  242. pizzaboy6 = AddStaticVehicle(448, 2097.5530, -1799.1718, 13.3889, 82.2685, 151, 1);
  243. pizzaboy7 = AddStaticVehicle(448, 2096.7837, -1796.5861, 13.3889, 92.6086, 151, 1);
  244. //Venditore HotDog
  245. hotdog1 = AddStaticVehicle(588, 1212.7352, -877.1066, 42.4861, 184.2732, 1, 0);
  246. hotdog2 = AddStaticVehicle(588, 1216.8407, -875.6584, 42.4739, 179.6949, 1, 0);
  247. hotdog3 = AddStaticVehicle(588, 1220.5930, -872.9952, 42.4667, 183.2418, 1, 0);
  248. hotdog4 = AddStaticVehicle(588, 1207.5348, -876.3549, 42.4880, 191.9818, 1, 0);
  249. /*Veicoli da affittare
  250. AddStaticVehicle(510, 1109.2578, -1382.5623, 13.7813, 181.6183, 0, 0); // affitta veicolo 1
  251. AddStaticVehicle(510, 1106.2860, -1383.4672, 13.7813, 180.3650, 0, 0); // affitta veicolo 2
  252. AddStaticVehicle(510, 1106.0280, -1381.4001, 13.7813, 183.1850, 0, 0); // affitta veicolo 3
  253. AddStaticVehicle(510, 1103.9633, -1383.8191, 13.7813, 185.3784, 0, 0); // affitta veicolo 4
  254. AddStaticVehicle(462, 1104.2202, -1380.4529, 13.7813, 176.9183, 0, 0); // affitta veicolo 5
  255. AddStaticVehicle(462, 1101.4409, -1383.5104, 13.7813, 178.7983, 0, 0); // affitta veicolo 6
  256. AddStaticVehicle(586, 1101.5391, -1379.5109, 13.7813, 178.4850, 0, 0); // affitta veicolo 7
  257. AddStaticVehicle(586, 1098.9530, -1382.9902, 13.7878, 183.4984, 0, 0); // affitta veicolo 8
  258. AddStaticVehicle(521, 1096.0002, -1383.5317, 13.7878, 183.4984, 0, 0); // affitta veicolo 9
  259. AddStaticVehicle(521, 1091.5355, -1382.4917, 13.7813, 178.7983, 0, 0); // affitta veicolo 10
  260. AddStaticVehicle(575, 1087.0264, -1382.5604, 13.7813, 177.8583, 0, 0); // affitta veicolo 11
  261. AddStaticVehicle(542, 1085.1398, -1370.7142, 13.7813, 182.2216, 0, 0); // affitta veicolo 12
  262. AddStaticVehicle(467, 1090.1141, -1374.7758, 13.7813, 181.9083, 0, 0); affitta veicolo 13*/
  263.  
  264.  
  265. /*==========================================================================Pickups*/
  266. PickDisco = CreatePickup(1318, 1, 1836.0126, -1683.2328, 13.3657, 0); //Discoteca
  267. PickBurgershot = CreatePickup(1318, 1, 1199.4087, -919.3823, 43.1128, 0); //Burgershot
  268. PickPizzeria = CreatePickup(1318, 1, 2104.8066, -1806.3562, 13.5547, 0); //Pizzeria
  269. PickBinco = CreatePickup(1318, 1, 2244.4541, -1664.9598, 15.4766, 0); //Binco
  270. PickProLaps = CreatePickup(1318, 1, 499.8427, -1360.2126, 16.3287, 0); //ProLaps
  271. PickBanca = CreatePickup(1318, 1, 1657.8302, -1395.7705, 13.5469, 0); //Banca
  272. PickAmmunation = CreatePickup(1318, 1, 1368.3346, -1279.8079, 13.5469, 0); //Ammunation
  273. PickBGroove1 = CreatePickup(1318, 1, 2459.4397, -1690.9667, 13.5455, 0); //Base Groove 1
  274. PickBGroove2 = CreatePickup(1318, 1, 2495.2207, -1690.6324, 14.7656, 0); //Base Groove 2
  275. PickBBallas = CreatePickup(1318, 1, 2000.1630, -1114.9568, 27.1250, 0); //Base Ballas
  276. PickBVagos = CreatePickup(1318, 1, 2352.0879, -1170.2889, 28.0564, 0); //Base Vagos
  277. PickBPolizia = CreatePickup(1318, 1, 1554.5031, -1675.5303, 16.1953, 0); //Stazione Polizia
  278. PickBBikers = CreatePickup(1318, 1, 962.0483, -1824.2063, 13.3268, 0); //Base Bikers
  279. PickBTriade = CreatePickup(1318, 1, 363.9694, -1601.4688, 31.9817, 0); //Base Triade
  280. PickBAtzecas = CreatePickup(1318, 1, 1935.0416, -2081.3706, 13.5622, 0); //Base Atzecas
  281. PickIBanca = CreatePickup(1274, 1, 2316.1282, -10.0103, 26.7422, 0); //Interagisci Banca
  282. IDroga1 = CreatePickup(1274, 1, 2325.4238, -1252.2784, 22.5000, 0); //Interagisci Droga 1
  283. IDroga2 = CreatePickup(1274, 1, 1394.6309, -1460.5256, 11.6406, 0); //Interagisci Droga 2
  284. IDroga3 = CreatePickup(1274, 1, 975.9379, -1286.6793, 13.5540, 0); //Interagisci Droga 3
  285. IPizzeria = CreatePickup(1274, 1, 374.5851, -119.1880, 1001.4995, 0); //Interagisci pizzeria
  286. IBurgershot = CreatePickup(1274, 1, 376.7253, -67.7049, 1001.5151, 0); //Interagisci Bshot
  287. IDisco = CreatePickup(1274, 1, 499.4358, -20.5824, 1000.6797, 0); //Interagisci Discoteca
  288. IBinco = CreatePickup(1274, 1, 217.3809, -98.3706, 1005.2578, 0); //Interagisci Binco
  289. IProlaps = CreatePickup(1274, 1, 199.5624, -127.6274, 1003.5152, 0); //Interagisci Prolaps
  290. IAmmunation = CreatePickup(1274, 1, 308.2633, -141.1325, 999.6016, 0); //Interagisci Ammunation
  291. Resp1 = CreatePickup(1314, 1, 1575.5601, -1636.0497, 13.5510, 0); //Cambia area respawn 1
  292. Resp2 = CreatePickup(1314, 1, 2231.8052, -1333.4749, 23.98169, 0); //Cambia area respawn 2
  293. Resp3 = CreatePickup(1314, 1, 2004.9958, -1443.7739, 13.5625, 0); //Cambia area respawn 3
  294. Resp4 = CreatePickup(1314, 1, 1182.2101, -1324.9923, 13.5817, 0); //Cambia area respawn 4
  295. Resp5 = CreatePickup(1314, 1, 731.9648, -1275.7582, 13.5664, 0); //Cambia area respawn 5
  296. Resp6 = CreatePickup(1314, 1, 153.7769, -1942.7628, 3.7734, 0); //Cambia area respawn 6
  297. PickComune = CreatePickup(1318, 1, 1480.6362, -1770.8400, 18.7958, 0);//Entra Comune
  298. IComune = CreatePickup(1239, 1, 362.6935, 173.6410, 1008.3828, 0);//Interagisci Comune
  299. HotD = CreatePickup(1239, 1, 1216.4849, -884.0098, 42.9072, 0);//Interagisci lavoro
  300. PizzaB = CreatePickup(1239, 1, 2093.7961, -1816.8896, 13.3828, 0);//Interagisci lavoro
  301. Camionisti = CreatePickup(1239, 1, 774.3252, -1362.6146, 13.5284, 0);//Interagisci lavoro
  302.  
  303. /*==========================================================================3DTextLabels*/
  304. //Negozi
  305. Create3DTextLabel("[{F97804}Discoteca{FFFFFF}]", COLORE_TRIADE, 1836.0126, -1683.2328, 13.3657, 40, 0);
  306. Create3DTextLabel("[{F97804}Burger Shot{FFFFFF}]", COLORE_TRIADE, 1199.4087, -919.3823, 43.1128, 40, 0);
  307. Create3DTextLabel("[{F97804}Well Stacked Pizza{FFFFFF}]", COLORE_TRIADE, 2104.8066, -1806.3562, 13.5547, 40, 0);
  308. Create3DTextLabel("[{F97804}Binco{FFFFFF}]", COLORE_TRIADE, 2244.4541, -1664.9598, 15.4766, 40, 0);
  309. Create3DTextLabel("[{F97804}ProLaps{FFFFFF}]", COLORE_TRIADE, 499.8427, -1360.2126, 16.3287, 40, 0);
  310. Create3DTextLabel("[{F97804}Banca di Stato{FFFFFF}]", COLORE_TRIADE, 1657.8302, -1395.7705, 13.5469, 40, 0);
  311. Create3DTextLabel("[{F97804}Ammunation{FFFFFF}]", COLORE_TRIADE, 1368.3346, -1279.8079, 13.5469, 40, 0);
  312. Create3DTextLabel("[{F97804}Base Groove{FFFFFF}]", COLORE_TRIADE, 2459.4397, -1690.9667, 13.5455, 40, 0);
  313. Create3DTextLabel("[{F97804}Base Groove{FFFFFF}]", COLORE_TRIADE, 2495.2207, -1690.6324, 14.7656, 40, 0);
  314. Create3DTextLabel("[{F97804}Base Ballas{FFFFFF}]", COLORE_TRIADE, 2000.1630, -1114.9568, 27.1250, 40, 0);
  315. Create3DTextLabel("[{F97804}Base Vagos{FFFFFF}]", COLORE_TRIADE, 2352.0879, -1170.2889, 28.0564, 40, 0);
  316. Create3DTextLabel("[{F97804}Stazione di polizia{FFFFFF}]", COLORE_TRIADE, 1554.5031, -1675.5303, 16.1953, 40, 0);
  317. Create3DTextLabel("[{F97804}Base Bikers{FFFFFF}]", COLORE_TRIADE, 962.0483, -1824.2063, 13.3268, 40, 0);
  318. Create3DTextLabel("[{F97804}Base Triade{FFFFFF}]", COLORE_TRIADE, 363.9694, -1601.4688, 31.9817, 40, 0);
  319. Create3DTextLabel("[{F97804}Base Atzecas{FFFFFF}]", COLORE_TRIADE, 1935.0416,- 2081.3706, 13.5622, 40, 0);
  320. Create3DTextLabel("[{F97804}Comune di Los Santos{FFFFFF}]", COLORE_TRIADE, 1480.6362, -1770.8400, 18.7958, 40, 0);
  321. Create3DTextLabel("[{F97804}Comune di Los Santos{FFFFFF}]", COLORE_TRIADE, 1480.6362, -1770.8400, 18.7958, 40, 0);
  322. Create3DTextLabel("[{F97804}Pizzaboy{FFFFFF}]", COLORE_TRIADE, 2092.9856, -1798.6075, 13.3828, 40, 0);
  323. Create3DTextLabel("[{F97804}Pizzaboy{FFFFFF}]", COLORE_TRIADE, 2093.7961, -1816.8896, 13.3828, 40, 0);
  324. Create3DTextLabel("[{F97804}Venditore HotDog{FFFFFF}]", COLORE_TRIADE, 1216.4849, -884.0098, 42.9072, 40, 0);
  325. Create3DTextLabel("[{F97804}Camionista{FFFFFF}]", COLORE_TRIADE, 774.3252, -1362.6146, 13.5284, 40, 0);
  326.  
  327. //Esci
  328. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 493.5561, -24.4094, 1000.6797, 8, 0);
  329. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 363.4143, -74.8518, 1001.5078, 8, 0);
  330. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 372.3421, -133.2352, 1001.4922, 8, 0);
  331. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 318.5674, 1114.9526, 1083.8828, 8, 0);
  332. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2305.3340, -16.0902, 26.7422, 8, 0);
  333. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 315.6836, -142.7931, 999.6016, 8, 0);
  334. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2455.6248, -1706.5425, 1013.5078, 8, 0);
  335. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2496.1160, -1692.2500, 1014.7422, 8, 0);
  336. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_GROOVE, 207.0748, -140.1034, 1003.5078, 8, 0);
  337. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 207.8046, -111.0572, 1005.1328, 8, 0);
  338. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2807.5852, -1174.6793, 1025.5703, 8, 0);
  339. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 962.3438, -1821.0420, 515.8799, 8, 0);
  340. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 774.0907, -50.1249, 1000.5859, 8, 0);
  341. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 1927.4575, -2084.3145, 441.1686, 8, 0);
  342. Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 207.0748, -140.1034, 1003.5078, 8, 0);
  343. //Interagisci
  344. Create3DTextLabel("[{F97804}Banca di Stato{FFFFFF}]", COLORE_TRIADE, 2316.1282, -10.0103, 26.7422, 10, 0);
  345. Create3DTextLabel("[{F97804}Spacciatore{FFFFFF}]", COLORE_TRIADE, 2325.4238, -1252.2784, 22.5000, 10, 0);
  346. Create3DTextLabel("[{F97804}Spacciatore{FFFFFF}]", COLORE_TRIADE, 1394.6309, -1460.5256, 11.6406, 10, 0);
  347. Create3DTextLabel("[{F97804}Spacciatore{FFFFFF}]", COLORE_TRIADE, 975.9379, -1286.6793, 13.5540, 10, 0);
  348. Create3DTextLabel("[{F97804}Well Stacked Pizza{FFFFFF}]", COLORE_TRIADE, 374.5851, -119.1880, 1001.4995, 10, 0);
  349. Create3DTextLabel("[{F97804}Burger Shot{FFFFFF}]", COLORE_TRIADE, 376.7253, -67.7049, 1001.5151, 10, 0);
  350. Create3DTextLabel("[{F97804}Discoteca{FFFFFF}]", COLORE_TRIADE, 499.4358, -20.5824, 1000.6797, 10, 0);
  351. Create3DTextLabel("[{F97804}Binco{FFFFFF}]", COLORE_TRIADE, 217.3809, -98.3706, 1005.2578, 10, 0);
  352. Create3DTextLabel("[{F97804}ProLaps{FFFFFF}]", COLORE_TRIADE, 199.5624, -127.6274, 1003.5152, 10, 0);
  353. Create3DTextLabel("[{F97804}Ammunation{FFFFFF}]", COLORE_TRIADE, 308.2633, -141.1325, 999.6016, 10, 0);
  354. Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 1575.5601, -1636.0497, 13.5510, 40, 0);
  355. Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 2231.8052, -1333.4749, 23.98169, 40, 0);
  356. Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 2004.9958, -1443.7739, 13.5625, 40, 0);
  357. Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 1182.2101, -1324.9923, 13.5817, 40, 0);
  358. Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 731.9648, -1275.7582, 13.5664, 40, 0);
  359. Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 153.7769, -1942.7628, 3.7734, 40, 0);
  360. Create3DTextLabel("[{F97804}Lavori{FFFFFF}]", COLORE_TRIADE, 362.6935, 173.6410, 1008.3828, 40, 0);
  361.  
  362. /*==========================================================================GangZones*/
  363. ZonaGroove = GangZoneCreate(2265.644, -1839.771, 2562.265, -1610.802);
  364. ZonaBallas = GangZoneCreate(1832.12, -1271.297, 2113.53, -1022.589);
  365. ZonaVagos = GangZoneCreate(2265.644, -1346.304, 2505.222, -1144.969);
  366. ZonaAtzecas = GangZoneCreate(1782.684, -2171.382, 2067.896, -2017.42);
  367. ZonaBikers = GangZoneCreate(793.9462, -1863.458, 1098.173, -1709.496);
  368. ZonaTriade = GangZoneCreate(288.169, -1602.907, 584.7902, -1429.206);
  369.  
  370. /*==========================================================================Objects*/
  371. //Base Bikers
  372. CreateObject(14718, 959.1611328125, -1813.13671875, 514.87213134766, 0, 0, 2.0269775390625);
  373. CreateObject(2670, 971.66772460938, -1813.2768554688, 514.97198486328, 0, 0, 0);
  374. CreateObject(14556, 964.56146240234, -1811.5073242188, 516.40246582031, 0, 0, 180.54052734375);
  375. CreateObject(15037, 968.62274169922, -1817.41796875, 515.28692626953, 0, 0, 27.789794921875);
  376. CreateObject(1713, 971.28576660156, -1813.2219238281, 514.87994384766, 0, 0, 320.30029296875);
  377. CreateObject(1713, 967.87548828125, -1814.0114746094, 514.87994384766, 0, 0, 37.709838867188);
  378. CreateObject(2032, 959.96343994141, -1815.9769287109, 514.87994384766, 0, 0, 89.324493408203);
  379. CreateObject(14820, 959.86029052734, -1815.4837646484, 515.78912353516, 0, 0, 89.324493408203);
  380. CreateObject(1671, 958.81884765625, -1815.3891601563, 515.34014892578, 0, 0, 87.339508056641);
  381. CreateObject(2672, 921.25244140625, -1787.7060546875, 438.35656738281, 0, 0, 0);
  382. CreateObject(2672, 961.35723876953, -1811.8553466797, 515.15942382813, 0, 0, 0);
  383. CreateObject(2672, 971.564453125, -1816.0191650391, 515.15942382813, 0, 0, 0);
  384. CreateObject(2673, 968.99432373047, -1815.5743408203, 514.9677734375, 0, 0, 0);
  385. CreateObject(2670, 962.98101806641, -1814.6876220703, 514.97198486328, 0, 0, 0);
  386. CreateObject(2672, 965.08728027344, -1815.5263671875, 515.15942382813, 0, 0, 0);
  387. CreateObject(2232, 964.16467285156, -1810.9030761719, 515.47784423828, 0, 0, 0);
  388. CreateObject(2232, 965.1630859375, -1810.857421875, 515.47784423828, 0, 0, 0);
  389. CreateObject(920, 956.73779296875, -1815.0561523438, 515.36474609375, 0, 0, 0);
  390. CreateObject(2229, 958.68109130859, -1817.2332763672, 514.87994384766, 0, 0, 89.324493408203);
  391. CreateObject(2229, 960.22686767578, -1813.7564697266, 514.87994384766, 0, 0, 91.309265136719);
  392. CreateObject(1829, 956.14166259766, -1813.2277832031, 515.34448242188, 0, 0, 103.21948242188);
  393. CreateObject(2099, 957.91375732422, -1810.7674560547, 514.87994384766, 0, 0, 0);
  394. //Base Atzecas
  395. CreateObject(14755, 1935.603515625, -2084.255859375, 441.41864013672, 0, 0, 89.324340820313);
  396. CreateObject(1441, 1919.3969726563, -2086.5070800781, 440.82778930664, 0, 0, 266.70568847656);
  397. CreateObject(1431, 1912.6917724609, -2079.970703125, 440.72375488281, 0, 0, 47.639770507813);
  398. CreateObject(12954, 1905.5583496094, -2087.4692382813, 440.76171875, 0, 0, 92.026611328125);
  399. CreateObject(2670, 1917.0161132813, -2085.26953125, 440.26068115234, 0, 0, 0);
  400. CreateObject(2673, 1913.0454101563, -2082.3813476563, 440.25646972656, 0, 0, 0);
  401. CreateObject(2675, 1916.7957763672, -2082.4489746094, 440.23291015625, 0, 0, 21.834838867188);
  402. CreateObject(2675, 1918.3037109375, -2079.85546875, 440.23291015625, 0, 0, 45.649719238281);
  403. CreateObject(2677, 1914.1245117188, -2080.7888183594, 440.44064331055, 0, 0, 0);
  404. CreateObject(913, 1919.0458984375, -2079.0798339844, 441.00784301758, 0, 0, 0);
  405. CreateObject(1812, 1912.6246337891, -2074.5092773438, 440.16864013672, 0, 0, 0);
  406. CreateObject(2103, 1912.7875976563, -2079.8989257813, 441.28131103516, 0, 0, 45.65478515625);
  407. CreateObject(2316, 1919.4119873047, -2076.9484863281, 441.01840209961, 0, 0, 246.85583496094);
  408. CreateObject(2827, 1920.8109130859, -2085.7495117188, 440.16864013672, 0, 0, 0);
  409. CreateObject(1728, 1917.0922851563, -2072.8369140625, 440.16864013672, 0, 0, 326.25524902344);
  410. CreateObject(1729, 1914.0709228516, -2076.2905273438, 440.17614746094, 0, 0, 85.3544921875);
  411. CreateObject(2346, 1919.3681640625, -2076.4436035156, 440.17614746094, 0, 0, 248.8408203125);
  412. CreateObject(2673, 1918.7795410156, -2075.2626953125, 440.25646972656, 0, 0, 0);
  413. CreateObject(2677, 1913.7084960938, -2073.3720703125, 440.44064331055, 0, 0, 0);
  414. CreateObject(2860, 1912.5043945313, -2072.849609375, 440.6432800293, 0, 0, 39.699768066406);
  415. CreateObject(2857, 1916.2197265625, -2075.8957519531, 440.16864013672, 0, 0, 0);
  416. CreateObject(2840, 1913.1174316406, -2076.1069335938, 440.17614746094, 0, 0, 0);
  417. CreateObject(2675, 1916.0953369141, -2074.0703125, 440.23291015625, 0, 0, 344.1201171875);
  418. CreateObject(1829, 1922.8729248047, -2076.8361816406, 440.63317871094, 0, 0, 0);
  419. CreateObject(2100, 1925.8868408203, -2080.0874023438, 440.17614746094, 0, 0, 268.69067382813);
  420. CreateObject(14861, 1924.9477539063, -2077.3901367188, 440.62316894531, 0, 0, 358.01501464844);
  421. CreateObject(11102, 1928.4118652344, -2084.7258300781, 442.33392333984, 0, 0, 358.01501464844);
  422. CreateObject(14638, 1928.1791992188, -2085.0832519531, 440.19650268555, 0, 0, 0);
  423. CreateObject(2232, 1917.5754394531, -2077.4716796875, 440.76651000977, 0, 0, 238.91589355469);
  424. CreateObject(2232, 1916.5341796875, -2072.2421875, 440.76651000977, 0, 0, 304.41870117188);
  425. return 1;
  426. }
  427.  
  428. public OnGameModeExit()
  429. {
  430. /*==============================================================================Server Dos*/
  431. print("\n--------------------------------------------------");
  432. print(" GangWar 1.0.3c by Francesco_Ronaldo / The_Blade");
  433. print(" Non caricata!");
  434. print("--------------------------------------------------\n");
  435. return 1;
  436. }
  437.  
  438. public OnPlayerRequestClass(playerid, classid)
  439. {
  440. return 1;
  441. }
  442.  
  443. public OnPlayerConnect(playerid)
  444. {
  445. /*==========================================================================Messaggio Iniziale*/
  446. new ora, minuti;
  447. gettime(ora, minuti);
  448. SetPlayerTime(playerid, ora, minuti);
  449. SetTimerEx("Telecamera", 100, false, "d", playerid);
  450. GetPlayerIp(playerid, Ip, 16);
  451. new nome[24];
  452. GetPlayerName(playerid, nome, 24);
  453. SendClientMessage(playerid, COLORE_GROOVE, "__________________________{FFFFFF}__________________________{FF4444}__________________________");
  454. SendClientMessage(playerid, COLORE_ERRORE, "");
  455. format(stringa, sizeof stringa, "Benvenuto {FFFF00}%s{FFFFFF}, ti sei connesso alle {FFFF00}%02d{FFFFFF}:{FFFF00}%02d {FFFFFF}con Ip: {FFFF00}%s", nome, ora, minuti, Ip);
  456. SendClientMessage(playerid, COLORE_TRIADE, stringa);
  457. SendClientMessage(playerid, COLORE_TRIADE, "Gamemode scriptata interamente da {FFFF00}Francesco_Ronaldo{FFFFFF}:");
  458. format(stringa, sizeof stringa, "Numero di righe: {FFFF00}%d{FFFFFF} Aggiornamento: {FFFF00}%s{FFFFFF} Versione: {FFFF00}%s{FFFFFF}", righe, aggiornamento, versione);
  459. SendClientMessage(playerid, COLORE_TRIADE, stringa);
  460. SendClientMessage(playerid, COLORE_GROOVE, "__________________________{FFFFFF}__________________________{FF4444}__________________________");
  461. PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
  462. GameTextForPlayer(playerid, "~r~Benvenuto!", 6000, 1);
  463. //Bools
  464. Votato[playerid] = false;
  465. Rapinatore[playerid] = false;
  466. AFK[playerid] = false;
  467. PostoDiBlocco[playerid] = false;
  468.  
  469. /*==========================================================================Icone*/
  470. SetPlayerMapIcon(playerid, 1, 1836.0126, -1683.2328, 13.3657, 49, 0, MAPICON_LOCAL); //Discoteca
  471. SetPlayerMapIcon(playerid, 2, 1199.4087, -919.3823, 43.1128, 10, 0, MAPICON_LOCAL); //BurgerShot
  472. SetPlayerMapIcon(playerid, 3, 2104.8066, -1806.3562, 13.5547, 29, 0, MAPICON_LOCAL); //Pizzeria
  473. SetPlayerMapIcon(playerid, 4, 2244.4541, -1664.9598, 15.4766, 45, 0, MAPICON_LOCAL); //Binco
  474. SetPlayerMapIcon(playerid, 5, 499.8427, -1360.2126, 16.3287, 45, 0, MAPICON_LOCAL); //ProLaps
  475. SetPlayerMapIcon(playerid, 6, 1657.8302, -1395.7705, 13.5469, 52, 0, MAPICON_LOCAL); //Banca
  476. SetPlayerMapIcon(playerid, 7, 1367.1731, -1279.3574, 13.5469, 6, 0, MAPICON_LOCAL); //Ammunation
  477. SetPlayerMapIcon(playerid, 8, 2459.4397, -1690.9667, 13.5455, 62, 0, MAPICON_LOCAL); //Base Groove 1 (ryder)
  478. SetPlayerMapIcon(playerid, 9, 2495.2207, -1690.6324, 14.7656, 62, 0, MAPICON_LOCAL); //Base Groove 2 (cj)
  479. SetPlayerMapIcon(playerid, 10, 2000.1630, -1114.9568, 27.1250, 59, 0, MAPICON_LOCAL); //Base Ballas
  480. SetPlayerMapIcon(playerid, 11, 2352.0879, -1170.2889, 28.0564, 60, 0, MAPICON_LOCAL); //Base Vagos
  481. SetPlayerMapIcon(playerid, 12, 1554.5031, -1675.5303, 16.1953, 30, 0, MAPICON_LOCAL); //Stazione Polizia
  482. SetPlayerMapIcon(playerid, 13, 962.0483, -1824.2063, 13.3268, 60, 0, MAPICON_LOCAL); //Base Bikers
  483. SetPlayerMapIcon(playerid, 14, 363.9694, -1601.4688, 31.9817, 44, 0, MAPICON_LOCAL); //Base Triade
  484. SetPlayerMapIcon(playerid, 15, 1935.0416, -2081.3706, 13.5622, 58, 0, MAPICON_LOCAL); //Base Atzecas
  485. SetPlayerMapIcon(playerid, 16, 780.9424, -1363.6980, 13.5365, 51, 0, MAPICON_LOCAL); //Lavoro Camionista
  486. SetPlayerMapIcon(playerid, 17, 1477.8528, -1756.7296, 17.5313, 56, 0, MAPICON_LOCAL); //Comune
  487. SetPlayerMapIcon(playerid, 18, 2097.7898, -1812.9028, 13.3828, 51, 0, MAPICON_LOCAL); //Lavoro pizzaboy
  488. SetPlayerMapIcon(playerid, 19, 1212.7352, -877.1066, 42.4861, 51, 0, MAPICON_LOCAL); //Lavoro Hotdog
  489.  
  490. /*==========================================================================GangZones*/
  491. GangZoneShowForPlayer(playerid, ZonaGroove, 0x33AA3399);
  492. GangZoneShowForPlayer(playerid, ZonaBallas, 0x800080AA);
  493. GangZoneShowForPlayer(playerid, ZonaVagos, 0xFFFF0099);
  494. GangZoneShowForPlayer(playerid, ZonaAtzecas, 0x00BFFFAA);
  495. GangZoneShowForPlayer(playerid, ZonaBikers, 0xF9780499);
  496. GangZoneShowForPlayer(playerid, ZonaTriade, 0xFFFFFFAA);
  497.  
  498. /*==========================================================================File Dini*/
  499. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  500. if(!fexist(pFile))
  501. {
  502. GetPlayerName(playerid, nome, 24);
  503. format(stringa, sizeof(stringa), "{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\n{FFFFFF}Non sei registrato.\nPer giocare è necessario registrare il proprio account.\nRegistrandoti, accetti le regole del Server.\n\nInserisci una {FF4444}password{FFFFFF} per registrarti.", nome);
  504. ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
  505. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è arrivato per la prima volta a Los Santos.", nome);
  506. SendClientMessageToAll(BLU_CHIARO, stringa);
  507. }
  508. else if(fexist(pFile))
  509. {
  510. //Se è stato bannato precedentemente
  511. if(dini_Int(pFile, "Bannato") == 1)
  512. {
  513. PlayerInfo[playerid][Bannato] = 1;
  514. GetPlayerName(playerid, nome, 24);
  515. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Bannato in precedenza{00BFFF}]", nome);
  516. SendClientMessageToAll(BLU_CHIARO, stringa);
  517. SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato kickato. Motivo: {33AA33}Bannato in precedenza{FFFFFF}.");
  518. Kick(playerid);
  519. }
  520. GetPlayerName(playerid, nome, 24);
  521. format(stringa, sizeof(stringa), "{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\nIl tuo Account risulta registrato.\n\n{FFFFFF}Inserisci la {FF4444}password{FFFFFF} per fare il Login.", nome);
  522. ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
  523. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è rientrato a Los Santos.", nome);
  524. SendClientMessageToAll(BLU_CHIARO, stringa);
  525. }
  526. return 1;
  527. }
  528.  
  529. public OnPlayerDisconnect(playerid, reason)
  530. {
  531. SalvaAccount(playerid);
  532. Avvisi[playerid] = 0;
  533. if(Rapinatore[playerid] == true) Rapinatore[playerid] = false; RapinaAttiva = false;
  534. if(PostoDiBlocco[playerid] == true) DestroyObject(Blocco[playerid]);
  535. Votato[playerid] = false;
  536. new nome[24];
  537. GetPlayerName(playerid, nome, 24);
  538. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito da Los Santos.", nome); //Messaggio a tutti
  539. SendClientMessageToAll(BLU_CHIARO, stringa);
  540. return 1;
  541. }
  542.  
  543. public OnPlayerSpawn(playerid)
  544. {
  545. PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
  546. /*==========================================================================Respawn dopo la morte*/
  547. if(Morto[playerid] == true)
  548. {
  549. if(GetPlayerTeam(playerid) == Groove)
  550. {
  551. SetPlayerInterior(playerid, 0);
  552. SetCameraBehindPlayer(playerid);
  553. GivePlayerWeapon(playerid, 5, 1);
  554. GivePlayerWeapon(playerid, 28, 400);
  555. GivePlayerWeapon(playerid, 25, 500);
  556. SetPlayerSkin(playerid, Skin);
  557. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2496.1279, -1683.8066, 13.3645);}
  558. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  559. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  560. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  561. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  562. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  563. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  564. Morto[playerid] = false;
  565. }
  566. if(GetPlayerTeam(playerid) == Ballas)
  567. {
  568. SetPlayerInterior(playerid, 0);
  569. SetCameraBehindPlayer(playerid);
  570. GivePlayerWeapon(playerid, 1, 1);
  571. GivePlayerWeapon(playerid, 32, 450);
  572. GivePlayerWeapon(playerid, 22, 400);
  573. SetPlayerSkin(playerid, Skin);
  574. Morto[playerid] = false;
  575. }
  576. if(GetPlayerTeam(playerid) == Vagos)
  577. {
  578. SetPlayerInterior(playerid, 0);
  579. SetCameraBehindPlayer(playerid);
  580. GivePlayerWeapon(playerid, 6, 1);
  581. GivePlayerWeapon(playerid, 26, 400);
  582. GivePlayerWeapon(playerid, 28, 450);
  583. SetPlayerSkin(playerid, Skin);
  584. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2323.1489, -1192.1659, 27.9693);}
  585. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  586. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  587. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  588. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  589. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  590. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  591. Morto[playerid] = false;
  592.  
  593. }
  594. if(GetPlayerTeam(playerid) == Atzecas)
  595. {
  596. SetPlayerInterior(playerid, 0);
  597. SetCameraBehindPlayer(playerid);
  598. GivePlayerWeapon(playerid, 7, 1);
  599. GivePlayerWeapon(playerid, 32, 450);
  600. GivePlayerWeapon(playerid, 33, 400);
  601. TogglePlayerControllable(playerid, 1);
  602. SetPlayerSkin(playerid, Skin);
  603. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1931.7733, -2110.7942, 13.6953);}
  604. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  605. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  606. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  607. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  608. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  609. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  610. Morto[playerid] = false;
  611. }
  612. if(GetPlayerTeam(playerid) == Triade)
  613. {
  614. SetPlayerInterior(playerid, 0);
  615. SetCameraBehindPlayer(playerid);
  616. GivePlayerWeapon(playerid, 8, 1);
  617. GivePlayerWeapon(playerid, 24, 400);
  618. GivePlayerWeapon(playerid, 28, 500);
  619. SetPlayerSkin(playerid, Skin);
  620. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 327.4093, -1515.8767, 36.0391);}
  621. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  622. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  623. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  624. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  625. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  626. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  627. Morto[playerid] = false;
  628. }
  629. if(GetPlayerTeam(playerid) == Bikers)
  630. {
  631. SetPlayerInterior(playerid, 0);
  632. SetCameraBehindPlayer(playerid);
  633. GivePlayerWeapon(playerid, 4, 1);
  634. GivePlayerWeapon(playerid, 30, 350);
  635. GivePlayerWeapon(playerid, 25, 500);
  636. SetPlayerSkin(playerid, Skin);
  637. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 973.5109, -1829.7964, 13.3227);}
  638. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  639. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  640. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  641. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  642. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  643. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  644. Morto[playerid] = false;
  645. }
  646. if(GetPlayerTeam(playerid) == Polizia)
  647. {
  648. SetPlayerInterior(playerid, 0);
  649. SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
  650. SetCameraBehindPlayer(playerid);
  651. GivePlayerWeapon(playerid, 3, 1);
  652. GivePlayerWeapon(playerid, 23, 600);
  653. GivePlayerWeapon(playerid, 27, 600);
  654. SetPlayerSkin(playerid, Skin);
  655. SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
  656. Morto[playerid] = false;
  657. }
  658. if(GetPlayerTeam(playerid) == Medici)
  659. {
  660. SetPlayerInterior(playerid, 0);
  661. SetPlayerSkin(playerid, Skin);
  662. SetCameraBehindPlayer(playerid);
  663. SetPlayerPos(playerid, 2029.9830, -1409.9507, 16.9989);
  664. Morto[playerid] = false;
  665. }
  666. if(GetPlayerTeam(playerid) == Cittadini)
  667. {
  668. SetPlayerInterior(playerid, 0);
  669. SetCameraBehindPlayer(playerid);
  670. SetPlayerSkin(playerid, Skin);
  671. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1188.4009,- 1326.9329, 13.5598);}
  672. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  673. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  674. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  675. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  676. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  677. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  678. }
  679. //Respawn Admin
  680. if(IsPlayerAdmin(playerid))
  681. {
  682. SetPlayerPos(playerid, 1251.1160, -816.1332, 84.1478);
  683. SetPlayerSkin(playerid, 217);
  684. }
  685. //Respawn Jailato
  686. if(Jailato[playerid] == true)
  687. {
  688. ResetPlayerWeapons(playerid);
  689. SetPlayerInterior(playerid, 6);//Prigione
  690. SetPlayerPos(playerid, 264.5743, 77.5118, 1001.0391);//Prigione
  691. }
  692. }
  693. return 1;
  694. }
  695.  
  696. public OnPlayerDeath(playerid, killerid, reason)
  697. {
  698. FadePlayerScreen(playerid, 0xAA3333FF, 8);
  699. SetPlayerWantedLevel(playerid, 0);
  700. Morto[playerid] = true;
  701. Skin = GetPlayerSkin(playerid);
  702. PlayerInfo[playerid][pDeaths]++;
  703. new nome[24];
  704. banc = GetPlayerMoney(playerid);
  705. ResetPlayerMoney(playerid);
  706. new Float: bx, Float: by, Float: bz;
  707. Banconota[playerid] = CreatePickup(1212, 1, bx, by, bz, 0);
  708. //Scores, kills, deaths
  709. if(killerid != INVALID_PLAYER_ID)
  710. {
  711. PlayerInfo[killerid][pKills] ++;
  712. SendDeathMessage(killerid, playerid, reason);
  713. if(GetPlayerTeam(killerid) != Polizia)
  714. {
  715. if(PlayerInfo[killerid][pKills] == 5) SetPlayerWantedLevel(killerid, 1);
  716. if(PlayerInfo[killerid][pKills] == 15) SetPlayerWantedLevel(killerid, 2);
  717. if(PlayerInfo[killerid][pKills] == 30) SetPlayerWantedLevel(killerid, 3);
  718. if(PlayerInfo[killerid][pKills] >= 30) SetPlayerWantedLevel(killerid, 5);
  719. }
  720. /*======================================Rapina*/
  721. if(Rapinatore[playerid] == true)
  722. {
  723. Rapinatore[playerid] = false;
  724. RapinaAttiva = false;
  725. KillTimer(TimerRapina);
  726. new Float:x, Float: y, Float: z;
  727. GetPlayerPos(playerid, x, y, z);
  728. GetPlayerName(playerid, nome, 24);
  729. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha fallito una rapina in banca.", nome);
  730. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  731. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei stato ucciso durante una rapina e hai fallito.");
  732. }
  733.  
  734. /*======================================Anticheats*/
  735. //Anti weapons
  736. if(GetPlayerWeapon(killerid) == 35 || GetPlayerWeapon(killerid) == 36 || GetPlayerWeapon(killerid) == 37 || GetPlayerWeapon(killerid) == 38)
  737. {
  738. GetPlayerName(playerid, nome, 24);
  739. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato bannato dal Server. [Motivo: {FFFFFF}Uso di armi proibite{00BFFF}]", nome);
  740. SendClientMessageToAll(BLU_CHIARO, stringa);
  741. SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato bannato. Motivo: {33AA33}Uso di armi proibite{FFFFFF}.");
  742. PlayerInfo[killerid][Bannato] = 1;
  743. Ban(killerid);
  744. }
  745. //Anti-Helikill
  746. if(GetPlayerVehicleID(killerid) == 548 || GetPlayerVehicleID(killerid) == 417 ||GetPlayerVehicleID(killerid) == 487 || GetPlayerVehicleID(killerid) == 488 || GetPlayerVehicleID(killerid) == 563 || GetPlayerVehicleID(killerid) == 469)
  747. {
  748. SetPlayerHealth(killerid, 0.0);
  749. SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato ucciso. Motivo: {33AA33}Helikill{FFFFFF}.");
  750. }
  751. }
  752. else if(killerid == INVALID_PLAYER_ID)
  753. {
  754. SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
  755. if(Rapinatore[playerid] == true)
  756. {
  757. Rapinatore[playerid] = false;
  758. RapinaAttiva = false;
  759. KillTimer(TimerRapina);
  760. new Float:x, Float: y, Float: z;
  761. GetPlayerPos(playerid, x, y, z);
  762. GetPlayerName(playerid, nome, 24);
  763. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha fallito una rapina in banca.", nome);
  764. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  765. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei ucciso durante una rapina e hai fallito.");
  766. }
  767. }
  768. return 1;
  769. }
  770.  
  771. public OnVehicleSpawn(vehicleid)
  772. {
  773. return 1;
  774. }
  775.  
  776. public OnVehicleDeath(vehicleid, killerid)
  777. {
  778. Acceso[vehicleid] = false;
  779. return 1;
  780. }
  781.  
  782. public OnPlayerText(playerid, text[])
  783. {
  784. /*==============================================================================Anticheats*/
  785. //Anti Swear
  786. for(new a;a < sizeof(Proibite); a++)
  787. if(strfind(text, Proibite[a], true) != -1)
  788. {
  789. SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La tua frase contiene uno o più caratteri volgari riconosciuti dal Server.");
  790. return 0;
  791. }
  792. //Anti Spam
  793. for(new b; b < sizeof(Spam); b++)
  794. if(strfind(text, Spam[b], true) != -1)
  795. {
  796. new nome[24];
  797. GetPlayerName(playerid, nome, 24);
  798. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato bannato dal Server. [Motivo: {FFFFFF}Spam{00BFFF}]", nome);
  799. SendClientMessageToAll(BLU_CHIARO, stringa);
  800. SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato bannato. Motivo: {33AA33}Spam{FFFFFF}.");
  801. PlayerInfo[playerid][Bannato] = 1;
  802. Ban(playerid);
  803. return 0;
  804. }
  805.  
  806. /*==============================================================================TeamChat by Peppinux aka Peppe_Stasu*/
  807. if(text[0] == '#')
  808. {
  809. new nome[24];
  810. for(new i = 0; i < MAX_PLAYERS; i++)
  811. {
  812. if(IsPlayerConnected(i) && GetPlayerTeam(playerid) == GetPlayerTeam(i))
  813. {
  814. GetPlayerName(playerid, nome, 24);
  815. format(stringa, sizeof(stringa), "[TEAM]: %s{FFFFFF}: %s", nome, text[1]);
  816. SendClientMessage(i, BLU_CHIARO, stringa);
  817. }
  818. }
  819. return 0;
  820. }
  821.  
  822. return 1;
  823. }
  824.  
  825. public OnPlayerCommandText(playerid, cmdtext[])
  826. {
  827. if(Loggato[playerid] == false) return Kick(playerid);
  828. new cmd[256];
  829. new idx;
  830. new nome[24];
  831. new nomeid[24];
  832. cmd = strtok(cmdtext, idx);
  833. /*=======================================Kill*/
  834. if(!strcmp(cmdtext, "/kill", true))
  835. {
  836. if(GetPlayerWeapon(playerid) == 4)
  837. {
  838. new Float:x, Float: y, Float: z;
  839. GetPlayerPos(playerid, x, y, z);
  840. GetPlayerName(playerid, nome, 24);
  841. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} prende il coltello e si taglia la gola.", nome);
  842. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  843. SetPlayerHealth(playerid, 0.0);
  844. }
  845. if(GetPlayerWeapon(playerid) == 22 || GetPlayerWeapon(playerid) == 23 || GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon(playerid) == 25 || GetPlayerWeapon(playerid) == 26 || GetPlayerWeapon(playerid) == 27 || GetPlayerWeapon(playerid) == 28 || GetPlayerWeapon(playerid) == 29 || GetPlayerWeapon(playerid) == 30 || GetPlayerWeapon(playerid) == 31 || GetPlayerWeapon(playerid) == 32 || GetPlayerWeapon(playerid) == 33 || GetPlayerWeapon(playerid) == 34)
  846. {
  847. new Float:x, Float: y, Float: z;
  848. GetPlayerPos(playerid, x, y, z);
  849. GetPlayerName(playerid, nome, 24);
  850. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si spara in testa.", nome);
  851. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  852. SetPlayerHealth(playerid, 0.0);
  853. }
  854. else
  855. {
  856. new Float:x, Float: y, Float: z;
  857. GetPlayerPos(playerid, x, y, z);
  858. GetPlayerName(playerid, nome, 24);
  859. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si suicida con un oggetto.", nome);
  860. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  861. SetPlayerHealth(playerid, 0.0);
  862. }
  863. return 1;
  864. }
  865.  
  866. /*=======================================Userpanel*/
  867. if(!strcmp(cmdtext, "/userpanel", true))
  868. {
  869. ShowPlayerDialog(playerid, USERPANEL, DIALOG_STYLE_LIST, "{33AA33}UserPanel:", "Cambia password\nReset Statistiche\nCancella Account\nStats", "Scegli", "Chiudi");
  870. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai aperto il Pannello di Controllo utente.");
  871. return 1;
  872. }
  873.  
  874. /*=======================================Help*/
  875. if(!strcmp(cmdtext, "/help", true) || !strcmp(cmdtext, "/aiuto", true))
  876. {
  877. ShowPlayerDialog(playerid, AIUTO, DIALOG_STYLE_LIST, "{33AA33}Informazioni Server:", "Regole \nComandi \nCrediti", "Scegli", "Indietro");
  878. return 1;
  879. }
  880.  
  881. /*=======================================Anims*/
  882. if(!strcmp(cmdtext, "/animazioni", true) || !strcmp(cmdtext, "/anims", true))
  883. {
  884. ShowPlayerDialog(playerid, ANIMAZIONI, DIALOG_STYLE_LIST, "{33AA33}Animazioni:", "Siediti\nBraccia incrociate\nMani in alto\nFinta morte\nInsulto", "Scegli", "Indietro");
  885. return 1;
  886. }
  887. if(!strcmp(cmdtext, "/stopanim", true))
  888. {
  889. if(Animazione[playerid] != true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non stai compiendo un'animazione.");
  890. if(Tramortito[playerid] == true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Attendi 15 secondi.");
  891. ClearAnimations(playerid);
  892. Animazione[playerid] = false;
  893. return 1;
  894. }
  895. /*=======================================Cambiateam*/
  896. if(!strcmp(cmdtext, "/cambiateam", true) || !strcmp(cmdtext, "/cambiafazione", true))
  897. {
  898. if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}500$ {FFFFFF}per pagare una penale.");
  899. ShowPlayerDialog(playerid, CAMBIATEAM, DIALOG_STYLE_LIST, "{33AA33}Selezione Fazione:", "{33AA33}Groove Street\n{B200FF}Ballas\n{FFFF00}Vagos\n{00FFFF}Atzecas\n{FFFFFF}Triade\n{F97804}Bikers\n{0000FF}Polizia\n{00BFFF}Medici\n{AFAFAF}Cittadini", "Scegli", "Chiudi");
  900. return 1;
  901. }
  902. /*=======================================Smettilavorare*/
  903. if(!strcmp(cmdtext, "/smettilavorare", true))
  904. {
  905. if(GetPlayerTeam(playerid) != Cittadini)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Cittadini{FFFFFF} possono chiedere di lavorare.");
  906. new Float:x, Float: y, Float: z;
  907. GetPlayerPos(playerid, x, y, z);
  908. GetPlayerName(playerid, nome, 24);
  909. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} smette di lavorare.", nome);
  910. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  911. if(Pizzaboy[playerid] == true) Pizzaboy[playerid] = false;
  912. if(LavoratoreConsegna[playerid] == true) LavoratoreConsegna[playerid] = false;
  913. if(VendHotDog[playerid] == true) VendHotDog[playerid] = false;
  914. return 1;
  915. }
  916. //*=======================================Metticasco*/
  917. if(!strcmp(cmdtext, "/metticasco", true))
  918. {
  919. if(dini_Int(pFile, "Casco") == 0) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai un casco.");
  920. if(GetPlayerTeam(playerid) == Polizia) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La polizia non può indossare il casco.");
  921. new Float:x, Float: y, Float: z;
  922. GetPlayerPos(playerid, x, y, z);
  923. GetPlayerName(playerid, nome, 24);
  924. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si mette il casco.", nome);
  925. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  926. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei messo il casco.");
  927. if(dini_Int(pFile, "Casco") == 1)
  928. {
  929. if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  930. if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  931. if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  932. if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
  933. if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
  934. if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  935. if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  936. if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  937. if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  938. if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  939. if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  940. if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  941. if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  942. if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  943. if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  944. if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  945. if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  946. if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  947. }
  948. if(dini_Int(pFile, "Casco") == 2)
  949. {
  950. if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  951. if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  952. if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  953. if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
  954. if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
  955. if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  956. if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  957. if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  958. if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  959. if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  960. if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  961. if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  962. if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  963. if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  964. if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  965. if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  966. if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  967. if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  968. }
  969. if(dini_Int(pFile, "Casco") == 3)
  970. {
  971. if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  972. if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  973. if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  974. if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
  975. if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
  976. if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  977. if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  978. if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  979. if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  980. if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  981. if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  982. if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  983. if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  984. if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  985. if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  986. if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  987. if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  988. if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
  989. }
  990. return 1;
  991. }
  992.  
  993. /*=======================================Toglicasco*/
  994. if(!strcmp(cmdtext, "/toglicasco", true))
  995. {
  996. if(IsPlayerAttachedObjectSlotUsed(playerid, 2))
  997. {
  998. RemovePlayerAttachedObject(playerid, 2);
  999. new Float:x, Float: y, Float: z;
  1000. GetPlayerPos(playerid, x, y, z);
  1001. GetPlayerName(playerid, nome, 24);
  1002. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si toglie il casco.", nome);
  1003. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1004. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei tolto il casco.");
  1005. }
  1006. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non indossi un casco."); }
  1007. return 1;
  1008. }
  1009.  
  1010. /*=======================================Mettiocchiali*/
  1011. if(!strcmp(cmdtext, "/mettiocchiali", true))
  1012. {
  1013. if(dini_Int(pFile, "Occhiali") == 0) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai degli occhiali.");
  1014. if(GetPlayerTeam(playerid) == Polizia) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La polizia non può indossare gli occhiali.");
  1015. new Float:x, Float: y, Float: z;
  1016. GetPlayerPos(playerid, x, y, z);
  1017. GetPlayerName(playerid, nome, 24);
  1018. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si mette gli occhiali.", nome);
  1019. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1020. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei messo gli occhiali.");
  1021. if(dini_Int(pFile, "Occhiali") == 1)
  1022. {
  1023. if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.091779, 0.037620, -0.005079, 90.928329, 78.145759, 0.000000);
  1024. if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.084179, 0.035251, -0.005079, 90.928329, 78.145759, 0.000000);
  1025. if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.089387, 0.040297, -0.006006, 90.928329, 78.145759, 0.000000);
  1026. if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.081864, 0.047914, -0.005079, 90.928329, 78.145759, 0.000000);
  1027. if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.089607, 0.036717, -0.005079, 90.928329, 78.145759, 0.000000);
  1028. if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.079655, 0.042021, -0.005079, 90.928329, 78.145759, 0.000000);
  1029. if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.081930, 0.030756, 0.001523, 90.928329, 78.145759, 0.000000);
  1030. if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
  1031. if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
  1032. if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.097520, 0.044296, -0.007286, 90.928329, 90.217376, 0.000000);
  1033. if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.097408, 0.043470, -0.007286, 90.928329, 90.217376, 0.000000);
  1034. if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.092588, 0.049832, -0.007286, 90.928329, 90.217376, 0.000000);
  1035. if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.081444, 0.037602, -0.003125, 90.928329, 90.217376, 0.000000);
  1036. if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.078678, 0.037602, -0.001816, 90.928329, 90.217376, 0.000000);
  1037. if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.089214, 0.029291, -0.000784, 90.928329, 84.624763, 0.000000);
  1038. if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.101566, 0.037019, 0.000750, 89.675476, 83.514060, 0.000000);
  1039. if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.091887, 0.047776, -0.000040, 89.675476, 83.514060, 0.000000);
  1040. if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.099198, 0.037362, -0.000264, 89.675476, 82.959915, 0.000000);
  1041. }
  1042. if(dini_Int(pFile, "Occhiali") == 2)
  1043. {
  1044. if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.091779, 0.037620, -0.005079, 90.928329, 78.145759, 0.000000);
  1045. if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.084179, 0.035251, -0.005079, 90.928329, 78.145759, 0.000000);
  1046. if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.089387, 0.040297, -0.006006, 90.928329, 78.145759, 0.000000);
  1047. if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.081864, 0.047914, -0.005079, 90.928329, 78.145759, 0.000000);
  1048. if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.089607, 0.036717, -0.005079, 90.928329, 78.145759, 0.000000);
  1049. if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.079655, 0.042021, -0.005079, 90.928329, 78.145759, 0.000000);
  1050. if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.081930, 0.030756, 0.001523, 90.928329, 78.145759, 0.000000);
  1051. if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
  1052. if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
  1053. if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.097520, 0.044296, -0.007286, 90.928329, 90.217376, 0.000000);
  1054. if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.097408, 0.043470, -0.007286, 90.928329, 90.217376, 0.000000);
  1055. if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.092588, 0.049832, -0.007286, 90.928329, 90.217376, 0.000000);
  1056. if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.081444, 0.037602, -0.003125, 90.928329, 90.217376, 0.000000);
  1057. if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.078678, 0.037602, -0.001816, 90.928329, 90.217376, 0.000000);
  1058. if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.089214, 0.029291, -0.000784, 90.928329, 84.624763, 0.000000);
  1059. if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.101566, 0.037019, 0.000750, 89.675476, 83.514060, 0.000000);
  1060. if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.091887, 0.047776, -0.000040, 89.675476, 83.514060, 0.000000);
  1061. if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.099198, 0.037362, -0.000264, 89.675476, 82.959915, 0.000000);
  1062. }
  1063. if(dini_Int(pFile, "Occhiali") == 3)
  1064. {
  1065. if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.091779, 0.037620, -0.005079, 90.928329, 78.145759, 0.000000);
  1066. if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.084179, 0.035251, -0.005079, 90.928329, 78.145759, 0.000000);
  1067. if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.089387, 0.040297, -0.006006, 90.928329, 78.145759, 0.000000);
  1068. if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.081864, 0.047914, -0.005079, 90.928329, 78.145759, 0.000000);
  1069. if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.089607, 0.036717, -0.005079, 90.928329, 78.145759, 0.000000);
  1070. if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.079655, 0.042021, -0.005079, 90.928329, 78.145759, 0.000000);
  1071. if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.081930, 0.030756, 0.001523, 90.928329, 78.145759, 0.000000);
  1072. if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
  1073. if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
  1074. if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.097520, 0.044296, -0.007286, 90.928329, 90.217376, 0.000000);
  1075. if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.097408, 0.043470, -0.007286, 90.928329, 90.217376, 0.000000);
  1076. if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.092588, 0.049832, -0.007286, 90.928329, 90.217376, 0.000000);
  1077. if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.081444, 0.037602, -0.003125, 90.928329, 90.217376, 0.000000);
  1078. if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.078678, 0.037602, -0.001816, 90.928329, 90.217376, 0.000000);
  1079. if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.089214, 0.029291, -0.000784, 90.928329, 84.624763, 0.000000);
  1080. if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.101566, 0.037019, 0.000750, 89.675476, 83.514060, 0.000000);
  1081. if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.091887, 0.047776, -0.000040, 89.675476, 83.514060, 0.000000);
  1082. if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.099198, 0.037362, -0.000264, 89.675476, 82.959915, 0.000000);
  1083. }
  1084. return 1;
  1085. }
  1086.  
  1087. /*=======================================TogliOcchiali*/
  1088. if(!strcmp(cmdtext, "/togliocchiali", true))
  1089. {
  1090. if(IsPlayerAttachedObjectSlotUsed(playerid, 1))
  1091. {
  1092. RemovePlayerAttachedObject(playerid, 1);
  1093. new Float:x, Float: y, Float: z;
  1094. GetPlayerPos(playerid, x, y, z);
  1095. GetPlayerName(playerid, nome, 24);
  1096. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si toglie gli occhiali.", nome);
  1097. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1098. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei tolto gli occhiali.");
  1099. }
  1100. else
  1101. { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non indossi degli occhiali."); }
  1102. return 1;
  1103. }
  1104.  
  1105. /*=======================================Votekick*/
  1106. if(strcmp(cmd, "/startvoto", true) == 0)
  1107. {
  1108. new tmp[256];
  1109. new id;
  1110. if(VotekickAttivo == false)
  1111. {
  1112. tmp = strtok(cmdtext, idx);
  1113. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /startvoto [playerid] [motivo]");
  1114. id = strval(tmp);
  1115. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi votare te stesso.");
  1116. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1117. GetPlayerName(playerid, nome, 24);
  1118. GetPlayerName(id, nomeid, 24);
  1119. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha avviato un votekick verso {FFFFFF}%s{00BFFF} Motivo: {FFFFFF}%s", nome, nomeid, cmdtext[idx]);
  1120. SendClientMessageToAll(BLU_CHIARO, stringa);
  1121. format(stringa, sizeof(stringa), "* {FFFFFF}Hai avviato un votekick verso {33AA33}%s{FFFFFF}.", nomeid);
  1122. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  1123. SetTimerEx("FineVoteKick", 120000, false, "d", id);
  1124. VotekickAttivo = true;
  1125. }
  1126. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}C'è già un votekick in corso."); }
  1127. return 1;
  1128. }
  1129.  
  1130. /*=======================================Vota*/
  1131. if(!strcmp(cmdtext, "/vota", true))
  1132. {
  1133. if(VotekickAttivo == true)
  1134. {
  1135. if(Votato[playerid] == true) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Hai già votato in questo votekick.");
  1136. VotiPlayers ++;
  1137. GetPlayerName(playerid, nome, 24);
  1138. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha votato. (Voti: {FFFFFF}%d{00BFFF}/%d)", nome, VotiPlayers, VOTI_NECESSARI);
  1139. SendClientMessageToAll(BLU_CHIARO, stringa);
  1140. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai votato.");
  1141. Votato[playerid] = true;
  1142. }
  1143. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non c'è nessuno votekick in corso."); }
  1144. return 1;
  1145. }
  1146.  
  1147. /*=======================================Rapina*/
  1148. if(!strcmp(cmdtext, "/rapina", true))
  1149. {
  1150. if(StopRapina[playerid] == true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Attendi prima di rapinare di nuovo la banca.");
  1151. if(!IsPlayerInRangeOfPoint(playerid, 20, 2315.952880, -1.618174, 26.742187))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere all'interno della banca per rapinarla.");
  1152. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono rapinare la banca.");
  1153. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}I poliziotti non possono rapinare la banca.");
  1154. if(RapinaAttiva == true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}C'è già una rapina in corso.");
  1155. if((GetPlayerWeapon(playerid) > 18) && (GetPlayerWeapon(playerid) < 35))
  1156. {
  1157. RapinaAttiva = true;
  1158. Rapinatore[playerid] = true;
  1159. GetPlayerName(playerid, nome, 24);
  1160. format(stringa, sizeof(stringa), "[{00BFFF}SICUREZZA{FFFFFF}]{00BFFF}** {FFFFFF}%s{00BFFF} sta rapinando la banca.", nome);
  1161. SendClientMessageToAll(COLORE_TRIADE, stringa);
  1162. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Stai rapinando la banca.");
  1163. TimerRapina = SetTimer("FineRapina", 600000, false);
  1164. }
  1165. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere almeno un'arma da fuoco."); }
  1166. return 1;
  1167. }
  1168.  
  1169. /*=======================================Afk*/
  1170. if(!strcmp(cmdtext, "/afk", true))
  1171. {
  1172. if(AFK[playerid] == false)
  1173. {
  1174. AFK[playerid] = true;
  1175. new Float: Px, Float: Pz, Float: Py;
  1176. GetPlayerPos(playerid, Px, Py, Pz);
  1177. format(stringa, sizeof(stringa), "%s: Away From Keyboard", nome);
  1178. Afk[playerid] = Create3DTextLabel(stringa, ROSA, Px, Py, Pz+1, 30, 0);
  1179. TogglePlayerControllable(playerid, 0);
  1180. GetPlayerName(playerid, nome, 24);
  1181. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei passato in stato AFK.");
  1182. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} entra in stato AFK.", nome);
  1183. SendClientMessageToAll(BLU_CHIARO, stringa);
  1184. }
  1185. else
  1186. {
  1187. AFK[playerid] = false;
  1188. Delete3DTextLabel(Afk[playerid]);
  1189. GetPlayerName(playerid, nome, 24);
  1190. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} esce dallo stato AFK.", nome);
  1191. SendClientMessageToAll(BLU_CHIARO, stringa);
  1192. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito dallo stato AFK.");
  1193. TogglePlayerControllable(playerid, 1);
  1194. }
  1195.  
  1196. return 1;
  1197. }
  1198.  
  1199. /*=======================================Admins*/
  1200. if(!strcmp(cmdtext, "/admins", true))
  1201. {
  1202. new Admins = 0;
  1203. for (new x = 0; x < GetMaxPlayers(); x++)
  1204. {
  1205. if (IsPlayerConnected(x) && IsPlayerAdmin(x))
  1206. {
  1207. Admins ++;
  1208. SendClientMessage(playerid, COLORE_TRIADE, "___________________[{FF66FF}Admins Online{FFFFFF}:]___________________");
  1209. GetPlayerName(x, nome, 24);
  1210. SendClientMessage(playerid, ROSA, nome);
  1211. }
  1212. }
  1213. if(Admins == 0){ SendClientMessage(playerid, COLORE_ERRORE, "Non ci sono Admins online."); }
  1214. return 1;
  1215. }
  1216.  
  1217. /*=======================================GPS*/
  1218. if(!strcmp(cmdtext, "/gps", true))
  1219. {
  1220. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere guidatore di un veicolo per utilizzare il GPS.");
  1221. ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "{33AA33}Gps:", "{FFFFFF}Negozio di vestiti\nBase della tua fazione\nBurger Shot\nAmmunation\nBanca", "Scegli", "Chiudi");
  1222. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai acceso il GPS.");
  1223. return 1;
  1224. }
  1225.  
  1226. /*=======================================GPS*/
  1227. if(!strcmp(cmdtext, "/resetrespawn", true))
  1228. {
  1229. if(dini_Int(pFile, "AreaRespawn") == 0)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La tua area di respawn è quella prestabilita.");
  1230. dini_IntSet(pFile, "AreaRespawn", 0);
  1231. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai resettato la tua area di respawn.");
  1232. new Float:x, Float: y, Float: z;
  1233. GetPlayerPos(playerid, x, y, z);
  1234. GetPlayerName(playerid, nome, 24);
  1235. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} resetta la sua area di respawn.", nome);
  1236. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1237. return 1;
  1238. }
  1239.  
  1240. /*=======================================DaiSoldi*/
  1241. if(strcmp(cmd, "/daisoldi", true) == 0)
  1242. {
  1243. new tmp[256], tmp2[256];
  1244. new id;
  1245. new num;
  1246. tmp = strtok(cmdtext, idx);
  1247. tmp2= strtok(cmdtext, idx);
  1248. num = strval (tmp2);
  1249. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /daisoldi [playerid][soldi]");
  1250. id = strval(tmp);
  1251. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1252. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1253. new Float: px, Float: py, Float: pz;
  1254. GetPlayerPos(id, px, py, pz);
  1255. if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore.");
  1256. GivePlayerMoney(id, num);
  1257. GetPlayerName(id, nomeid, 24);
  1258. GetPlayerName(playerid, nome, 24);
  1259. format(stringa, sizeof(stringa), "* {FFFFFF}Hai dato {33AA33}%d{FFFFFF}$ a {33AA33}%s{FFFFFF}.", num, nomeid);
  1260. SendClientMessageToAll(COLORE_GROOVE, stringa);
  1261. new Float:x, Float: y, Float: z;
  1262. GetPlayerPos(playerid, x, y, z);
  1263. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} dà {FFFFFF}%d{00BFFF}$ a {FFFFFF}%s{00BFFF}.", nome, nomeid);
  1264. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1265. return 1;
  1266. }
  1267.  
  1268. /*=======================================DaiSoldi*/
  1269. if(strcmp(cmd, "/minaccia", true) == 0)
  1270. {
  1271. new tmp[256], tmp2[256];
  1272. new id;
  1273. new num;
  1274. tmp = strtok(cmdtext, idx);
  1275. tmp2= strtok(cmdtext, idx);
  1276. num = strval(tmp2);
  1277. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /minaccia [playerid][soldirichiesti]");
  1278. id = strval(tmp);
  1279. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1280. if(GetPlayerTeam(playerid) == Polizia || GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi minacciare un altro giocatore.");
  1281. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1282. new Float: px, Float: py, Float: pz;
  1283. GetPlayerPos(id, px, py, pz);
  1284. if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da minacciare.");
  1285. GetPlayerName(id, nomeid, 24);
  1286. GetPlayerName(playerid, nome, 24);
  1287. format(stringa, sizeof(stringa), "* {FFFFFF}Hai minacciato {33AA33}%s{FFFFFF} chiedendogli {33AA33}%d{FFFFFF}$.", nomeid, num);
  1288. SendClientMessageToAll(COLORE_GROOVE, stringa);
  1289. new Float: x, Float: y, Float: z;
  1290. GetPlayerPos(playerid, x, y, z);
  1291. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} minaccia {FFFFFF}%s{00BFFF}.", nome, nomeid);
  1292. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1293. format(stringa, sizeof(stringa), "* %s{FFFFFF} ti ha minacciato, chiedendoti {33AA33}%d{FFFFFF}$.", nome, num);
  1294. SendClientMessage(id, COLORE_GROOVE, stringa);
  1295. return 1;
  1296. }
  1297.  
  1298. /*=======================================Tramortisce*/
  1299. if(strcmp(cmd, "/tramortisci", true) == 0)
  1300. {
  1301. new tmp[256];
  1302. new id;
  1303. tmp = strtok(cmdtext, idx);
  1304. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /tramortisci [playerid][soldirichiesti]");
  1305. id = strval(tmp);
  1306. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1307. if(GetPlayerTeam(playerid) == Polizia || GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi tramortire un altro giocatore.");
  1308. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1309. new Float: px, Float: py, Float: pz;
  1310. GetPlayerPos(id, px, py, pz);
  1311. if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da tramortite.");
  1312. ApplyAnimation(id, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 1);
  1313. Tramortito[id] = true;
  1314. SetPlayerWantedLevel(playerid, 1);
  1315. SetTimerEx("StopTramortito", 15000, false, "d", id);
  1316. GetPlayerName(id, nomeid, 24);
  1317. GetPlayerName(playerid, nome, 24);
  1318. format(stringa, sizeof(stringa), "* {FFFFFF}Hai tramortito {33AA33}%s{FFFFFF}.", nomeid);
  1319. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  1320. new Float: x, Float: y, Float: z;
  1321. GetPlayerPos(playerid, x, y, z);
  1322. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} tramortisce {FFFFFF}%s{00BFFF}.", nome, nomeid);
  1323. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1324. format(stringa, sizeof(stringa), "* %s{FFFFFF} ti ha tramortito.", nome);
  1325. SendClientMessage(id, COLORE_GROOVE, stringa);
  1326. return 1;
  1327. }
  1328.  
  1329. /*=======================================Ruba*/
  1330. if(strcmp(cmd, "/deruba", true) == 0)
  1331. {
  1332. new tmp[256];
  1333. new id;
  1334. tmp = strtok(cmdtext, idx);
  1335. if(GetPlayerTeam(playerid) == Medici || GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi derubare un altro utente.");
  1336. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /deruba [playerid]");
  1337. id = strval(tmp);
  1338. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1339. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1340. new Float: px, Float: py, Float: pz;
  1341. GetPlayerPos(id, px, py, pz);
  1342. if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da derubare.");
  1343. GivePlayerMoney(playerid, GetPlayerMoney(id));
  1344. ResetPlayerMoney(id);
  1345. SetPlayerWantedLevel(playerid, 1);
  1346. GetPlayerName(id, nomeid, 24);
  1347. GetPlayerName(playerid, nome, 24);
  1348. new Float: x, Float: y, Float: z;
  1349. GetPlayerPos(playerid, x, y, z);
  1350. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} deruba {FFFFFF}%s{00BFFF}.", nome, nomeid);
  1351. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1352. format(stringa, sizeof(stringa), "* {FFFFFF}Hai derubato {33AA33}%s{FFFFFF}.", nomeid);
  1353. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  1354. format(stringa, sizeof(stringa), "* {FFFFFF}Sei stato derubato da {33AA33}%s{FFFFFF}.", nome);
  1355. SendClientMessage(id, COLORE_GROOVE, stringa);
  1356. return 1;
  1357. }
  1358.  
  1359. /*=======================================Freccia DX*/
  1360. if(!strcmp(cmdtext, "/frecciadx", true))
  1361. {
  1362. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere guidatore di un veicolo per utilizzare le frecce.");
  1363. new Float: x, Float: y, Float: z;
  1364. GetPlayerPos(playerid, x, y, z);
  1365. GetPlayerName(playerid, nome, 24);
  1366. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} mette la freccia a destra.", nome);
  1367. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1368. GameTextForPlayer(playerid, "~>~", 3000, 4);
  1369. return 1;
  1370. }
  1371.  
  1372. /*=======================================Freccia SX*/
  1373. if(!strcmp(cmdtext, "/frecciasx", true))
  1374. {
  1375. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere guidatore di un veicolo per utilizzare le frecce.");
  1376. new Float: x, Float: y, Float: z;
  1377. GetPlayerPos(playerid, x, y, z);
  1378. GetPlayerName(playerid, nome, 24);
  1379. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} mette la freccia a sinistra.", nome);
  1380. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1381. GameTextForPlayer(playerid, "~<~", 3000, 4);
  1382. return 1;
  1383. }
  1384.  
  1385.  
  1386. /*==============================================================================Comandi Medici
  1387. =======================================Cura*/
  1388. if(strcmp(cmd, "/cura", true) == 0)
  1389. {
  1390. new tmp[256];
  1391. new id;
  1392. tmp = strtok(cmdtext, idx);
  1393. if(GetPlayerTeam(playerid) != Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i Medici possono usare questo comando.");
  1394. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /cura [playerid]");
  1395. id = strval(tmp);
  1396. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1397. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1398. new Float: px, Float: py, Float: pz;
  1399. GetPlayerPos(id, px, py, pz);
  1400. if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da curare.");
  1401. SetPlayerHealth(id, 100);
  1402. GivePlayerMoney(id, -200);
  1403. GetPlayerName(id, nomeid, 24);
  1404. GetPlayerName(playerid, nome, 24);
  1405. new Float: x, Float: y, Float: z;
  1406. GetPlayerPos(playerid, x, y, z);
  1407. format(stringa, sizeof(stringa), "** Il medico {FFFFFF}%s{00BFFF} cura {FFFFFF}%s{00BFFF}.", nome, nomeid);
  1408. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1409. format(stringa, sizeof(stringa), "* {FFFFFF}Hai curato {33AA33}%s{FFFFFF}.", nomeid);
  1410. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  1411. SendClientMessage(id, COLORE_GROOVE, "* {FFFFFF}Sei stato curato da un medico e hai pagato 200$.");
  1412. return 1;
  1413. }
  1414.  
  1415. /*==============================================================================Comandi Polizia*/
  1416. /*=======================================Posto di Blocco*/
  1417. if(!strcmp(cmdtext, "/postoblocco", true))
  1418. {
  1419. if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
  1420. new Float: x, Float: y, Float: z, Float: angle;
  1421. GetPlayerPos(playerid, x, y, z);
  1422. GetPlayerFacingAngle(playerid, angle);
  1423. if(PostoDiBlocco[playerid] == false)
  1424. {
  1425. PostoDiBlocco[playerid] = true;
  1426. Blocco[playerid] = CreateObject(981, x, y, z, 0.0, 0.0, angle);
  1427. SetPlayerPos(playerid, x, y, z+4);
  1428. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai creato un posto di blocco.");
  1429. }
  1430. else
  1431. {
  1432. PostoDiBlocco[playerid] = false;
  1433. DestroyObject(Blocco[playerid]);
  1434. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai smantellato un posto di blocco.");
  1435. }
  1436. return 1;
  1437. }
  1438.  
  1439. /*=======================================Arresta*/
  1440. if(strcmp(cmd, "/arresta", true) == 0)
  1441. {
  1442. new tmp[256];
  1443. new id;
  1444. tmp = strtok(cmdtext, idx);
  1445. if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
  1446. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /arresta [playerid] [Motivo]");
  1447. id = strval(tmp);
  1448. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1449. if(GetPlayerTeam(id) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi arrestare un poliziotto.");
  1450. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1451. if(GetPlayerWantedLevel(id) < 1) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Il giocatore non è ricercato.");
  1452. Jailato[id] = true;
  1453. ResetPlayerWeapons(id);
  1454. new Float: px, Float: py, Float: pz;
  1455. GetPlayerPos(id, px, py, pz);
  1456. if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da arrestare.");
  1457. GetPlayerName(id, nomeid, 24);
  1458. GetPlayerName(playerid, nome, 24);
  1459. new Float:x, Float: y, Float: z;
  1460. GetPlayerPos(playerid, x, y, z);
  1461. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} arresta {FFFFFF}%s{00BFFF}.", nome, nomeid);
  1462. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  1463. format(stringa, sizeof(stringa), "* {FFFFFF}Hai arrestato {33AA33}%s{FFFFFF}.", nomeid);
  1464. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  1465. SetPlayerInterior(id, 6);//Prigione
  1466. SetPlayerPos(id, 264.5743, 77.5118, 1001.0391);//Prigione
  1467. SetTimerEx("EsciPrigione", 600000, false, "d", id);
  1468. return 1;
  1469. }
  1470.  
  1471. /*=======================================Cmdpolizia*/
  1472. if(!strcmp(cmdtext, "/cmdpolizia", true))
  1473. {
  1474. if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
  1475. ShowPlayerDialog(playerid, CMDPOLIZIA, DIALOG_STYLE_MSGBOX, "{33AA33}Comandi Polizia:", "/postoblocco /arresta /emergenza", "Indietro", "");
  1476. return 1;
  1477. }
  1478.  
  1479. /*=======================================Emergenza*/
  1480. if(!strcmp(cmdtext, "/emergenza", true))
  1481. {
  1482. if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
  1483. ShowPlayerDialog(playerid, EMERGENZA, DIALOG_STYLE_INPUT, "{33AA33}Radio:", "{FFFFFF}Inserisci il messaggio da inviare alla centrale, specificando dove ti trovi.", "Invia", "Chiudi");
  1484. return 1;
  1485. }
  1486.  
  1487. /*==============================================================================Admin*/
  1488. /*=======================================Servizio*/
  1489. if(!strcmp(cmdtext, "/aduty", true))
  1490. {
  1491. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1492. SetPlayerInterior(playerid, 0);
  1493. SetPlayerPos(playerid, 1251.1160, -816.1332, 84.1478);
  1494. SetPlayerSkin(playerid, 217);
  1495. SetPlayerTeam(playerid, 0);
  1496. SetPlayerColor(playerid, COLORE_ERRORE);
  1497. GetPlayerName(playerid, nome, 24);
  1498. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}è entrato in servizio.", nome);
  1499. SendClientMessageToAll(ROSA, stringa);
  1500. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei entrato in servizio.");
  1501. return 1;
  1502. }
  1503.  
  1504. /*=======================================Base*/
  1505. if(!strcmp(cmdtext, "/base", true))
  1506. {
  1507. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1508. SetPlayerInterior(playerid, 0);
  1509. SetPlayerPos(playerid, 1251.1160, -816.1332, 84.1478);
  1510. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Ti sei teletrasportato alla base.");
  1511. return 1;
  1512. }
  1513. /*=======================================ClearChat*/
  1514. if(!strcmp(cmdtext, "/clearchat", true))
  1515. {
  1516. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1517. for(new i=0; i < 50; i++)
  1518. {
  1519. SendClientMessageToAll(COLORE_ERRORE, " ");
  1520. }
  1521. GetPlayerName(playerid, nome, 24);
  1522. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha ripulito la chat. Motivo: {FF66FF}%s ", nome, cmdtext[idx]);
  1523. SendClientMessageToAll(ROSA, stringa);
  1524. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Hai ripulito la chat.");
  1525. return 1;
  1526. }
  1527.  
  1528. /*=======================================Comandi*/
  1529. if(!strcmp(cmdtext, "/cmdadmin", true))
  1530. {
  1531. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1532. ShowPlayerDialog(playerid, CMD_ADMIN, DIALOG_STYLE_MSGBOX, "{33AA33}Comandi Admin:", "/aduty /clearchat /kick /ban /godmode\n/goto /getthere /freeze /sfreeze /explode\n/kickall /banall /spectate /stopspectate /resetsoldi\n/resetarmi /uccidi /base /cura /armatura", "Indietro", "");
  1533. return 1;
  1534. }
  1535.  
  1536. /*=======================================GodMode*/
  1537. if(!strcmp(cmdtext, "/godmode", true))
  1538. {
  1539. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1540. SetPlayerHealth(playerid, 100000);
  1541. GetPlayerName(playerid, nome, 24);
  1542. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha attivato la god-mode su se stesso.", nome);
  1543. SendClientMessageToAll(ROSA, stringa);
  1544. return 1;
  1545. }
  1546.  
  1547. /*=======================================Resetarmi*/
  1548. if(strcmp(cmd, "/resetarmi", true) == 0)
  1549. {
  1550. new tmp[256];
  1551. new id;
  1552. if(IsPlayerAdmin(playerid))
  1553. {
  1554. tmp = strtok(cmdtext, idx);
  1555. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /resetarmi [playerid]");
  1556. id = strval(tmp);
  1557. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1558. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1559. ResetPlayerWeapons(id);
  1560. GetPlayerName(id, nomeid, 24);
  1561. GetPlayerName(playerid, nome, 24);
  1562. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha resettato le armi a {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1563. SendClientMessageToAll(ROSA, stringa);
  1564. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai resettato le armi a {FF66FF}%s{FFFFFF}.", nomeid);
  1565. SendClientMessage(playerid, ROSA, stringa);
  1566. }
  1567. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1568. return 1;
  1569. }
  1570.  
  1571. /*=======================================Cura*/
  1572. if(strcmp(cmd, "/heal", true) == 0)
  1573. {
  1574. new tmp[256];
  1575. new id;
  1576. if(IsPlayerAdmin(playerid))
  1577. {
  1578. tmp = strtok(cmdtext, idx);
  1579. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /cura [playerid]");
  1580. id = strval(tmp);
  1581. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1582. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1583. SetPlayerHealth(id, 100);
  1584. GetPlayerName(id, nomeid, 24);
  1585. GetPlayerName(playerid, nome, 24);
  1586. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha curato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1587. SendClientMessageToAll(ROSA, stringa);
  1588. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai curato {FF66FF}%s{FFFFFF}.", nomeid);
  1589. SendClientMessage(playerid, ROSA, stringa);
  1590. }
  1591. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1592. return 1;
  1593. }
  1594.  
  1595. /*=======================================ResetSoldi*/
  1596. if(strcmp(cmd, "/resetsoldi", true) == 0)
  1597. {
  1598. new tmp[256];
  1599. new id;
  1600. if(IsPlayerAdmin(playerid))
  1601. {
  1602. tmp = strtok(cmdtext, idx);
  1603. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /resetsoldi [playerid]");
  1604. id = strval(tmp);
  1605. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1606. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1607. SetPlayerHealth(id, 100);
  1608. GetPlayerName(id, nomeid, 24);
  1609. GetPlayerName(playerid, nome, 24);
  1610. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha resettato i soldi a {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1611. SendClientMessageToAll(ROSA, stringa);
  1612. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai resettato i soldi a {FF66FF}%s{FFFFFF}.", nomeid);
  1613. SendClientMessage(playerid, ROSA, stringa);
  1614. }
  1615. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1616. return 1;
  1617. }
  1618.  
  1619. /*=======================================Goto*/
  1620. if(strcmp(cmd, "/goto", true) == 0)
  1621. {
  1622. new tmp[256];
  1623. new id;
  1624. if(IsPlayerAdmin(playerid))
  1625. {
  1626. tmp = strtok(cmdtext, idx);
  1627. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /goto [playerid]");
  1628. id = strval(tmp);
  1629. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1630. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1631. new Float: Px, Float: Pz, Float: Py;
  1632. SetPlayerInterior(playerid, GetPlayerInterior(id));
  1633. GetPlayerPos(id, Px, Py, Pz);
  1634. SetPlayerPos(playerid, Px+1, Py, Pz);
  1635. GetPlayerName(id, nomeid, 24);
  1636. GetPlayerName(playerid, nome, 24);
  1637. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}si è teletrasportato da {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1638. SendClientMessageToAll(ROSA, stringa);
  1639. format(stringa, sizeof(stringa), "*** {FFFFFF}Ti sei teletrasportato da {FF66FF}%s{FFFFFF}.", nomeid);
  1640. SendClientMessage(playerid, ROSA, stringa);
  1641. }
  1642. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1643. return 1;
  1644. }
  1645.  
  1646. /*=======================================GetThere*/
  1647. if(strcmp(cmd, "/getthere", true) == 0)
  1648. {
  1649. new tmp[256];
  1650. new id;
  1651. if(IsPlayerAdmin(playerid))
  1652. {
  1653. tmp = strtok(cmdtext, idx);
  1654. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /getthere [playerid]");
  1655. id = strval(tmp);
  1656. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1657. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1658. new Float: Px, Float: Pz, Float: Py;
  1659. GetPlayerPos(playerid, Px, Py, Pz);
  1660. SetPlayerPos(id, Px+1, Py, Pz);
  1661. GetPlayerName(id, nomeid, 24);
  1662. GetPlayerName(playerid, nome, 24);
  1663. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha teletrasportato a se {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1664. SendClientMessageToAll(ROSA, stringa);
  1665. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai teletrasportato a te {FF66FF}%s{FFFFFF}.", nomeid);
  1666. SendClientMessage(playerid, ROSA, stringa);
  1667. }
  1668. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1669. return 1;
  1670. }
  1671.  
  1672. /*=======================================Freeze*/
  1673. if(strcmp(cmd, "/freeze", true) == 0)
  1674. {
  1675. new tmp[256];
  1676. new id;
  1677. if(IsPlayerAdmin(playerid))
  1678. {
  1679. tmp = strtok(cmdtext, idx);
  1680. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /freeze [playerid]");
  1681. id = strval(tmp);
  1682. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1683. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1684. TogglePlayerControllable(id, 0);
  1685. GetPlayerName(id, nomeid, 24);
  1686. GetPlayerName(playerid, nome, 24);
  1687. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha freezato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1688. SendClientMessageToAll(ROSA, stringa);
  1689. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai freezato {FF66FF}%s{FFFFFF}.", nomeid);
  1690. SendClientMessage(playerid, ROSA, stringa);
  1691. }
  1692. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1693. return 1;
  1694. }
  1695.  
  1696. /*=======================================Sfreeze*/
  1697. if(strcmp(cmd, "/sfreeze", true) == 0)
  1698. {
  1699. new tmp[256];
  1700. new id;
  1701. if(IsPlayerAdmin(playerid))
  1702. {
  1703. tmp = strtok(cmdtext, idx);
  1704. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /sfreeze [playerid]");
  1705. id = strval(tmp);
  1706. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1707. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1708. TogglePlayerControllable(id, 1);
  1709. GetPlayerName(id, nomeid, 24);
  1710. GetPlayerName(playerid, nome, 24);
  1711. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha sfreezato {FF66FF}%s{FFFFFF}", nome, nomeid);
  1712. SendClientMessageToAll(ROSA, stringa);
  1713. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai sfreezato {FF66FF}%s{FFFFFF}.", nomeid);
  1714. SendClientMessage(playerid, ROSA, stringa);
  1715. }
  1716. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1717. return 1;
  1718. }
  1719.  
  1720. /*=======================================Spectate*/
  1721. if(strcmp(cmd, "/spectate", true) == 0)
  1722. {
  1723. new tmp[256];
  1724. new id;
  1725. if(IsPlayerAdmin(playerid))
  1726. {
  1727. tmp = strtok(cmdtext, idx);
  1728. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /spectate [playerid]");
  1729. id = strval(tmp);
  1730. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1731. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1732. PlayerSpectatePlayer(playerid, id);
  1733. GetPlayerName(id, nomeid, 24);
  1734. format(stringa, sizeof(stringa), "*** {FFFFFF}Stai spectando {FF66FF}%s{FFFFFF}.", nomeid);
  1735. SendClientMessage(playerid, ROSA, stringa);
  1736. }
  1737. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1738. return 1;
  1739. }
  1740.  
  1741. /*=======================================StopSpectate*/
  1742. if(strcmp(cmd, "/stopspectate", true) == 0)
  1743. {
  1744. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1745. TogglePlayerSpectating(playerid, 0);
  1746. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Non stai più osservando nessun player.");
  1747. return 1;
  1748. }
  1749.  
  1750. /*=======================================Uccidi*/
  1751. if(strcmp(cmd, "/uccidi", true) == 0)
  1752. {
  1753. new tmp[256];
  1754. new id;
  1755. if(IsPlayerAdmin(playerid))
  1756. {
  1757. tmp = strtok(cmdtext, idx);
  1758. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /uccidi [playerid]");
  1759. id = strval(tmp);
  1760. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1761. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1762. SetPlayerHealth(id, 0.0);
  1763. GetPlayerName(id, nomeid, 24);
  1764. GetPlayerName(playerid, nome, 24);
  1765. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha ucciso {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1766. SendClientMessageToAll(ROSA, stringa);
  1767. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai ucciso {FF66FF}%s{FFFFFF}.", nomeid);
  1768. SendClientMessage(playerid, ROSA, stringa);
  1769. }
  1770. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1771. return 1;
  1772. }
  1773. /*=======================================Uccidi*/
  1774. if(strcmp(cmd, "/armatura", true) == 0)
  1775. {
  1776. new tmp[256];
  1777. new id;
  1778. if(IsPlayerAdmin(playerid))
  1779. {
  1780. tmp = strtok(cmdtext, idx);
  1781. if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /uccidi [playerid]");
  1782. id = strval(tmp);
  1783. if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1784. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1785. SetPlayerArmour(id, 100);
  1786. SetPlayerAttachedObject(id, 3, 1242, 1, 0.019999, 0.039999, 0.000000, 2.459999, 89.699989, -3.100000, 1.710000, 2.119999, 1.719999);
  1787. GetPlayerName(id, nomeid, 24);
  1788. GetPlayerName(playerid, nome, 24);
  1789. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha dato armatura a {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
  1790. SendClientMessageToAll(ROSA, stringa);
  1791. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai dato armatura a {FF66FF}%s{FFFFFF}.", nomeid);
  1792. SendClientMessage(playerid, ROSA, stringa);
  1793. }
  1794. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1795. return 1;
  1796. }
  1797. /*=======================================Kick*/
  1798. if(strcmp(cmd, "/kick", true) == 0)
  1799. {
  1800. new tmp[256];
  1801. new id;
  1802. if(IsPlayerAdmin(playerid))
  1803. {
  1804. tmp = strtok(cmdtext,idx);
  1805. if(!strlen(tmp)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /kick [playerid] [motivo]");
  1806. id = strval(tmp);
  1807. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1808. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1809. GetPlayerName(id, nomeid, 24);
  1810. GetPlayerName(playerid, nome, 24);
  1811. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha kickato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s{FFFFFF}.", nome, nomeid, cmdtext[idx]);
  1812. SendClientMessageToAll(ROSA, stringa);
  1813. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai kickato {FF66FF}%s{FFFFFF}.", nomeid);
  1814. SendClientMessage(playerid, ROSA, stringa);
  1815. Kick(id);
  1816. }
  1817. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1818. return 1;
  1819. }
  1820. /*=======================================Ban*/
  1821. if(strcmp(cmd, "/ban", true) == 0)
  1822. {
  1823. new tmp[256];
  1824. new id;
  1825. if(IsPlayerAdmin(playerid))
  1826. {
  1827. tmp = strtok(cmdtext,idx);
  1828. if(!strlen(tmp)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /ban [playerid] [motivo]");
  1829. id = strval(tmp);
  1830. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1831. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1832. GetPlayerName(id, nomeid, 24);
  1833. GetPlayerName(playerid, nome, 24);
  1834. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha bannato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s{FFFFFF}.", nome, nomeid, cmdtext[idx]);
  1835. SendClientMessageToAll(ROSA, stringa);
  1836. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai bannato {FF66FF}%s{FFFFFF}", nomeid);
  1837. SendClientMessage(playerid, ROSA, stringa);
  1838. PlayerInfo[id][Bannato] = 1;
  1839. Ban(id);
  1840. }
  1841. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1842. return 1;
  1843. }
  1844.  
  1845. /*=======================================Kickall*/
  1846. if(!strcmp(cmdtext, "/kickall", true))
  1847. {
  1848. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1849. for(new i = 0; i < MAX_PLAYERS; i++)
  1850. {
  1851. if(IsPlayerConnected(i) && i != playerid)
  1852. {
  1853. GetPlayerName(playerid, nome, 24);
  1854. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha kickato tutti i giocatori. Motivo: {FF66FF}%s", nome, cmdtext[idx]);
  1855. SendClientMessageToAll(ROSA, stringa);
  1856. Kick(i);
  1857. }
  1858. }
  1859. return 1;
  1860. }
  1861.  
  1862. /*=======================================BanAll*/
  1863. if(!strcmp(cmdtext, "/banall", true))
  1864. {
  1865. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
  1866. for(new i = 0; i < MAX_PLAYERS; i++)
  1867. {
  1868. if(IsPlayerConnected(i) && i != playerid)
  1869. {
  1870. GetPlayerName(playerid, nome, 24);
  1871. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha bannato tutti i giocatori. Motivo: {FF66FF}%s", nome, cmdtext[idx]);
  1872. SendClientMessageToAll(ROSA, stringa);
  1873. PlayerInfo[i][Bannato] = 1;
  1874. Ban(i);
  1875. }
  1876. }
  1877. return 1;
  1878. }
  1879.  
  1880. /*=======================================Explode*/
  1881. if(strcmp(cmd, "/explode", true) == 0)
  1882. {
  1883. new tmp[256];
  1884. new id;
  1885. if(IsPlayerAdmin(playerid))
  1886. {
  1887. tmp = strtok(cmdtext, idx);
  1888. if(!strlen(tmp)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /explode [playerid] [motivo]");
  1889. id = strval(tmp);
  1890. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
  1891. if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
  1892. new Float: Px, Float: Pz, Float: Py;
  1893. GetPlayerPos(id, Px, Py, Pz);
  1894. CreateExplosion(Px, Py, Pz, 10, 100);
  1895. CreateExplosion(Px, Py, Pz, 10, 100);
  1896. GetPlayerName(id, nomeid, 24);
  1897. GetPlayerName(playerid, nome, 24);
  1898. format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha fatto esplodere {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s", nome, nomeid, cmdtext[idx]);
  1899. SendClientMessageToAll(ROSA, stringa);
  1900. format(stringa, sizeof(stringa), "*** {FFFFFF}Hai fatto esplodere {FF66FF}%s{FFFFFF}", nomeid);
  1901. SendClientMessage(playerid, ROSA, stringa);
  1902. }
  1903. else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
  1904. return 1;
  1905. }
  1906. return 0;
  1907. }
  1908.  
  1909. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1910. {
  1911. return 1;
  1912. }
  1913.  
  1914. public OnPlayerExitVehicle(playerid, vehicleid)
  1915. {
  1916. //Lavoro consegna
  1917. if(vehicleid == veicoloconsegna1 || vehicleid == veicoloconsegna2 || vehicleid == veicoloconsegna3 || vehicleid == veicoloconsegna4 || vehicleid == veicoloconsegna5 || vehicleid == veicoloconsegna6 || vehicleid == veicoloconsegna7)
  1918. {
  1919. DisablePlayerCheckpoint(playerid);
  1920. }
  1921. //Lavoro Pizzaboy
  1922. if(vehicleid == pizzaboy1 || vehicleid == pizzaboy2 || vehicleid == pizzaboy3 || vehicleid == pizzaboy4 || vehicleid == pizzaboy5 || vehicleid == pizzaboy6 || vehicleid == pizzaboy7)
  1923. {
  1924. DisablePlayerCheckpoint(playerid);
  1925. }
  1926. //Lavoro Venditore HotDog
  1927. if(vehicleid == hotdog1 || vehicleid == hotdog2 || vehicleid == hotdog3 || vehicleid == hotdog4)
  1928. {
  1929. DisablePlayerCheckpoint(playerid);
  1930. }
  1931. return 1;
  1932. }
  1933.  
  1934. public OnPlayerStateChange(playerid, newstate, oldstate)
  1935. {
  1936. new vehicleid = GetPlayerVehicleID(playerid);
  1937. new nome[24];
  1938. if(newstate == PLAYER_STATE_DRIVER)
  1939. {
  1940. /*=====================================Veicoli Admin privati*/
  1941. if(vehicleid == eli_admin1 || vehicleid == auto_admin1 || vehicleid == auto_admin2 || vehicleid == moto_admin1)
  1942. {
  1943. if(IsPlayerAdmin(playerid))
  1944. {
  1945. GetPlayerName(playerid, nome, 24);
  1946. format(stringa, sizeof(stringa), "*** {FFFFFF}Benvenuto in questo veicolo, Admin {FF4444}%s.", nome);
  1947. SendClientMessage(playerid, ROSA, stringa);
  1948. }
  1949. else {RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}solo gli {FF4444}Admin{FFFFFF} possono entrare in questo veicolo.");}
  1950. }
  1951. /*=====================================Veicoli lavoro consegna*/
  1952. if(vehicleid == veicoloconsegna1 || vehicleid == veicoloconsegna2 || vehicleid == veicoloconsegna3 || vehicleid == veicoloconsegna4 || vehicleid == veicoloconsegna5 || vehicleid == veicoloconsegna6 || vehicleid == veicoloconsegna7)
  1953. {
  1954. if(LavoratoreConsegna[playerid] != true) RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai le chiavi di questo veicolo.");
  1955. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai iniziato a lavorare, porta il carico a destinazione seguendo i checkpoints. Per annullare l'incarico, esci dal veicolo.");
  1956. SetPlayerCheckpoint(playerid, 717.7769, -1401.1205, 12.9404, 5.0);
  1957. }
  1958. /*=====================================Veicoli lavoro pizzaboy*/
  1959. if(vehicleid == pizzaboy1 || vehicleid == pizzaboy2 || vehicleid == pizzaboy3 || vehicleid == pizzaboy4 || vehicleid == pizzaboy5 || vehicleid == pizzaboy6 || vehicleid == pizzaboy7)
  1960. {
  1961. if(Pizzaboy[playerid] != true) RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai le chiavi di questo veicolo.");
  1962. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai iniziato a lavorare, porta le pizze alle case seguendo i checkpoints. Per annullare l'incarico, esci dal veicolo.");
  1963. SetPlayerCheckpoint(playerid, 2090.5012, -1762.7268, 12.9697, 5.0);
  1964. }
  1965. /*=====================================Veicoli lavoro hotdog*/
  1966. if(vehicleid == hotdog1 || vehicleid == hotdog2 || vehicleid == hotdog3 || vehicleid == hotdog4)
  1967. {
  1968. if(VendHotDog[playerid] != true) RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai le chiavi di questo veicolo.");
  1969. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai iniziato a lavorare, porta gli hotdog seguendo i checkpoints. Per annullare l'incarico, esci dal veicolo.");
  1970. SetPlayerCheckpoint(playerid, 1197.5222, -945.8870, 42.2574, 5.0);
  1971. }
  1972. }
  1973. return 1;
  1974. }
  1975.  
  1976. public OnPlayerEnterCheckpoint(playerid)
  1977. {
  1978. /*=====================================GPS*/
  1979. if(IsPlayerInRangeOfPoint(playerid, 4.0, 2500.0652, -1677.9636, 13.0304) || IsPlayerInRangeOfPoint(playerid, 4.0, 2008.5146, -1130.1874, 24.9206) || IsPlayerInRangeOfPoint(playerid, 4.0, 2350.3357, -1162.9158, 27.0327) || IsPlayerInRangeOfPoint(playerid, 4.0, 1946.9575, -2099.9319, 13.2093) || IsPlayerInRangeOfPoint(playerid, 4.0, 365.2892, -1594.5588, 31.2771))
  1980. {
  1981. GameTextForPlayer(playerid, "~y~Meta GPS raggiunta!", 3000, 4);
  1982. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  1983. DisablePlayerCheckpoint(playerid);
  1984. }
  1985. if(IsPlayerInRangeOfPoint(playerid, 4.0, 961.7084, -1832.8285, 12.6022) || IsPlayerInRangeOfPoint(playerid, 4.0, 1535.2240, -1672.3832, 13.0518) || IsPlayerInRangeOfPoint(playerid, 4.0, 1179.6179, -919.4143, 42.9274)|| IsPlayerInRangeOfPoint(playerid, 4.0, 1360.4415,-1275.3129,13.0885) || IsPlayerInRangeOfPoint(playerid, 4.0, 1955.5664,-1774.4275,13.2504))
  1986. {
  1987. GameTextForPlayer(playerid, "~y~Meta GPS raggiunta!", 3000, 4);
  1988. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  1989. DisablePlayerCheckpoint(playerid);
  1990. }
  1991. if(IsPlayerInRangeOfPoint(playerid, 4.0, 2243.4275, -1659.5256, 15.2882) || IsPlayerInRangeOfPoint(playerid, 4.0, 1664.6586,-1408.9457,13.3096) || IsPlayerInRangeOfPoint(playerid, 4.0,1664.6586,-1408.9457,13.3096))
  1992. {
  1993. GameTextForPlayer(playerid, "~y~Meta GPS raggiunta!", 3000, 4);
  1994. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  1995. DisablePlayerCheckpoint(playerid);
  1996. }
  1997. /*=====================================Lavoro Consegna*/
  1998. if(LavoratoreConsegna[playerid] == true)
  1999. {
  2000. if(IsPlayerInRangeOfPoint(playerid, 6.0, 717.7769, -1401.1205, 12.9404))
  2001. {
  2002. DisablePlayerCheckpoint(playerid);
  2003. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2004. SetPlayerCheckpoint(playerid, 631.4457, -1314.6154, 13.1527, 5.0);
  2005. }
  2006. if(IsPlayerInRangeOfPoint(playerid, 6.0, 631.4457, -1314.6154, 13.1527))
  2007. {
  2008. DisablePlayerCheckpoint(playerid);
  2009. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2010. SetPlayerCheckpoint(playerid, 685.0699, -1164.3223, 14.7883, 5.0);
  2011. }
  2012. if(IsPlayerInRangeOfPoint(playerid, 6.0, 685.0699, -1164.3223, 14.7883))
  2013. {
  2014. DisablePlayerCheckpoint(playerid);
  2015. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2016. SetPlayerCheckpoint(playerid, 792.1463, -1049.9283, 24.2532, 5.0);
  2017. }
  2018. if(IsPlayerInRangeOfPoint(playerid, 6.0, 792.1463, -1049.9283, 24.2532))
  2019. {
  2020. DisablePlayerCheckpoint(playerid);
  2021. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2022. SetPlayerCheckpoint(playerid, 795.8797, -1048.2489, 24.5434, 5.0);
  2023. }
  2024. if(IsPlayerInRangeOfPoint(playerid, 6.0, 795.8797, -1048.2489, 24.5434))
  2025. {
  2026. DisablePlayerCheckpoint(playerid);
  2027. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2028. SetPlayerCheckpoint(playerid, 960.8597, -979.5512, 38.5668, 5.0);
  2029. }
  2030. if(IsPlayerInRangeOfPoint(playerid, 6.0, 960.8597, -979.5512, 38.5668))
  2031. {
  2032. DisablePlayerCheckpoint(playerid);
  2033. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2034. SetPlayerCheckpoint(playerid, 1018.9778, -1040.4060, 31.2240, 5.0);
  2035. }
  2036. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1018.9778, -1040.4060, 31.2240))
  2037. {
  2038. DisablePlayerCheckpoint(playerid);
  2039. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2040. SetPlayerCheckpoint(playerid, 1160.6720, -1040.4868, 31.4298, 5.0);
  2041. }
  2042. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1160.6720, -1040.4868, 31.4298))
  2043. {
  2044. DisablePlayerCheckpoint(playerid);
  2045. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2046. SetPlayerCheckpoint(playerid, 1171.3936, -1146.5953, 23.3643, 5.0);
  2047. }
  2048. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1171.3936, -1146.5953, 23.3643))
  2049. {
  2050. DisablePlayerCheckpoint(playerid);
  2051. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2052. SetPlayerCheckpoint(playerid, 1319.7435, -1148.4357, 23.3610, 5.0);
  2053. }
  2054. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1319.7435, -1148.4357, 23.3610))
  2055. {
  2056. DisablePlayerCheckpoint(playerid);
  2057. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2058. SetPlayerCheckpoint(playerid, 1319.7435, -1148.4357, 23.3610, 5.0);
  2059. }
  2060. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1319.7435, -1148.4357, 23.3610))
  2061. {
  2062. DisablePlayerCheckpoint(playerid);
  2063. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2064. SetPlayerCheckpoint(playerid, 1479.0820, -1140.1831, 23.6128, 5.0);
  2065. }
  2066. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1479.0820, -1140.1831, 23.6128))
  2067. {
  2068. DisablePlayerCheckpoint(playerid);
  2069. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2070. SetPlayerCheckpoint(playerid, 764.1746, -1349.9253, 13.5160, 5.0);
  2071. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Incarico completato. Riporta il veicolo nel checkpoint per terminare.");
  2072. }
  2073. if(IsPlayerInRangeOfPoint(playerid, 6.0, 764.1746, -1349.9253, 13.5160))
  2074. {
  2075. DisablePlayerCheckpoint(playerid);
  2076. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2077. GameTextForPlayer(playerid, "~y~Lavoro completato!", 3000, 4);
  2078. GivePlayerMoney(playerid, 300);
  2079. }
  2080. }
  2081. if(Pizzaboy[playerid] == true)
  2082. {
  2083. /*=====================================Lavoro Pizzaboy*/
  2084. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2090.5012, -1762.7268, 12.9697))
  2085. {
  2086. DisablePlayerCheckpoint(playerid);
  2087. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2088. SetPlayerCheckpoint(playerid, 2085.7749, -1725.8237, 12.9536, 5.0);
  2089. }
  2090. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2085.7749, -1725.8237, 12.9536))
  2091. {
  2092. DisablePlayerCheckpoint(playerid);
  2093. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2094. SetPlayerCheckpoint(playerid, 2011.9045, -1670.1033, 12.9267, 5.0);
  2095. }
  2096. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2011.9045, -1670.1033, 12.9267))
  2097. {
  2098. DisablePlayerCheckpoint(playerid);
  2099. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2100. SetPlayerCheckpoint(playerid, 2009.7294, -1656.9786, 13.1177, 5.0);
  2101. }
  2102. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2009.7294, -1656.9786, 13.1177))
  2103. {
  2104. DisablePlayerCheckpoint(playerid);
  2105. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2106. SetPlayerCheckpoint(playerid, 2009.5795, -1641.6029, 13.1022, 5.0);
  2107. }
  2108. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2009.5795, -1641.6029, 13.1022))
  2109. {
  2110. DisablePlayerCheckpoint(playerid);
  2111. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2112. SetPlayerCheckpoint(playerid, 1910.5032, -1604.9689, 13.1170, 5.0);
  2113. }
  2114. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1910.5032, -1604.9689, 13.1170))
  2115. {
  2116. DisablePlayerCheckpoint(playerid);
  2117. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2118. SetPlayerCheckpoint(playerid, 1865.0052, -1604.6249, 13.1137, 5.0);
  2119. }
  2120. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1865.0052, -1604.6249, 13.1137))
  2121. {
  2122. DisablePlayerCheckpoint(playerid);
  2123. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2124. SetPlayerCheckpoint(playerid, 1840.4406, -1511.7986, 12.9114, 5.0);
  2125. }
  2126. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1840.4406, -1511.7986, 12.9114))
  2127. {
  2128. DisablePlayerCheckpoint(playerid);
  2129. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2130. SetPlayerCheckpoint(playerid, 1756.5543, -1450.8396, 13.1174, 5.0);
  2131. }
  2132. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1756.5543, -1450.8396, 13.1174))
  2133. {
  2134. DisablePlayerCheckpoint(playerid);
  2135. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2136. SetPlayerCheckpoint(playerid, 1713.6444, -1308.1168, 12.9578, 5.0);
  2137. }
  2138. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1713.6444, -1308.1168, 12.9578))
  2139. {
  2140. DisablePlayerCheckpoint(playerid);
  2141. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2142. SetPlayerCheckpoint(playerid, 1802.4146, -1257.3538, 13.2033, 5.0);
  2143. }
  2144. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1802.4146, -1257.3538, 13.2033))
  2145. {
  2146. DisablePlayerCheckpoint(playerid);
  2147. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2148. SetPlayerCheckpoint(playerid, 1892.2423, -1049.0839, 23.4054, 5.0);
  2149. }
  2150. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1892.2423, -1049.0839, 23.4054))
  2151. {
  2152. DisablePlayerCheckpoint(playerid);
  2153. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2154. SetPlayerCheckpoint(playerid, 1937.2775, -1051.0919, 23.6763, 5.0);
  2155. }
  2156. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1937.2775, -1051.0919, 23.6763))
  2157. {
  2158. DisablePlayerCheckpoint(playerid);
  2159. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2160. SetPlayerCheckpoint(playerid, 2019.4218, -1057.1331, 24.2048, 5.0);
  2161. }
  2162. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2019.4218, -1057.1331, 24.2048))
  2163. {
  2164. DisablePlayerCheckpoint(playerid);
  2165. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2166. SetPlayerCheckpoint(playerid, 2049.9202, -1088.7666, 24.3123, 5.0);
  2167. }
  2168. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2049.9202, -1088.7666, 24.3123))
  2169. {
  2170. DisablePlayerCheckpoint(playerid);
  2171. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2172. SetPlayerCheckpoint(playerid, 2078.2876, -1119.2366, 23.8088, 5.0);
  2173. }
  2174. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2078.2876, -1119.2366, 23.8088))
  2175. {
  2176. DisablePlayerCheckpoint(playerid);
  2177. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2178. SetPlayerCheckpoint(playerid, 2136.2188, -1407.5031, 23.5628, 5.0);
  2179. }
  2180. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2136.2188, -1407.5031, 23.5628))
  2181. {
  2182. DisablePlayerCheckpoint(playerid);
  2183. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2184. SetPlayerCheckpoint(playerid, 2135.5522, -1431.6008, 23.5327, 5.0);
  2185. }
  2186. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2135.5522, -1431.6008, 23.5327))
  2187. {
  2188. DisablePlayerCheckpoint(playerid);
  2189. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2190. SetPlayerCheckpoint(playerid, 2111.9895, -1666.5313, 13.7396, 5.0);
  2191. }
  2192. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2111.9895, -1666.5313, 13.7396))
  2193. {
  2194. DisablePlayerCheckpoint(playerid);
  2195. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2196. SetPlayerCheckpoint(playerid, 2093.8630, -1794.3344, 12.9614, 5.0);
  2197. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Incarico completato. Riporta il veicolo nel checkpoint per terminare.");
  2198. }
  2199. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2093.8630, -1794.3344, 12.9614))
  2200. {
  2201. DisablePlayerCheckpoint(playerid);
  2202. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2203. GameTextForPlayer(playerid, "~y~Lavoro completato!", 3000, 4);
  2204. GivePlayerMoney(playerid, 500);
  2205. }
  2206. }
  2207. /*=====================================Lavoro hotdog*/
  2208. if(VendHotDog[playerid] == true)
  2209. {
  2210. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1197.5222, -945.8870, 42.2574))
  2211. {
  2212. DisablePlayerCheckpoint(playerid);
  2213. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2214. SetPlayerCheckpoint(playerid, 1162.6039, -1033.5615, 31.5724, 5.0);
  2215. }
  2216. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1162.6039, -1033.5615, 31.5724))
  2217. {
  2218. DisablePlayerCheckpoint(playerid);
  2219. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2220. SetPlayerCheckpoint(playerid, 1203.3802, -1144.8864, 23.1528, 5.0);
  2221. }
  2222. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1203.3802, -1144.8864, 23.1528))
  2223. {
  2224. DisablePlayerCheckpoint(playerid);
  2225. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2226. SetPlayerCheckpoint(playerid, 1211.2742, -1379.9830, 13.0196, 5.0);
  2227. }
  2228. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1211.2742, -1379.9830, 13.0196))
  2229. {
  2230. DisablePlayerCheckpoint(playerid);
  2231. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2232. SetPlayerCheckpoint(playerid, 1105.5205, -1408.6232, 13.0052, 5.0);
  2233. }
  2234. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1105.5205, -1408.6232, 13.0052))
  2235. {
  2236. DisablePlayerCheckpoint(playerid);
  2237. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2238. SetPlayerCheckpoint(playerid, 941.7152, -1392.9265, 12.7559, 5.0);
  2239. }
  2240. if(IsPlayerInRangeOfPoint(playerid, 6.0, 941.7152, -1392.9265, 12.7559))
  2241. {
  2242. DisablePlayerCheckpoint(playerid);
  2243. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2244. SetPlayerCheckpoint(playerid, 814.8148, -1393.2880, 12.9743, 5.0);
  2245. }
  2246. if(IsPlayerInRangeOfPoint(playerid, 6.0, 814.8148, -1393.2880, 12.9743))
  2247. {
  2248. DisablePlayerCheckpoint(playerid);
  2249. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2250. SetPlayerCheckpoint(playerid, 791.5134, -1261.3954, 13.1843, 5.0);
  2251. }
  2252. if(IsPlayerInRangeOfPoint(playerid, 6.0, 791.5134, -1261.3954, 13.1843))
  2253. {
  2254. DisablePlayerCheckpoint(playerid);
  2255. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2256. SetPlayerCheckpoint(playerid, 875.4116, -1148.8075, 23.3391, 5.0);
  2257. }
  2258. if(IsPlayerInRangeOfPoint(playerid, 6.0, 875.4116, -1148.8075, 23.3391))
  2259. {
  2260. DisablePlayerCheckpoint(playerid);
  2261. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2262. SetPlayerCheckpoint(playerid, 1046.5488, -1139.0198, 23.1905, 5.0);
  2263. }
  2264. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1046.5488, -1139.0198, 23.1905))
  2265. {
  2266. DisablePlayerCheckpoint(playerid);
  2267. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2268. SetPlayerCheckpoint(playerid, 1167.7229, -1100.4186, 24.7236, 5.0);
  2269. }
  2270. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1167.7229, -1100.4186, 24.7236))
  2271. {
  2272. DisablePlayerCheckpoint(playerid);
  2273. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2274. SetPlayerCheckpoint(playerid, 1207.0366, -878.4235, 42.5009, 5.0);
  2275. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Incarico completato. Riporta il veicolo nel checkpoint per terminare.");
  2276. }
  2277. if(IsPlayerInRangeOfPoint(playerid, 6.0, 1167.7229, -1100.4186, 24.7236))
  2278. {
  2279. DisablePlayerCheckpoint(playerid);
  2280. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  2281. GameTextForPlayer(playerid, "~y~Lavoro completato!", 3000, 4);
  2282. GivePlayerMoney(playerid, 400);
  2283. }
  2284. //Check Arriva al Lavoro
  2285. if(IsPlayerInRangeOfPoint(playerid, 4.0, 780.9424, -1363.6980, 13.5365) || IsPlayerInRangeOfPoint(playerid, 4.0, 2097.9609, -1815.6866, 13.3828) || IsPlayerInRangeOfPoint(playerid, 4.0, 1216.8407, -875.6584, 42.4739))
  2286. {
  2287. DisablePlayerCheckpoint(playerid);
  2288. }
  2289. }
  2290. return 1;
  2291. }
  2292.  
  2293. public OnPlayerLeaveCheckpoint(playerid)
  2294. {
  2295. return 1;
  2296. }
  2297.  
  2298. public OnPlayerEnterRaceCheckpoint(playerid)
  2299. {
  2300. return 1;
  2301. }
  2302.  
  2303. public OnPlayerLeaveRaceCheckpoint(playerid)
  2304. {
  2305. return 1;
  2306. }
  2307.  
  2308. public OnRconCommand(cmd[])
  2309. {
  2310. return 1;
  2311. }
  2312.  
  2313. public OnPlayerRequestSpawn(playerid)
  2314. {
  2315. return 1;
  2316. }
  2317.  
  2318. public OnObjectMoved(objectid)
  2319. {
  2320. return 1;
  2321. }
  2322.  
  2323. public OnPlayerObjectMoved(playerid, objectid)
  2324. {
  2325. return 1;
  2326. }
  2327.  
  2328. public OnPlayerPickUpPickup(playerid, pickupid)
  2329. {
  2330. //Entra interiors
  2331. if(pickupid == PickDisco || pickupid == PickBurgershot || pickupid == PickPizzeria || pickupid == PickBinco || pickupid == PickProLaps || pickupid == PickBanca || pickupid == PickAmmunation || pickupid == PickBGroove1 || pickupid == PickBGroove2 || pickupid == PickBBallas || pickupid == PickBVagos || pickupid == PickBPolizia || pickupid == PickBBikers || pickupid == PickBTriade || pickupid == PickBAtzecas || pickupid == PickComune)
  2332. {
  2333. GameTextForPlayer(playerid, "~y~Premi il tasto sprint per entrare", 3000, 4);
  2334. }
  2335. //Interagisci
  2336. if(pickupid == PickIBanca || pickupid == IDroga1 || pickupid == IDroga2 || pickupid == IDroga3 || pickupid == IPizzeria || pickupid == IBurgershot || pickupid == IDisco || pickupid == IBinco || pickupid == IProlaps || pickupid == IAmmunation || pickupid == Resp1 || pickupid == Resp2 || pickupid == Resp3 || pickupid == Resp4 || pickupid == Resp5 || pickupid == Resp6 || pickupid == IComune)
  2337. {
  2338. GameTextForPlayer(playerid, "~y~Premi il tasto sprint per interagire", 3000, 4);
  2339. }
  2340. //Soldi
  2341. if(pickupid == Banconota[playerid])
  2342. {
  2343. GivePlayerMoney(playerid, banc);
  2344. new nome[24];
  2345. GetPlayerName(playerid, nome, 24);
  2346. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} raccoglie {FFFFFF}%d{00BFFF}$ da terra.", nome, banc);
  2347. SendClientMessageToAll(BLU_CHIARO, stringa);
  2348. }
  2349. //Lavori
  2350. if(pickupid == HotD)
  2351. {
  2352. if(VendHotDog[playerid] == true) GameTextForPlayer(playerid, "~y~Sali sui veicoli per lavorare", 3000, 4);
  2353. else GameTextForPlayer(playerid, "~y~Chiedi il permesso di lavoro al Comune", 3000, 4);
  2354. }
  2355. if(pickupid == Camionisti)
  2356. {
  2357. if(LavoratoreConsegna[playerid] == true) GameTextForPlayer(playerid, "~y~Sali sui veicoli per lavorare", 3000, 4);
  2358. else GameTextForPlayer(playerid, "~y~Chiedi il permesso di lavoro al Comune", 3000, 4);
  2359. }
  2360. if(pickupid == PizzaB)
  2361. {
  2362. if(Pizzaboy[playerid] == true) GameTextForPlayer(playerid, "~y~Sali sui veicoli per lavorare", 3000, 4);
  2363. else GameTextForPlayer(playerid, "~y~Chiedi il permesso di lavoro al Comune", 3000, 4);
  2364. }
  2365. return 1;
  2366. }
  2367.  
  2368. public OnVehicleMod(playerid, vehicleid, componentid)
  2369. {
  2370. return 1;
  2371. }
  2372.  
  2373. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  2374. {
  2375. return 1;
  2376. }
  2377.  
  2378. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  2379. {
  2380. return 1;
  2381. }
  2382.  
  2383. public OnPlayerSelectedMenuRow(playerid, row)
  2384. {
  2385. return 1;
  2386. }
  2387.  
  2388. public OnPlayerExitedMenu(playerid)
  2389. {
  2390. return 1;
  2391. }
  2392.  
  2393. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  2394. {
  2395. return 1;
  2396. }
  2397.  
  2398. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  2399. {
  2400. new nome[24];
  2401. /*==============================================================================Tasti entrare interiors*/
  2402. if((newkeys & KEY_SPRINT))
  2403. {
  2404. //Discoteca
  2405. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1836.0126, -1683.2328, 13.3657))
  2406. {
  2407. FadePlayerScreen(playerid, 0x000000FF, 10);
  2408. new Float:x, Float: y, Float: z;
  2409. GetPlayerName(playerid, nome, 24);
  2410. GetPlayerPos(playerid, x, y, z);
  2411. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2412. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2413. SetPlayerInterior(playerid, 17);
  2414. SetPlayerPos(playerid, 493.5265, -23.6006, 1000.6797);
  2415. SetPlayerFacingAngle(playerid, 350.0625);
  2416. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2417. }
  2418. //BurgerShot
  2419. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1199.4087, -919.3823, 43.1128))
  2420. {
  2421. FadePlayerScreen(playerid, 0x000000FF, 10);
  2422. new Float:x, Float: y, Float: z;
  2423. GetPlayerName(playerid, nome, 24);
  2424. GetPlayerPos(playerid, x, y, z);
  2425. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2426. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2427. SetPlayerInterior(playerid, 10);
  2428. SetPlayerPos(playerid, 364.0989, -74.2291, 1001.5078);
  2429. SetPlayerFacingAngle(playerid, 310.9424);
  2430. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2431. }
  2432. //Pizzeria
  2433. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2104.8066, -1806.3562, 13.5547))
  2434. {
  2435. FadePlayerScreen(playerid, 0x000000FF, 10);
  2436. new Float:x, Float: y, Float: z;
  2437. GetPlayerName(playerid, nome, 24);
  2438. GetPlayerPos(playerid, x, y, z);
  2439. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2440. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2441. SetPlayerInterior(playerid, 5);
  2442. SetPlayerPos(playerid, 372.1908, -132.6964, 1001.4922);
  2443. SetPlayerFacingAngle(playerid, 6.9067);
  2444. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2445. }
  2446. //Binco
  2447. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2244.4541, -1664.9598, 15.4766))
  2448. {
  2449. FadePlayerScreen(playerid, 0x000000FF, 10);
  2450. new Float:x, Float: y, Float: z;
  2451. GetPlayerName(playerid, nome, 24);
  2452. GetPlayerPos(playerid, x, y, z);
  2453. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2454. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2455. SetPlayerInterior(playerid, 15);
  2456. SetPlayerPos(playerid, 208.0200, -110.1315, 1005.1328);
  2457. SetPlayerFacingAngle(playerid, 3.3203);
  2458. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2459. }
  2460. //ProLaps
  2461. if(IsPlayerInRangeOfPoint(playerid, 2.0, 499.8427, -1360.2126, 16.3287))
  2462. {
  2463. FadePlayerScreen(playerid, 0x000000FF, 10);
  2464. new Float:x, Float: y, Float: z;
  2465. GetPlayerName(playerid, nome, 24);
  2466. GetPlayerPos(playerid, x, y, z);
  2467. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2468. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2469. SetPlayerInterior(playerid, 3);
  2470. SetPlayerPos(playerid, 206.8816, -139.1696, 1003.5078);
  2471. SetPlayerFacingAngle(playerid, 356.1557);
  2472. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2473. }
  2474. //Banca di Stato
  2475. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1657.8302, -1395.7705, 13.5469))
  2476. {
  2477. FadePlayerScreen(playerid, 0x000000FF, 10);
  2478. new Float:x, Float: y, Float: z;
  2479. GetPlayerName(playerid, nome, 24);
  2480. GetPlayerPos(playerid, x, y, z);
  2481. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2482. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2483. SetPlayerPos(playerid, 2306.0256, -16.2414, 26.7496);
  2484. SetPlayerFacingAngle(playerid, 286.2411);
  2485. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2486. }
  2487. //Ammunation
  2488. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1367.1731, -1279.3574, 13.5469))
  2489. {
  2490. FadePlayerScreen(playerid, 0x000000FF, 10);
  2491. new Float:x, Float: y, Float: z;
  2492. GetPlayerName(playerid, nome, 24);
  2493. GetPlayerPos(playerid, x, y, z);
  2494. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2495. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2496. SetPlayerInterior(playerid, 7);
  2497. SetPlayerPos(playerid, 315.4380, -142.2053, 999.6016);
  2498. SetPlayerFacingAngle(playerid, 20.2511);
  2499. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2500. }
  2501. //Stazione di polizia
  2502. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1554.5031, -1675.5303, 16.1953))
  2503. {
  2504. if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la {FF4444}polizia{FFFFFF} può entrare.");
  2505. FadePlayerScreen(playerid, 0x000000FF, 10);
  2506. new Float:x, Float: y, Float: z;
  2507. GetPlayerName(playerid, nome, 24);
  2508. GetPlayerPos(playerid, x, y, z);
  2509. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2510. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2511. SetPlayerInterior(playerid, 6);
  2512. SetPlayerPos(playerid, 246.8360, 63.6771, 1003.6406);
  2513. SetPlayerFacingAngle(playerid, 11.1885);
  2514. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2515. }
  2516. //Base Groove 1 (ryder)
  2517. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2459.4397, -1690.9667, 13.5455))
  2518. {
  2519. if(GetPlayerTeam(playerid) != Groove)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Groove{FFFFFF} possono entrare.");
  2520. FadePlayerScreen(playerid, 0x000000FF, 10);
  2521. new Float:x, Float: y, Float: z;
  2522. GetPlayerName(playerid, nome, 24);
  2523. GetPlayerPos(playerid, x, y, z);
  2524. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2525. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2526. SetPlayerInterior(playerid, 2);
  2527. SetPlayerPos(playerid, 2455.1929, -1705.1763, 1013.5078);
  2528. SetPlayerFacingAngle(playerid, 32.6354);
  2529. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2530. }
  2531. //Base Groove 2 (cj)
  2532. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2495.2207, -1690.6324, 14.7656))
  2533. {
  2534. if(GetPlayerTeam(playerid) != Groove)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Groove{FFFFFF} possono entrare.");
  2535. FadePlayerScreen(playerid, 0x000000FF, 10);
  2536. new Float:x, Float: y, Float: z;
  2537. GetPlayerName(playerid, nome, 24);
  2538. GetPlayerPos(playerid, x, y, z);
  2539. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2540. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2541. SetPlayerInterior(playerid, 3);
  2542. SetPlayerPos(playerid, 2495.8367, -1693.4261, 1014.7422);
  2543. SetPlayerFacingAngle(playerid, 181.7836);
  2544. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2545. }
  2546. //Base Ballas
  2547. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2000.1630, -1114.9568, 27.1250))
  2548. {
  2549. if(GetPlayerTeam(playerid) != Ballas)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Ballas{FFFFFF} possono entrare.");
  2550. FadePlayerScreen(playerid, 0x000000FF, 10);
  2551. new Float:x, Float: y, Float: z;
  2552. GetPlayerName(playerid, nome, 24);
  2553. GetPlayerPos(playerid, x, y, z);
  2554. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2555. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2556. SetPlayerInterior(playerid, 5);
  2557. SetPlayerPos(playerid, 318.7632, 1115.8464, 1083.8828);
  2558. SetPlayerFacingAngle(playerid, 359.0991);
  2559. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2560. }
  2561. //Base Vagos
  2562. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2352.0879, -1170.2889, 28.0564))
  2563. {
  2564. if(GetPlayerTeam(playerid) != Vagos)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Vagos{FFFFFF} possono entrare.");
  2565. FadePlayerScreen(playerid, 0x000000FF, 10);
  2566. new Float:x, Float: y, Float: z;
  2567. GetPlayerName(playerid, nome, 24);
  2568. GetPlayerPos(playerid, x, y, z);
  2569. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2570. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2571. SetPlayerInterior(playerid, 8);
  2572. SetPlayerPos(playerid, 2807.4937, -1173.3921, 1025.5703);
  2573. SetPlayerFacingAngle(playerid, 9.1932);
  2574. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2575. }
  2576. //Base Bikers
  2577. if(IsPlayerInRangeOfPoint(playerid, 2.0, 962.0483, -1824.2063, 13.3268))
  2578. {
  2579. if(GetPlayerTeam(playerid) != Bikers)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Bikers{FFFFFF} possono entrare.");
  2580. FadePlayerScreen(playerid, 0x000000FF, 10);
  2581. new Float:x, Float: y, Float: z;
  2582. GetPlayerName(playerid, nome, 24);
  2583. GetPlayerPos(playerid, x, y, z);
  2584. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2585. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2586. SetPlayerPos(playerid, 962.4126, -1819.8746, 515.8799);
  2587. SetPlayerFacingAngle(playerid, 3.1699);
  2588. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2589. }
  2590. //Base Triade
  2591. if(IsPlayerInRangeOfPoint(playerid, 2.0, 363.9694, -1601.4688, 31.9817))
  2592. {
  2593. if(GetPlayerTeam(playerid) != Triade)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Triade{FFFFFF} possono entrare.");
  2594. FadePlayerScreen(playerid, 0x000000FF, 10);
  2595. new Float:x, Float: y, Float: z;
  2596. GetPlayerName(playerid, nome, 24);
  2597. GetPlayerPos(playerid, x, y, z);
  2598. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2599. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2600. SetPlayerInterior(playerid, 6);
  2601. SetPlayerPos(playerid, 774.2307, -49.1291, 1000.5859);
  2602. SetPlayerFacingAngle(playerid, 0.3852);
  2603. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2604. }
  2605. //Base Atzecas
  2606. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1935.0416, -2081.3706, 13.5622))
  2607. {
  2608. if(GetPlayerTeam(playerid) != Atzecas)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Atzecas{FFFFFF} possono entrare.");
  2609. FadePlayerScreen(playerid, 0x000000FF, 10);
  2610. new Float:x, Float: y, Float: z;
  2611. GetPlayerName(playerid, nome, 24);
  2612. GetPlayerPos(playerid, x, y, z);
  2613. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2614. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2615. SetPlayerPos(playerid, 1926.0680, -2084.2607, 441.1686);
  2616. SetPlayerFacingAngle(playerid, 90.1654);
  2617. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2618. }
  2619. //Comune
  2620. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1480.6362, -1770.8400, 18.7958))
  2621. {
  2622. FadePlayerScreen(playerid, 0x000000FF, 10);
  2623. new Float:x, Float: y, Float: z;
  2624. GetPlayerName(playerid, nome, 24);
  2625. GetPlayerPos(playerid, x, y, z);
  2626. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
  2627. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2628. SetPlayerPos(playerid, 384.808624, 173.804992, 1008.382812);
  2629. SetPlayerInterior(playerid, 3);
  2630. SetPlayerFacingAngle(playerid, 90.1654);
  2631. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
  2632. }
  2633.  
  2634. /*==============================================================================Tasti uscire interiors*/
  2635. //Discoteca
  2636. if(GetPlayerInterior(playerid) == 17)
  2637. {
  2638. if(IsPlayerInRangeOfPoint(playerid, 2.0, 493.5561, -24.4094, 1000.6797))
  2639. {
  2640. FadePlayerScreen(playerid, 0x000000FF, 10);
  2641. new Float:x, Float: y, Float: z;
  2642. GetPlayerName(playerid, nome, 24);
  2643. GetPlayerPos(playerid, x, y, z);
  2644. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2645. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2646. SetPlayerInterior(playerid, 0);
  2647. SetPlayerPos(playerid, 1834.6368, -1682.9688, 13.4232);
  2648. SetPlayerFacingAngle(playerid, 85.6301);
  2649. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2650. }
  2651. }
  2652. //BurgerShot
  2653. if(GetPlayerInterior(playerid) == 10)
  2654. {
  2655. if(IsPlayerInRangeOfPoint(playerid, 2.0, 363.4143, -74.8518, 1001.5078))
  2656. {
  2657. FadePlayerScreen(playerid, 0x000000FF, 10);
  2658. new Float:x, Float: y, Float: z;
  2659. GetPlayerName(playerid, nome, 24);
  2660. GetPlayerPos(playerid, x, y, z);
  2661. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2662. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2663. SetPlayerInterior(playerid, 0);
  2664. SetPlayerPos(playerid, 1199.5793, -920.3532, 43.1115);
  2665. SetPlayerFacingAngle(playerid, 179.6778);
  2666. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2667. }
  2668. }
  2669. //Pizzeria & Base Ballas
  2670. if(GetPlayerInterior(playerid) == 5)
  2671. {
  2672. if(IsPlayerInRangeOfPoint(playerid, 2.0, 372.3421, -133.2352, 1001.4922))
  2673. {
  2674. FadePlayerScreen(playerid, 0x000000FF, 10);
  2675. new Float:x, Float: y, Float: z;
  2676. GetPlayerName(playerid, nome, 24);
  2677. GetPlayerPos(playerid, x, y, z);
  2678. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2679. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2680. SetPlayerInterior(playerid, 0);
  2681. SetPlayerPos(playerid, 2103.8457, -1806.5625, 13.5547);
  2682. SetPlayerFacingAngle(playerid, 81.7706);
  2683. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2684. }
  2685. if(IsPlayerInRangeOfPoint(playerid, 2.0, 318.5674, 1114.9526, 1083.8828))
  2686. {
  2687. FadePlayerScreen(playerid, 0x000000FF, 10);
  2688. new Float:x, Float: y, Float: z;
  2689. GetPlayerName(playerid, nome, 24);
  2690. GetPlayerPos(playerid, x, y, z);
  2691. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2692. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2693. SetPlayerInterior(playerid, 0);
  2694. SetPlayerPos(playerid, 1999.9961, -1115.4863, 27.1318);
  2695. SetPlayerFacingAngle(playerid, 178.3041);
  2696. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2697. }
  2698. }
  2699. //Banca di Stato
  2700. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2305.3340, -16.0902, 26.7422))
  2701. {
  2702. FadePlayerScreen(playerid, 0x000000FF, 10);
  2703. new Float:x, Float: y, Float: z;
  2704. GetPlayerName(playerid, nome, 24);
  2705. GetPlayerPos(playerid, x, y, z);
  2706. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2707. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2708. SetPlayerPos(playerid, 1657.7428, -1397.1429, 13.5469);
  2709. SetPlayerFacingAngle(playerid, 172.2101);
  2710. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2711. if(Rapinatore[playerid] == true)
  2712. {
  2713. RapinaAttiva = false;
  2714. Rapinatore[playerid] = false;
  2715. KillTimer(TimerRapina);
  2716. GetPlayerName(playerid, nome, 24);
  2717. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai fallito una rapina alla banca.");
  2718. GetPlayerName(playerid, nome, 24);
  2719. GetPlayerPos(playerid, x, y, z);
  2720. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha fallito una rapina in banca.", nome);
  2721. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2722. }
  2723. }
  2724. //Ammunation
  2725. if(GetPlayerInterior(playerid) == 7)
  2726. {
  2727. if(IsPlayerInRangeOfPoint(playerid, 2.0, 315.6836, -142.7931, 999.6016))
  2728. {
  2729. FadePlayerScreen(playerid, 0x000000FF, 10);
  2730. new Float:x, Float: y, Float: z;
  2731. GetPlayerName(playerid, nome, 24);
  2732. GetPlayerPos(playerid, x, y, z);
  2733. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2734. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2735. SetPlayerInterior(playerid, 0);
  2736. SetPlayerPos(playerid, 1367.1580, -1279.4025, 13.5469);
  2737. SetPlayerFacingAngle(playerid, 94.1985);
  2738. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2739. }
  2740. }
  2741. //Base Groove 1 (ryder)
  2742. if(GetPlayerInterior(playerid) == 2)
  2743. {
  2744. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2455.6248, -1706.5425, 1013.5078))
  2745. {
  2746. FadePlayerScreen(playerid, 0x000000FF, 10);
  2747. new Float:x, Float: y, Float: z;
  2748. GetPlayerName(playerid, nome, 24);
  2749. GetPlayerPos(playerid, x, y, z);
  2750. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2751. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2752. SetPlayerInterior(playerid, 0);
  2753. SetPlayerPos(playerid, 2459.6699, -1689.2321, 13.5330);
  2754. SetPlayerFacingAngle(playerid, 347.2017);
  2755. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2756. }
  2757. }
  2758. //Base Groove 2 (cj), ProLaps & Comune
  2759. if(GetPlayerInterior(playerid) == 3)
  2760. {
  2761. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2496.1160, -1692.2500, 1014.7422))
  2762. {
  2763. FadePlayerScreen(playerid, 0x000000FF, 10);
  2764. new Float:x, Float: y, Float: z;
  2765. GetPlayerName(playerid, nome, 24);
  2766. GetPlayerPos(playerid, x, y, z);
  2767. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2768. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2769. SetPlayerInterior(playerid, 0);
  2770. SetPlayerPos(playerid, 2495.3174, -1689.0780, 14.2060);
  2771. SetPlayerFacingAngle(playerid, 359.8077);
  2772. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2773. }
  2774. if(IsPlayerInRangeOfPoint(playerid, 2.0, 207.0748, -140.1034, 1003.5078))
  2775. {
  2776. FadePlayerScreen(playerid, 0x000000FF, 10);
  2777. new Float:x, Float: y, Float: z;
  2778. GetPlayerName(playerid, nome, 24);
  2779. GetPlayerPos(playerid, x, y, z);
  2780. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2781. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2782. SetPlayerInterior(playerid, 0);
  2783. SetPlayerPos(playerid, 500.2337, -1359.3263, 16.2514);
  2784. SetPlayerFacingAngle(playerid, 320.7487);
  2785. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2786. }
  2787. if(IsPlayerInRangeOfPoint(playerid, 2.0, 389.8217, 174.0705, 1008.3828))
  2788. {
  2789. FadePlayerScreen(playerid, 0x000000FF, 10);
  2790. new Float:x, Float: y, Float: z;
  2791. GetPlayerName(playerid, nome, 24);
  2792. GetPlayerPos(playerid, x, y, z);
  2793. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2794. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2795. SetPlayerInterior(playerid, 0);
  2796. SetPlayerPos(playerid, 1480.8525, -1769.4618, 18.7958);
  2797. SetPlayerFacingAngle(playerid, 1.7449);
  2798. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2799. }
  2800. }
  2801. //Binco
  2802. if(GetPlayerInterior(playerid) == 15)
  2803. {
  2804. if(IsPlayerInRangeOfPoint(playerid, 2.0, 207.8046, -111.0572, 1005.1328))
  2805. {
  2806. FadePlayerScreen(playerid, 0x000000FF, 10);
  2807. new Float:x, Float: y, Float: z;
  2808. GetPlayerName(playerid, nome, 24);
  2809. GetPlayerPos(playerid, x, y, z);
  2810. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2811. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2812. SetPlayerInterior(playerid, 0);
  2813. SetPlayerPos(playerid, 2244.3215, -1664.1178, 15.4766);
  2814. SetPlayerFacingAngle(playerid, 345.7501);
  2815. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2816. }
  2817. }
  2818. //Polizia & Base Triade
  2819. if(GetPlayerInterior(playerid) == 6)
  2820. {
  2821. if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.7747, 62.5972, 1003.6406))
  2822. {
  2823. FadePlayerScreen(playerid, 0x000000FF, 10);
  2824. new Float:x, Float: y, Float: z;
  2825. GetPlayerName(playerid, nome, 24);
  2826. GetPlayerPos(playerid, x, y, z);
  2827. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2828. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2829. SetPlayerInterior(playerid, 0);
  2830. SetPlayerPos(playerid, 1553.5432, -1675.3571, 16.1953);
  2831. SetPlayerFacingAngle(playerid, 90.7525);
  2832. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2833. }
  2834. if(IsPlayerInRangeOfPoint(playerid, 2.0, 774.0907, -50.1249, 1000.5859))
  2835. {
  2836. FadePlayerScreen(playerid, 0x000000FF, 10);
  2837. new Float:x, Float: y, Float: z;
  2838. GetPlayerName(playerid, nome, 24);
  2839. GetPlayerPos(playerid, x, y, z);
  2840. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2841. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2842. SetPlayerInterior(playerid, 0);
  2843. SetPlayerPos(playerid, 364.4635, -1599.8014, 31.9585);
  2844. SetPlayerFacingAngle(playerid, 356.3073);
  2845. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2846. }
  2847.  
  2848. }
  2849. //Base Vagos
  2850. if(GetPlayerInterior(playerid) == 8)
  2851. {
  2852. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2807.5852, -1174.6793, 1025.5703))
  2853. {
  2854. FadePlayerScreen(playerid, 0x000000FF, 10);
  2855. new Float:x, Float: y, Float: z;
  2856. GetPlayerName(playerid, nome, 24);
  2857. GetPlayerPos(playerid, x, y, z);
  2858. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2859. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2860. SetPlayerInterior(playerid, 0);
  2861. SetPlayerPos(playerid, 2352.1755, -1168.9280, 27.9894);
  2862. SetPlayerFacingAngle(playerid, 359.7931);
  2863. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2864. }
  2865. }
  2866. //Base Bikers
  2867. if(IsPlayerInRangeOfPoint(playerid, 2.0, 962.3438, -1821.0420, 515.8799))
  2868. {
  2869. FadePlayerScreen(playerid, 0x000000FF, 10);
  2870. new Float:x, Float: y, Float: z;
  2871. GetPlayerName(playerid, nome, 24);
  2872. GetPlayerPos(playerid, x, y, z);
  2873. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2874. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2875. SetPlayerInterior(playerid, 0);
  2876. SetPlayerPos(playerid, 961.5237, -1825.3502, 13.3179);
  2877. SetPlayerFacingAngle(playerid, 167.3347);
  2878. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2879. }
  2880. //Base Atzecas
  2881. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1927.4575, -2084.3145, 441.1686))
  2882. {
  2883. FadePlayerScreen(playerid, 0x000000FF, 10);
  2884. new Float:x, Float: y, Float: z;
  2885. GetPlayerName(playerid, nome, 24);
  2886. GetPlayerPos(playerid, x, y, z);
  2887. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
  2888. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2889. SetPlayerInterior(playerid, 0);
  2890. SetPlayerPos(playerid, 1936.8071, -2080.9675, 13.5614);
  2891. SetPlayerFacingAngle(playerid, 264.7938);
  2892. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
  2893. }
  2894.  
  2895. }
  2896.  
  2897. /*==============================================================================Tasti interagire*/
  2898. if(newkeys & KEY_SPRINT)
  2899. {
  2900. //Banca
  2901. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2316.1282, -10.0103, 26.7422))
  2902. {
  2903. ShowPlayerDialog(playerid, BANCA, DIALOG_STYLE_LIST, "{33AA33}Banca:", "{FFFFFF}Conto in banca\nPreleva\nDeposita", "Scegli", "Chiudi");
  2904. }
  2905. //Spacciatore 1
  2906. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2325.4238, -1252.2784, 22.5000))
  2907. {
  2908. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2909. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2910. ShowPlayerDialog(playerid, COMPRADROGA, DIALOG_STYLE_LIST, "{33AA33}Spacciatore:", "{FFFFFF}Marijuana 300$\nCocaina 500$\nEroina 600$\nHashish 1000$", "Compra", "Chiudi");
  2911. }
  2912. //Spacciatore 2
  2913. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1394.6309, -1460.5256, 11.6406))
  2914. {
  2915. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2916. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2917. ShowPlayerDialog(playerid, COMPRADROGA, DIALOG_STYLE_LIST, "{33AA33}Spacciatore:", "{FFFFFF}Marijuana 300$\nCocaina 500$\nEroina 600$\nHashish 1000$", "Compra", "Chiudi");
  2918. }
  2919. //Spacciatore 3
  2920. if(IsPlayerInRangeOfPoint(playerid, 2.0, 975.9379, -1286.6793, 13.5540))
  2921. {
  2922. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2923. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2924. ShowPlayerDialog(playerid, COMPRADROGA, DIALOG_STYLE_LIST, "{33AA33}Spacciatore:", "{FFFFFF}Marijuana 300$\nCocaina 500$\nEroina 600$\nHashish 1000$", "Compra", "Chiudi");
  2925. }
  2926. //Pizzeria
  2927. if(GetPlayerInterior(playerid) == 5)
  2928. {
  2929. if(IsPlayerInRangeOfPoint(playerid, 2.0, 374.5851, -119.1880, 1001.4995))
  2930. {
  2931. ShowPlayerDialog(playerid, COMPRAPIZZA, DIALOG_STYLE_LIST, "{33AA33}Well Stacked Pizza:", "{FFFFFF}Pizza ridotta 10$\nPizza media 20$\nPizza gigante 40$\nBibita 10$\nInsalata 15$", "Compra", "Chiudi");
  2932. }
  2933. }
  2934. //Burger Shot
  2935. if(GetPlayerInterior(playerid) == 10)
  2936. {
  2937. if(IsPlayerInRangeOfPoint(playerid, 2.0, 376.7253, -67.7049, 1001.5151))
  2938. {
  2939. ShowPlayerDialog(playerid, COMPRABSHOT, DIALOG_STYLE_LIST, "{33AA33}Burger Shot:", "{FFFFFF}Hamburger piccolo 15$\nHamburger medio 35$\nHamburger grande 50$\nBibita 15$\nPatatine piccolo 20$\nPatatine grande 40$", "Compra", "Chiudi");
  2940. }
  2941. }
  2942. //Discoteca
  2943. if(GetPlayerInterior(playerid) == 17)
  2944. {
  2945. if(IsPlayerInRangeOfPoint(playerid, 2.0, 499.4358, -20.5824, 1000.6797))
  2946. {
  2947. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2948. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2949. ShowPlayerDialog(playerid, COMPRADISCO, DIALOG_STYLE_LIST, "{33AA33}Discoteca:", "{FFFFFF}Bibita 20$\nBirra 30$\nSuper Alcolico 50$\nCocktail 100$", "Compra", "Chiudi");
  2950. }
  2951. }
  2952. //Binco
  2953. if(GetPlayerInterior(playerid) == 15)
  2954. {
  2955. if(IsPlayerInRangeOfPoint(playerid, 2.0, 217.3809, -98.3706, 1005.2578))
  2956. {
  2957. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2958. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2959. ShowPlayerDialog(playerid, COMPRAVESTITI, DIALOG_STYLE_LIST, "{33AA33}Binco:", "{FFFFFF}Occhiali 1 \nOcchiali 2 \nOcchiali 3 \nCasco 1 \nCasco 2 \nCasco 3 \nMaschera 1 \nMaschera 2 ", "Compra", "Chiudi");
  2960. }
  2961. }
  2962. //ProLaps & comune
  2963. if(GetPlayerInterior(playerid) == 3)
  2964. {
  2965. if(IsPlayerInRangeOfPoint(playerid, 2.0, 199.5624, -127.6274, 1003.5152))
  2966. {
  2967. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2968. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2969. ShowPlayerDialog(playerid, COMPRAVESTITI, DIALOG_STYLE_LIST, "{33AA33}Binco:", "{FFFFFF}Occhiali 1 \nOcchiali 2 \nOcchiali 3 \nCasco 1 \nCasco 2 \nCasco 3 \nMaschera 1 \nMaschera 2 ", "Compra", "Chiudi");
  2970. }
  2971. if(IsPlayerInRangeOfPoint(playerid, 2.0, 362.6935, 173.6410, 1008.3828))
  2972. {
  2973. if(GetPlayerTeam(playerid) != Cittadini)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Cittadini{FFFFFF} possono chiedere di lavorare.");
  2974. ShowPlayerDialog(playerid, SCEGLILAVORO, DIALOG_STYLE_LIST, "{33AA33}Lavori:", "Camionista\nPizzaboy\nVenditore di HotDog", "Scegli", "Chiudi");
  2975. new Float:x, Float: y, Float: z;
  2976. GetPlayerPos(playerid, x, y, z);
  2977. GetPlayerName(playerid, nome, 24);
  2978. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} parla con un impiegato comunale.", nome);
  2979. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  2980. }
  2981. }
  2982. //Ammunation
  2983. if(GetPlayerInterior(playerid) == 7)
  2984. {
  2985. if(IsPlayerInRangeOfPoint(playerid, 2.0, 308.2633, -141.1325, 999.6016))
  2986. {
  2987. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono comprare armi.");
  2988. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2989. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2990. ShowPlayerDialog(playerid, COMPRARMI, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "{FFFFFF}Pistole\nArmi leggere\nFucili a pompa\nFucili d'assalto\nFucili di precisione\nGranate\nArmatura 700$", "Compra", "Chiudi");
  2991. }
  2992. }
  2993. //Area respawn
  2994. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2231.8052, -1333.4749, 23.9816))
  2995. {
  2996. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
  2997. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  2998. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  2999. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
  3000. new Float:x, Float: y, Float: z;
  3001. GetPlayerPos(playerid, x, y, z);
  3002. GetPlayerName(playerid, nome, 24);
  3003. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
  3004. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3005. dini_IntSet(pFile, "AreaRespawn", 1);
  3006. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3007. }
  3008. //Area respawn
  3009. if(IsPlayerInRangeOfPoint(playerid, 2.0, 2004.9958, -1443.7739, 13.5625))
  3010. {
  3011. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
  3012. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  3013. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  3014. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
  3015. new Float:x, Float: y, Float: z;
  3016. GetPlayerPos(playerid, x, y, z);
  3017. GetPlayerName(playerid, nome, 24);
  3018. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
  3019. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3020. dini_IntSet(pFile, "AreaRespawn", 2);
  3021. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3022. }
  3023. //Area respawn
  3024. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1182.2101, -1324.9923, 13.5817))
  3025. {
  3026. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
  3027. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  3028. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  3029. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
  3030. new Float:x, Float: y, Float: z;
  3031. GetPlayerPos(playerid, x, y, z);
  3032. GetPlayerName(playerid, nome, 24);
  3033. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
  3034. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3035. dini_IntSet(pFile, "AreaRespawn", 3);
  3036. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3037. }
  3038. //Area respawn
  3039. if(IsPlayerInRangeOfPoint(playerid, 2.0, 731.9648, -1275.7582, 13.5664))
  3040. {
  3041. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
  3042. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  3043. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  3044. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
  3045. new Float:x, Float: y, Float: z;
  3046. GetPlayerPos(playerid, x, y, z);
  3047. GetPlayerName(playerid, nome, 24);
  3048. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
  3049. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3050. dini_IntSet(pFile, "AreaRespawn", 4);
  3051. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3052. }
  3053. //Area respawn
  3054. if(IsPlayerInRangeOfPoint(playerid, 2.0, 153.7769, -1942.7628, 3.7734))
  3055. {
  3056. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
  3057. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  3058. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  3059. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
  3060. new Float:x, Float: y, Float: z;
  3061. GetPlayerPos(playerid, x, y, z);
  3062. GetPlayerName(playerid, nome, 24);
  3063. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
  3064. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3065. dini_IntSet(pFile, "AreaRespawn", 5);
  3066. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3067. }
  3068. //Area respawn
  3069. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1244.5392, -2054.8833, 59.8589))
  3070. {
  3071. if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
  3072. if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
  3073. if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
  3074. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
  3075. new Float:x, Float: y, Float: z;
  3076. GetPlayerPos(playerid, x, y, z);
  3077. GetPlayerName(playerid, nome, 24);
  3078. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
  3079. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3080. dini_IntSet(pFile, "AreaRespawn", 6);
  3081. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3082. }
  3083. }
  3084.  
  3085. if((newkeys & KEY_FIRE))
  3086. {
  3087. //Accensione motore
  3088. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  3089. {
  3090. new vehicleid = GetPlayerVehicleID(playerid);
  3091. if(Acceso[vehicleid] == false)
  3092. {
  3093. new engine, lights, alarm, doors, bonnet, boot, objective;
  3094. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  3095. SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
  3096. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai acceso il motore.");
  3097. new Float:x, Float: y, Float: z;
  3098. GetPlayerPos(playerid, x, y, z);
  3099. GetPlayerName(playerid, nome, 24);
  3100. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} accende il motore.", nome);
  3101. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3102. Acceso[vehicleid] = true;
  3103. }
  3104. else
  3105. {
  3106. new engine, lights, alarm, doors, bonnet, boot, objective;
  3107. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  3108. SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
  3109. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai spento il motore.");
  3110. new Float:x, Float: y, Float: z;
  3111. GetPlayerPos(playerid, x, y, z);
  3112. GetPlayerName(playerid, nome, 24);
  3113. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} spegne il motore.", nome);
  3114. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3115. Acceso[vehicleid] = false;
  3116. }
  3117. }
  3118. }
  3119.  
  3120. //Accensione Fari
  3121. if(newkeys & KEY_ANALOG_UP)
  3122. {
  3123. new vehicleid = GetPlayerVehicleID(playerid);
  3124. if(Luci[vehicleid] == false)
  3125. {
  3126. new engine, lights, alarm, doors, bonnet, boot, objective;
  3127. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  3128. SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
  3129. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai acceso i fari.");
  3130. new Float:x, Float: y, Float: z;
  3131. GetPlayerPos(playerid, x, y, z);
  3132. GetPlayerName(playerid, nome, 24);
  3133. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} accende i fari.", nome);
  3134. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3135. Luci[vehicleid] = true;
  3136. }
  3137. else
  3138. {
  3139. new engine, lights, alarm, doors, bonnet, boot, objective;
  3140. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  3141. SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);
  3142. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai spento i fari.");
  3143. new Float:x, Float: y, Float: z;
  3144. GetPlayerPos(playerid, x, y, z);
  3145. GetPlayerName(playerid, nome, 24);
  3146. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} spegne i fari.", nome);
  3147. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3148. Luci[vehicleid] = false;
  3149. }
  3150. }
  3151. return 1;
  3152. }
  3153.  
  3154. public OnRconLoginAttempt(ip[], password[], success)
  3155. {
  3156. return 1;
  3157. }
  3158.  
  3159. public OnPlayerUpdate(playerid)
  3160. {
  3161. new nome[24];
  3162.  
  3163. /*==============================================================================Anticheats*/
  3164. //Anti jetpack
  3165. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
  3166. {
  3167. if(!IsPlayerAdmin(playerid))
  3168. {
  3169. GetPlayerName(playerid, nome, 24);
  3170. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato bannato dal Server. [Motivo: {FFFFFF}Uso di jetpack{00BFFF}]", nome);
  3171. SendClientMessageToAll(BLU_CHIARO, stringa);
  3172. SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato bannato. Motivo: {33AA33}Uso di Jetpack{FFFFFF}.");
  3173. PlayerInfo[playerid][Bannato] = 1;
  3174. Ban(playerid);
  3175. }
  3176. }
  3177. //AntiHighping
  3178. if(GetPlayerPing(playerid) != 65535)
  3179. {
  3180. if(GetPlayerPing(playerid) >= Massimoping)
  3181. {
  3182. GetPlayerName(playerid, nome, 24);
  3183. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Ping alto{00BFFF}]", nome);
  3184. SendClientMessageToAll(BLU_CHIARO, stringa);
  3185. SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato kickato. Motivo: {33AA33}Ping alto{FFFFFF}.");
  3186. Kick(playerid);
  3187. }
  3188. }
  3189. /*==============================================================================Armatura*/
  3190. new Float: Armatura;
  3191. GetPlayerArmour(playerid, Armatura);
  3192. if(Armatura < 1) if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
  3193. return 1;
  3194. }
  3195.  
  3196. public OnPlayerStreamIn(playerid, forplayerid)
  3197. {
  3198. return 1;
  3199. }
  3200.  
  3201. public OnPlayerStreamOut(playerid, forplayerid)
  3202. {
  3203. return 1;
  3204. }
  3205.  
  3206. public OnVehicleStreamIn(vehicleid, forplayerid)
  3207. {
  3208. return 1;
  3209. }
  3210.  
  3211. public OnVehicleStreamOut(vehicleid, forplayerid)
  3212. {
  3213. return 1;
  3214. }
  3215.  
  3216. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3217. {
  3218. new nome[24];
  3219. /*==========================================================================Registrazione*/
  3220. if(dialogid == REGISTER_DIALOG)
  3221. {
  3222. if(response)
  3223. {
  3224. GetPlayerName(playerid, nome, 24);
  3225. if(!strlen(inputtext))
  3226. {
  3227. format(stringa, sizeof(stringa), "{FF4444}Errore:{FFFFFF} Inserisci una password.\n\n{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\n{FFFFFF}Non sei registrato.\nPer giocare è necessario registrare il proprio account.\nRegistrandoti, accetti le regole del Server.\n\nInserisci una {FF4444}password{FFFFFF} per registrarti.", nome);
  3228. ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
  3229. return 0;
  3230. }
  3231. if(strfind(inputtext, "=", true) == 0)
  3232. {
  3233. format(stringa, sizeof(stringa), "{FF4444}Errore:{FFFFFF} Non puoi utilizzare {FF4444}={FFFFFF} come password.\n\n{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\n{FFFFFF}Non sei registrato.\nPer giocare è necessario registrare il proprio account.\nRegistrandoti, accetti le regole del Server.\n\nInserisci una {FF4444}password{FFFFFF} per registrarti.", nome);
  3234. ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
  3235. return 0;
  3236. }
  3237. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3238. dini_Create(pFile);
  3239. dini_Set(pFile, "Password", inputtext);
  3240. dini_IntSet(pFile, "Soldi", 0);
  3241. dini_IntSet(pFile, "Kills", 0);
  3242. dini_IntSet(pFile, "Deaths", 0);
  3243. dini_IntSet(pFile, "Bannato", 0);
  3244. dini_IntSet(pFile, "SoldiInBanca", 0);
  3245. dini_IntSet(pFile, "Casco", 0);
  3246. dini_IntSet(pFile, "Maschera", 0);
  3247. dini_IntSet(pFile, "Occhiali", 0);
  3248. dini_IntSet(pFile, "Ricercato", 0);
  3249. dini_IntSet(pFile, "AreaRespawn", 0);
  3250. format(stringa,sizeof(stringa), "** {FFFFFF}%s{00BFFF} registra con successo un nuovo Account.", nome);
  3251. SendClientMessageToAll(BLU_CHIARO, stringa);
  3252. format(stringa, sizeof(stringa), "{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\nHai registrato con successo un Account.\nOra esegui il Login per inizare a giocare.\n\n{FFFFFF}Inserisci la password del tuo Account.", nome);
  3253. ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
  3254. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai creato con successo un account. Ora esegui il Login.");
  3255. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3256. }
  3257. else if(!response)
  3258. {
  3259. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Registrazione obbligatoria{FFFFFF}.");
  3260. GetPlayerName(playerid, nome, 24);
  3261. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Registrazione obbligatoria{00BFFF}]", nome);
  3262. SendClientMessageToAll(BLU_CHIARO, stringa);
  3263. Kick(playerid);
  3264. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3265. }
  3266. }
  3267.  
  3268. /*==========================================================================Login*/
  3269. if(dialogid == LOGIN_DIALOG)
  3270. {
  3271. if(response)
  3272. {
  3273. GetPlayerName(playerid, nome, 24);
  3274. if(!strlen(inputtext))
  3275. {
  3276. format(stringa, sizeof stringa, "{FF4444}Errore:{FFFFFF} Inserisci una password.\n\n{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\nIl tuo Account risulta registrato.\n\n{FFFFFF}Inserisci la password del tuo Account.", nome);
  3277. ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
  3278. return 0;
  3279. }
  3280. if(!strcmp(inputtext, dini_Get(pFile, "Password"), false))
  3281. {
  3282. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3283. Loggato[playerid] = true;
  3284. ResetPlayerMoney(playerid);
  3285. GivePlayerMoney(playerid, dini_Int(pFile, "Soldi"));
  3286. PlayerInfo[playerid][pKills] = dini_Int(pFile, "Kills");
  3287. PlayerInfo[playerid][pDeaths] = dini_Int(pFile, "Deaths");
  3288. PlayerInfo[playerid][Bannato] = dini_Int(pFile, "Bannato");
  3289. SetPlayerWantedLevel(playerid, dini_Int(pFile, "Ricercato"));
  3290. format(stringa, sizeof(stringa), "* {FFFFFF}Benvenuto {33AA33}%s{FFFFFF}, i tuoi dati sono stati caricati con successo. Attendi qualche secondo.", nome);
  3291. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  3292. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} esegue il Login con successo.", nome);
  3293. SendClientMessageToAll(BLU_CHIARO, stringa);
  3294. SetTimerEx("Spawn", 5000, false, "d", playerid);
  3295. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3296. return 1;
  3297. }
  3298. else
  3299. {
  3300. format(stringa, sizeof(stringa), "{FF4444}Errore:{FFFFFF} Password errata, al terzo tentativo sbagliato, verrai {FF4444}kickato{FFFFFF}.\n\n{FFFFFF}Benvenuto {FF4444}%s{FFFFFF}!\nIl tuo Account risulta registrato.\n\n{FFFFFF}Inserisci la password del tuo Account.", nome);
  3301. ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
  3302. Avvisi[playerid] ++;
  3303. if(Avvisi[playerid] == 3)
  3304. {
  3305. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Tentativi Login falliti{FFFFFF}.");
  3306. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Tentativi Login falliti{00BFFF}]", nome);
  3307. SendClientMessageToAll(BLU_CHIARO, stringa);
  3308. Kick(playerid);
  3309. }
  3310. return 0;
  3311. }
  3312. }
  3313. else if(!response)
  3314. {
  3315. GetPlayerName(playerid, nome, 24);
  3316. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Login obbligatorio{FFFFFF}.");
  3317. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Login obbligatorio{00BFFF}]", nome);
  3318. SendClientMessageToAll(BLU_CHIARO, stringa);
  3319. Kick(playerid);
  3320. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3321. }
  3322. }
  3323.  
  3324. /*==========================================================================Scelta Team*/
  3325. if(dialogid == SCELTA_TEAM)
  3326. {
  3327. if(response)
  3328. {
  3329. GetPlayerName(playerid, nome, 24);
  3330. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Digita {FF66FF}/aiuto {FFFFFF}per ambientarti nel Server.");
  3331. //Groove
  3332. if(listitem == 0)
  3333. {
  3334. new rand = random(sizeof(Rskingroove));
  3335. SetPlayerSkin(playerid, Rskingroove[rand][0]);
  3336. SetPlayerTeam(playerid, Groove);
  3337. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte di Groove Street.", nome);
  3338. SendClientMessageToAll(BLU_CHIARO, stringa);
  3339. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Groove Street.");
  3340. SetCameraBehindPlayer(playerid);
  3341. SetPlayerColor(playerid, COLORE_GROOVE);
  3342. GivePlayerWeapon(playerid, 5, 1);
  3343. GivePlayerWeapon(playerid, 28, 400);
  3344. GivePlayerWeapon(playerid, 25, 500);
  3345. TogglePlayerControllable(playerid, 1);
  3346. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2496.1279, -1683.8066, 13.3645);}
  3347. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  3348. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  3349. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  3350. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  3351. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  3352. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  3353. }
  3354. //Ballas
  3355. if(listitem == 1)
  3356. {
  3357. new rand = random(sizeof(Rskinballas));
  3358. SetPlayerSkin(playerid, Rskinballas[rand][0]);
  3359. SetPlayerTeam(playerid, Ballas);
  3360. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte dei Ballas.", nome);
  3361. SendClientMessageToAll(BLU_CHIARO, stringa);
  3362. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Ballas.");
  3363. SetCameraBehindPlayer(playerid);
  3364. SetPlayerColor(playerid, COLORE_BALLAS);
  3365. GivePlayerWeapon(playerid, 1, 1);
  3366. GivePlayerWeapon(playerid, 32, 450);
  3367. GivePlayerWeapon(playerid, 22, 400);
  3368. TogglePlayerControllable(playerid, 1);
  3369. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2000.0258, -1121.1666, 26.7448);}
  3370. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  3371. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  3372. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  3373. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  3374. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  3375. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  3376. }
  3377. //Vagos
  3378. if(listitem == 2)
  3379. {
  3380. new rand = random(sizeof(Rskinvagos));
  3381. SetPlayerSkin(playerid, Rskinvagos[rand][0]);
  3382. SetPlayerTeam(playerid, Vagos);
  3383. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte dei Vagos.", nome);
  3384. SendClientMessageToAll(BLU_CHIARO, stringa);
  3385. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Vagos.");
  3386. SetCameraBehindPlayer(playerid);
  3387. SetPlayerColor(playerid, COLORE_VAGOS);
  3388. GivePlayerWeapon(playerid, 6, 1);
  3389. GivePlayerWeapon(playerid, 26, 400);
  3390. GivePlayerWeapon(playerid, 28, 450);
  3391. TogglePlayerControllable(playerid, 1);
  3392. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2323.1489, -1192.1659, 27.9693);}
  3393. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  3394. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  3395. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  3396. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  3397. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  3398. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  3399. }
  3400. //Atzecas
  3401. if(listitem == 3)
  3402. {
  3403. new rand = random(sizeof(Rskinatz));
  3404. SetPlayerSkin(playerid, Rskinatz[rand][0]);
  3405. SetPlayerTeam(playerid, Atzecas);
  3406. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte degli Atzecas.", nome);
  3407. SendClientMessageToAll(BLU_CHIARO, stringa);
  3408. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Atzecas.");
  3409. SetCameraBehindPlayer(playerid);
  3410. SetPlayerColor(playerid, COLORE_ATZECAS);
  3411. GivePlayerWeapon(playerid, 7, 1);
  3412. GivePlayerWeapon(playerid, 32, 450);
  3413. GivePlayerWeapon(playerid, 33, 400);
  3414. TogglePlayerControllable(playerid, 1);
  3415. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1931.7733, -2110.7942, 13.6953);}
  3416. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  3417. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  3418. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  3419. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  3420. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  3421. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  3422. }
  3423. //Triade
  3424. if(listitem == 4)
  3425. {
  3426. new rand = random(sizeof(Rskintriade));
  3427. SetPlayerSkin(playerid, Rskintriade[rand][0]);
  3428. SetPlayerTeam(playerid, Triade);
  3429. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte della Triade.", nome);
  3430. SendClientMessageToAll(BLU_CHIARO, stringa);
  3431. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Triade.");
  3432. SetCameraBehindPlayer(playerid);
  3433. SetPlayerColor(playerid, COLORE_TRIADE);
  3434. GivePlayerWeapon(playerid, 8, 1);
  3435. GivePlayerWeapon(playerid, 24, 400);
  3436. GivePlayerWeapon(playerid, 28, 500);
  3437. TogglePlayerControllable(playerid, 1);
  3438. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 327.4093, -1515.8767, 36.0391);}
  3439. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  3440. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  3441. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  3442. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  3443. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  3444. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  3445. }
  3446. //Bikers
  3447. if(listitem == 5)
  3448. {
  3449. new rand = random(sizeof(Rskinbikers));
  3450. SetPlayerSkin(playerid, Rskinbikers[rand][0]);
  3451. SetPlayerTeam(playerid, Bikers);
  3452. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte dei Bikers.", nome);
  3453. SendClientMessageToAll(BLU_CHIARO, stringa);
  3454. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Bikers.");
  3455. SetCameraBehindPlayer(playerid);
  3456. SetPlayerColor(playerid, COLORE_BIKERS);
  3457. GivePlayerWeapon(playerid, 4, 1);
  3458. GivePlayerWeapon(playerid, 30, 350);
  3459. GivePlayerWeapon(playerid, 25, 500);
  3460. TogglePlayerControllable(playerid, 1);
  3461. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 973.5109, -1829.7964, 13.3227);}
  3462. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  3463. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  3464. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  3465. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  3466. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  3467. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  3468. }
  3469. //Polizia
  3470. if(listitem == 6)
  3471. {
  3472. new rand = random(sizeof(Rskinpolizia));
  3473. SetPlayerSkin(playerid, Rskinpolizia[rand][0]);
  3474. SetPlayerTeam(playerid, Polizia);
  3475. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si è arruolato nella Polizia di Los Santos.", nome);
  3476. SendClientMessageToAll(BLU_CHIARO, stringa);
  3477. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nella Polizia di Los Santos.");
  3478. SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
  3479. SetCameraBehindPlayer(playerid);
  3480. SetPlayerColor(playerid, COLORE_POLIZIA);
  3481. GivePlayerWeapon(playerid, 3, 1);
  3482. GivePlayerWeapon(playerid, 23, 600);
  3483. GivePlayerWeapon(playerid, 27, 600);
  3484. TogglePlayerControllable(playerid, 1);
  3485. }
  3486. //Medici
  3487. if(listitem == 7)
  3488. {
  3489. new rand = random(sizeof(Rskinmedici));
  3490. SetPlayerSkin(playerid, Rskinmedici[rand][0]);
  3491. SetPlayerTeam(playerid, Medici);
  3492. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato nella fazione Medici di Los Santos.", nome);
  3493. SendClientMessageToAll(BLU_CHIARO, stringa);
  3494. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Medici di Los Santos.");
  3495. SetPlayerPos(playerid, 2029.9830, -1409.9507, 16.9989);
  3496. SetCameraBehindPlayer(playerid);
  3497. SetPlayerColor(playerid, BLU_CHIARO);
  3498. TogglePlayerControllable(playerid, 1);
  3499. }
  3500. if(listitem == 8)
  3501. {
  3502. new rand = random(sizeof(Rskincittadini));
  3503. SetPlayerSkin(playerid, Rskincittadini[rand][0]);
  3504. SetPlayerTeam(playerid, Cittadini);
  3505. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è diventato un cittadino.", nome);
  3506. SendClientMessageToAll(BLU_CHIARO, stringa);
  3507. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei diventato un cittadino.");
  3508. SetCameraBehindPlayer(playerid);
  3509. SetPlayerColor(playerid, GRIGIO);
  3510. TogglePlayerControllable(playerid, 1);
  3511. if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1129.2941, -1465.8682, 15.7571);}
  3512. if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
  3513. if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
  3514. if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
  3515. if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
  3516. if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
  3517. if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
  3518. }
  3519. }
  3520. else if(!response)
  3521. {
  3522. GetPlayerName(playerid, nome, 24);
  3523. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Scelta team obbligatoria{FFFFFF}.");
  3524. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Scelta team obbligatoria{00BFFF}]", nome);
  3525. SendClientMessageToAll(BLU_CHIARO, stringa);
  3526. Kick(playerid);
  3527. }
  3528. }
  3529.  
  3530. /*==========================================================================Userpanel*/
  3531. if(dialogid == USERPANEL)
  3532. {
  3533. if(response)
  3534. {
  3535. //Cambia password
  3536. if(listitem == 0)
  3537. {
  3538. ShowPlayerDialog(playerid, CAMBIAPASS, DIALOG_STYLE_INPUT, "{33AA33}UserPanel:", "Inserisci la tua nuova {FF4444}password{FFFFFF}, che sostuirà la precendente.", "Cambia", "Chiudi");
  3539. }
  3540. //Reset Statistiche
  3541. if(listitem == 1)
  3542. {
  3543. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3544. ResetPlayerMoney(playerid);
  3545. PlayerInfo[playerid][pKills] = 0;
  3546. PlayerInfo[playerid][pDeaths] = 0;
  3547. dini_IntSet(pFile, "SoldiInBanca", 0);
  3548. new Float:x, Float: y, Float: z;
  3549. GetPlayerPos(playerid, x, y, z);
  3550. GetPlayerName(playerid, nome, 24);
  3551. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} resetta le statistiche del suo account.", nome);
  3552. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3553. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai resettato con successo le tue statistiche. Al tuo rientro nel Server, saranno tutte azzerate.");
  3554. }
  3555. //Elimina Account
  3556. if(listitem == 2)
  3557. {
  3558. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3559. if(fexist(pFile))
  3560. {
  3561. dini_Remove(pFile);
  3562. new Float:x, Float: y, Float: z;
  3563. GetPlayerPos(playerid, x, y, z);
  3564. GetPlayerName(playerid, nome, 24);
  3565. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} elimina con successo il suo Account, viene eseguito un auto-kick per evitare Crash.", nome);
  3566. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3567. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai eliminato con successo il tuo Account. Ti viene applicato un auto-kick per evitare Crash.");
  3568. Kick(playerid);
  3569. }
  3570. }
  3571. //Stats
  3572. if(listitem == 3)
  3573. {
  3574. new Float: Ratio;
  3575. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3576. if(dini_Int(pFile, "Deaths") == 0)
  3577. {
  3578. Ratio = 0;
  3579. }
  3580. else
  3581. {
  3582. Ratio = 1.0 * dini_Int(pFile, "Kills") / dini_Int(pFile, "Deaths");
  3583. }
  3584. GetPlayerName(playerid, nome, 24);
  3585. format(stringa, sizeof(stringa), "____________________________[{33AA33}%s{FFFFFF}]____________________________", nome);
  3586. format(stringa, sizeof(stringa), "Uccisioni: {33AA33}%d {FFFFFF}Morti: {33AA33}%d {FFFFFF}Ratio: {33AA33}%.2f", dini_Int(pFile, "Kills"), dini_Int(pFile, "Deaths"), Ratio);
  3587. SendClientMessage(playerid, COLORE_TRIADE, stringa);
  3588. }
  3589. }
  3590. }
  3591.  
  3592. /*==========================================================================CambiaPassword*/
  3593. if(dialogid == CAMBIAPASS)
  3594. {
  3595. if(response)
  3596. {
  3597. if(!strlen(inputtext))
  3598. {
  3599. ShowPlayerDialog(playerid, CAMBIAPASS, DIALOG_STYLE_INPUT, "{33AA33}UserPanel:", "{FF4444}Errore: {FFFFFF}Inserisci una password.\n\n{FFFFFF}Inserisci la tua nuova {FF4444}password{FFFFFF}, che sostuirà la precendente.", "Cambia", "Chiudi");
  3600. return 0;
  3601. }
  3602. if(strfind(inputtext, "=", true) == 0)
  3603. {
  3604. ShowPlayerDialog(playerid, CAMBIAPASS, DIALOG_STYLE_INPUT, "{33AA33}UserPanel:", "{FF4444}Errore:{FFFFFF} Non puoi utilizzare {FF4444}={FFFFFF} come password.\n\n{FFFFFF}Inserisci la tua nuova {FF4444}password{FFFFFF}, che sostuirà la precendente.", "Cambia", "Chiudi");
  3605. return 0;
  3606. }
  3607. GetPlayerName(playerid, nome, 24);
  3608. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3609. dini_Set(pFile, "Password", inputtext);
  3610. new Float:x, Float: y, Float: z;
  3611. GetPlayerPos(playerid, x, y, z);
  3612. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la password del suo account.", nome);
  3613. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  3614. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato con successo la tua password. La prossima volta che entri, esegui il Login con essa.");
  3615. }
  3616. }
  3617. /*==========================================================================Animazioni*/
  3618. if(dialogid == ANIMAZIONI)
  3619. {
  3620. if(response)
  3621. {
  3622. //Siediti
  3623. if(listitem == 0)
  3624. {
  3625. ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 1);
  3626. Animazione[playerid] = true;
  3627. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei seduto.");
  3628. new Float:x, Float: y, Float: z;
  3629. GetPlayerPos(playerid, x, y, z);
  3630. GetPlayerName(playerid, nome, 24);
  3631. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si siede.", nome);
  3632. SendNearMessage(x, y, z, BLU_CHIARO ,stringa);
  3633. }
  3634. //Braccia Incrociate
  3635. if(listitem == 1)
  3636. {
  3637. ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, 1);
  3638. Animazione[playerid] = true;
  3639. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai incrociato le braccia.");
  3640. new Float:x, Float: y, Float: z;
  3641. GetPlayerPos(playerid, x, y, z);
  3642. GetPlayerName(playerid, nome, 24);
  3643. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} incrocia le braccia.", nome);
  3644. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3645. }
  3646. //Mani in alto
  3647. if(listitem == 2)
  3648. {
  3649. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
  3650. Animazione[playerid] = true;
  3651. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai alzato le mani.");
  3652. new Float:x, Float: y, Float: z;
  3653. GetPlayerPos(playerid, x, y, z);
  3654. GetPlayerName(playerid, nome, 24);
  3655. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} alza le mani.", nome);
  3656. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3657. }
  3658. //Finta morte
  3659. if(listitem == 3)
  3660. {
  3661. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 1);
  3662. Animazione[playerid] = true;
  3663. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei gettato in terra.");
  3664. new Float:x, Float: y, Float: z;
  3665. GetPlayerPos(playerid, x, y, z);
  3666. GetPlayerName(playerid, nome, 24);
  3667. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si getta in terra.", nome);
  3668. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3669. }
  3670. //Insulto
  3671. if(listitem == 4)
  3672. {
  3673. ApplyAnimation(playerid, "PED", "fucku", 4.0, 1, 0, 0, 0, 1);
  3674. Animazione[playerid] = true;
  3675. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai insultato qualcuno.");
  3676. new Float:x, Float: y, Float: z;
  3677. GetPlayerPos(playerid, x, y, z);
  3678. GetPlayerName(playerid, nome, 24);
  3679. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} insulta qualcuno.", nome);
  3680. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3681. }
  3682. }
  3683. }
  3684. /*==========================================================================Banca*/
  3685. if(dialogid == BANCA)
  3686. {
  3687. if(response)
  3688. {
  3689. new soldibanca = dini_Int(pFile, "SoldiInBanca");
  3690. if(listitem == 0)
  3691. {
  3692. GetPlayerName(playerid, nome, 24);
  3693. format(stringa, sizeof(stringa), "[BANCA]: {FFFFFF}Utente: {33AA33}%s {FFFFFF}Soldi in Banca: {33AA33}%d", nome, soldibanca);
  3694. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  3695. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  3696. new Float:x, Float: y, Float: z;
  3697. GetPlayerPos(playerid, x, y, z);
  3698. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} controlla il suo conto in banca.", nome);
  3699. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3700. }
  3701. if(listitem == 1)
  3702. {
  3703. GetPlayerName(playerid, nome, 24);
  3704. format(stringa, sizeof(stringa), "{FFFFFF}Utente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi prelevare.", nome, soldibanca);
  3705. ShowPlayerDialog(playerid, PRELEVA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Preleva", "Chiudi");
  3706. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  3707. }
  3708. if(listitem == 2)
  3709. {
  3710. GetPlayerName(playerid, nome, 24);
  3711. format(stringa, sizeof(stringa), "{FFFFFF}Utente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi depositare.", nome, soldibanca);
  3712. ShowPlayerDialog(playerid, DEPOSITA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Deposita", "Chiudi");
  3713. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  3714. }
  3715. }
  3716. }
  3717. /*==========================================================================Preleva*/
  3718. if(dialogid == PRELEVA)
  3719. {
  3720. if(response)
  3721. {
  3722. new preleva = strval(inputtext);
  3723. new soldibanca = dini_Int(pFile, "SoldiInBanca");
  3724. if(!preleva)
  3725. {
  3726. GetPlayerName(playerid, nome, 24);
  3727. format(stringa, sizeof stringa, "{FF4444}Errore: {FFFFFF}Inserisci una somma numerica.\nUtente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi prelevare.", nome, soldibanca);
  3728. ShowPlayerDialog(playerid, PRELEVA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Preleva", "Chiudi");
  3729. }
  3730. else if(preleva > soldibanca)
  3731. {
  3732. GetPlayerName(playerid, nome, 24);
  3733. format(stringa, sizeof stringa, "{FF4444}Errore: {FFFFFF}Il tuo conto in banca contiene una cifra inferiore a quella da te inserita.\nUtente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi prelevare.", nome, soldibanca);
  3734. ShowPlayerDialog(playerid, PRELEVA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Preleva", "Chiudi");
  3735. }
  3736. else if(preleva <= soldibanca)
  3737. {
  3738. GetPlayerName(playerid, nome, 24);
  3739. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3740. GivePlayerMoney(playerid, preleva);
  3741. dini_IntSet(pFile, "SoldiInBanca",soldibanca-preleva);
  3742. format(stringa, sizeof(stringa), "* {FFFFFF}Hai prelevato {33AA33}%d${FFFFFF}.", preleva);
  3743. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  3744. new Float:x, Float: y, Float: z;
  3745. GetPlayerPos(playerid, x, y, z);
  3746. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} preleva {FFFFFF}%d{00BFFF}$ dal suo conto in banca.", nome, preleva);
  3747. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3748. }
  3749. }
  3750. }
  3751. /*==========================================================================Preleva*/
  3752. if(dialogid == DEPOSITA)
  3753. {
  3754. if(response)
  3755. {
  3756. new deposita = strval(inputtext);
  3757. new soldibanca = dini_Int(pFile, "SoldiInBanca");
  3758. if(!deposita)
  3759. {
  3760. GetPlayerName(playerid, nome, 24);
  3761. format(stringa, sizeof(stringa), "{FF4444}Errore: {FFFFFF}Inserisci una somma numerica.\nUtente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi depositare.", nome, soldibanca);
  3762. ShowPlayerDialog(playerid, DEPOSITA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Deposita", "Chiudi");
  3763. }
  3764. else if(deposita > GetPlayerMoney(playerid))
  3765. {
  3766. GetPlayerName(playerid, nome, 24);
  3767. format(stringa, sizeof(stringa), "{FF4444}Errore: {FFFFFF}Possiedi una cifra inferiore a quella da te inserita.\nUtente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi depositare.", nome, soldibanca);
  3768. ShowPlayerDialog(playerid, DEPOSITA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Deposita", "Chiudi");
  3769. }
  3770. else if(deposita <= GetPlayerMoney(playerid))
  3771. {
  3772. GetPlayerName(playerid, nome, 24);
  3773. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  3774. GivePlayerMoney(playerid, -deposita);
  3775. dini_IntSet(pFile, "SoldiInBanca", soldibanca+deposita);
  3776. format(stringa, sizeof(stringa), "* {FFFFFF}Hai depositato {33AA33}%d${FFFFFF}.", deposita);
  3777. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  3778. new Float:x, Float: y, Float: z;
  3779. GetPlayerPos(playerid, x, y, z);
  3780. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} deposita {FFFFFF}%d{00BFFF}$ dal suo conto in banca.", nome, deposita);
  3781. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3782. }
  3783. }
  3784. }
  3785.  
  3786. /*==========================================================================Aiuto*/
  3787. if(dialogid == AIUTO)
  3788. {
  3789. if(response)
  3790. {
  3791. if(listitem == 0)
  3792. {
  3793. ShowPlayerDialog(playerid, REGOLE, DIALOG_STYLE_MSGBOX, "{33AA33}Regole del Server:", "- Non utilizzare Cheats, Hacks o Cleo Mods\n- Non spammare il proprio sito web/forum\n- Non fare deathmatch all'interno di edifici\n- Non utilizzare l'interno di edifici come rifugio dal deathmatch\n- Non fare stunt e utilizzare una guida normale\n- Non sfruttare eventuali bugs\n- Non fare Helikill (uccisioni con l' elica dell' elicottero)", "Indietro", "");
  3794. }
  3795. if(listitem == 1)
  3796. {
  3797. ShowPlayerDialog(playerid, COMANDI, DIALOG_STYLE_MSGBOX, "{33AA33}Comandi del Server:", "/kill /userpanel /aiuto /animazioni /cambiateam\n/metticasco /toglicasco /mettiocchiali /togliocchiali /startvoto\n/vota /rapina /afk /admins /gps\n/resetrespawn /minaccia /daisoldi /tramortisci /deruba\n/stopanim /frecciasx /frecciadx", "Indietro", "");
  3798. }
  3799. if(listitem == 2)
  3800. {
  3801. ShowPlayerDialog(playerid, CREDITI, DIALOG_STYLE_MSGBOX, "{33AA33}Crediti del Server:", "{FF4444}Francesco_Ronaldo{FFFFFF}: Scripter della Gamemode;\n{FF4444}Peppinux aka Peppe_Stasu{FFFFFF}: Teamchat\n{FF4444}mitosking{FFFFFF}: alcuni aiuti e fix sul sistema di registrazione", "Indietro", "");
  3802. }
  3803. }
  3804. }
  3805. /*==========================================================================CambiaTeam*/
  3806. if(dialogid == CAMBIATEAM)
  3807. {
  3808. if(response)
  3809. {
  3810. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Hai speso {FF66FF}500$ {FFFFFF}per entrare nella nuova fazione.");
  3811. GivePlayerMoney(playerid, -500);
  3812. if(listitem == 0)
  3813. {
  3814. new rand = random(sizeof(Rskingroove));
  3815. SetPlayerSkin(playerid, Rskingroove[rand][0]);
  3816. SetPlayerTeam(playerid, Groove);
  3817. GetPlayerName(playerid, nome, 24);
  3818. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Groove Street.", nome);
  3819. SendClientMessageToAll(BLU_CHIARO, stringa);
  3820. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Groove Street.");
  3821. SetPlayerPos(playerid, 2496.1279, -1683.8066, 13.3645);
  3822. SetPlayerColor(playerid, COLORE_GROOVE);
  3823. ResetPlayerWeapons(playerid);
  3824. GivePlayerWeapon(playerid, 5, 1);
  3825. GivePlayerWeapon(playerid, 28, 400);
  3826. GivePlayerWeapon(playerid, 25, 500);
  3827. }
  3828. //Ballas
  3829. if(listitem == 1)
  3830. {
  3831. new rand = random(sizeof(Rskinballas));
  3832. SetPlayerSkin(playerid, Rskinballas[rand][0]);
  3833. SetPlayerTeam(playerid, Ballas);
  3834. GetPlayerName(playerid, nome, 24);
  3835. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Ballas.", nome);
  3836. SendClientMessageToAll(BLU_CHIARO, stringa);
  3837. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Ballas.");
  3838. SetPlayerPos(playerid, 2000.0258, -1121.1666, 26.7448);
  3839. SetPlayerColor(playerid, COLORE_BALLAS);
  3840. ResetPlayerWeapons(playerid);
  3841. GivePlayerWeapon(playerid, 1, 1);
  3842. GivePlayerWeapon(playerid, 32, 450);
  3843. GivePlayerWeapon(playerid, 22, 400);
  3844. }
  3845. //Vagos
  3846. if(listitem == 2)
  3847. {
  3848. new rand = random(sizeof(Rskinvagos));
  3849. SetPlayerSkin(playerid, Rskinvagos[rand][0]);
  3850. SetPlayerTeam(playerid, Vagos);
  3851. GetPlayerName(playerid, nome, 24);
  3852. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Vagos.", nome);
  3853. SendClientMessageToAll(BLU_CHIARO, stringa);
  3854. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Vagos.");
  3855. SetPlayerPos(playerid, 2323.1489, -1192.1659, 27.9693);
  3856. SetPlayerColor(playerid, COLORE_VAGOS);
  3857. ResetPlayerWeapons(playerid);
  3858. GivePlayerWeapon(playerid, 6, 1);
  3859. GivePlayerWeapon(playerid, 26, 400);
  3860. GivePlayerWeapon(playerid, 28, 450);
  3861. }
  3862. //Atzecas
  3863. if(listitem == 3)
  3864. {
  3865. new rand = random(sizeof(Rskinatz));
  3866. SetPlayerSkin(playerid, Rskinatz[rand][0]);
  3867. SetPlayerTeam(playerid, Atzecas);
  3868. GetPlayerName(playerid, nome, 24);
  3869. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Atzecas.", nome);
  3870. SendClientMessageToAll(BLU_CHIARO, stringa);
  3871. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Atzecas.");
  3872. SetPlayerPos(playerid, 1931.7733, -2110.7942, 13.6953);
  3873. SetPlayerColor(playerid, COLORE_ATZECAS);
  3874. ResetPlayerWeapons(playerid);
  3875. GivePlayerWeapon(playerid, 7, 1);
  3876. GivePlayerWeapon(playerid, 32, 450);
  3877. GivePlayerWeapon(playerid, 33, 400);
  3878. }
  3879. //Triade
  3880. if(listitem == 4)
  3881. {
  3882. new rand = random(sizeof(Rskintriade));
  3883. SetPlayerSkin(playerid, Rskintriade[rand][0]);
  3884. SetPlayerTeam(playerid, Triade);
  3885. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Triade.", nome);
  3886. SendClientMessageToAll(BLU_CHIARO, stringa);
  3887. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nella Triade.");
  3888. SetPlayerPos(playerid, 327.4093, -1515.8767, 36.0391);
  3889. SetPlayerColor(playerid, COLORE_TRIADE);
  3890. ResetPlayerWeapons(playerid);
  3891. GivePlayerWeapon(playerid, 8, 1);
  3892. GivePlayerWeapon(playerid, 24, 400);
  3893. GivePlayerWeapon(playerid, 28, 500);
  3894. }
  3895. //Bikers
  3896. if(listitem == 5)
  3897. {
  3898. new rand = random(sizeof(Rskinbikers));
  3899. SetPlayerSkin(playerid, Rskinbikers[rand][0]);
  3900. SetPlayerTeam(playerid, Bikers);
  3901. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Bikers.", nome);
  3902. SendClientMessageToAll(BLU_CHIARO, stringa);
  3903. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Bikers.");
  3904. SetPlayerPos(playerid, 973.5109, -1829.7964, 13.3227);
  3905. SetPlayerColor(playerid, COLORE_BIKERS);
  3906. ResetPlayerWeapons(playerid);
  3907. GivePlayerWeapon(playerid, 4, 1);
  3908. GivePlayerWeapon(playerid, 30, 350);
  3909. GivePlayerWeapon(playerid, 25, 500);
  3910. }
  3911. //Polizia
  3912. if(listitem == 6)
  3913. {
  3914. new rand = random(sizeof(Rskinpolizia));
  3915. SetPlayerSkin(playerid, Rskinpolizia[rand][0]);
  3916. SetPlayerTeam(playerid, Polizia);
  3917. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Polizia di Los Santos.", nome);
  3918. SendClientMessageToAll(BLU_CHIARO, stringa);
  3919. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nella Polizia di Los Santos.");
  3920. SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
  3921. SetPlayerColor(playerid, COLORE_POLIZIA);
  3922. ResetPlayerWeapons(playerid);
  3923. GivePlayerWeapon(playerid, 3, 1);
  3924. GivePlayerWeapon(playerid, 23, 600);
  3925. GivePlayerWeapon(playerid, 27, 600);
  3926. }
  3927. //Medici
  3928. if(listitem == 7)
  3929. {
  3930. new rand = random(sizeof(Rskinmedici));
  3931. SetPlayerSkin(playerid, Rskinmedici[rand][0]);
  3932. SetPlayerTeam(playerid, Medici);
  3933. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Medici di Los Santos.", nome);
  3934. SendClientMessageToAll(BLU_CHIARO, stringa);
  3935. SetPlayerPos(playerid, 2029.9830, -1409.9507, 16.9989);
  3936. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Medici di Los Santos.");
  3937. ResetPlayerWeapons(playerid);
  3938. SetPlayerColor(playerid, BLU_CHIARO);
  3939. }
  3940. if(listitem == 8)
  3941. {
  3942. new rand = random(sizeof(Rskincittadini));
  3943. SetPlayerSkin(playerid, Rskincittadini[rand][0]);
  3944. SetPlayerTeam(playerid, Cittadini);
  3945. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Cittadini.", nome);
  3946. SendClientMessageToAll(BLU_CHIARO, stringa);
  3947. SetPlayerPos(playerid, 1129.2941, -1465.8682, 15.7571);
  3948. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei cittadini.");
  3949. ResetPlayerWeapons(playerid);
  3950. SetPlayerColor(playerid, GRIGIO);
  3951. }
  3952. }
  3953. }
  3954. /*==========================================================================Compra Droga*/
  3955. if(dialogid == COMPRADROGA)
  3956. {
  3957. if(response)
  3958. {
  3959. new Float: Vita;
  3960. GetPlayerHealth(playerid, Vita);
  3961. //Marijuana
  3962. if(listitem == 0)
  3963. {
  3964. if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}300${FFFFFF}.");
  3965. new Float:x, Float: y, Float: z;
  3966. GetPlayerPos(playerid, x, y, z);
  3967. GetPlayerName(playerid, nome, 24);
  3968. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra uno spinello di Marijuana.", nome);
  3969. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3970. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato uno spinello di Marijuana.");
  3971. GivePlayerMoney(playerid, -300);
  3972. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  3973. SetPlayerHealth(playerid, Vita+20);
  3974. SetPlayerDrunkLevel(playerid, 3000);
  3975. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  3976.  
  3977. }
  3978. //Cocaina
  3979. if(listitem == 1)
  3980. {
  3981. if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}500${FFFFFF}.");
  3982. new Float:x, Float: y, Float: z;
  3983. GetPlayerPos(playerid, x, y, z);
  3984. GetPlayerName(playerid, nome, 24);
  3985. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una siringa di Cocaina.", nome);
  3986. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  3987. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una siringa di Cocaina e sei altamente drogato, fai attenzione.");
  3988. GivePlayerMoney(playerid, -500);
  3989. SetPlayerHealth(playerid, Vita+30);
  3990. SetPlayerDrunkLevel(playerid, 3000);
  3991. SetPlayerWeather(playerid, -68);
  3992. Drogato[playerid] = true;
  3993. SetTimerEx("FineDrogato", 240000, false, "d", playerid);
  3994. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  3995. }
  3996. //Eroina
  3997. if(listitem == 2)
  3998. {
  3999. if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}600${FFFFFF}.");
  4000. new Float:x, Float: y, Float: z;
  4001. GetPlayerPos(playerid, x, y, z);
  4002. GetPlayerName(playerid, nome, 24);
  4003. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una siringa di Eroina.", nome);
  4004. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4005. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una siringa di Eroina e sei altamente drogato, fai attenzione.");
  4006. GivePlayerMoney(playerid, -600);
  4007. SetPlayerHealth(playerid, Vita+50);
  4008. SetPlayerDrunkLevel(playerid, 4000);
  4009. SetPlayerWeather(playerid, -68);
  4010. Drogato[playerid] = true;
  4011. SetTimerEx("FineDrogato", 240000, false, "d", playerid);
  4012. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4013. }
  4014. //Hashish
  4015. if(listitem == 3)
  4016. {
  4017. if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
  4018. new Float:x, Float: y, Float: z;
  4019. GetPlayerPos(playerid, x, y, z);
  4020. GetPlayerName(playerid, nome, 24);
  4021. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pastiglia di Hashish.", nome);
  4022. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4023. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pastiglia di Hashish e sei altamente drogato, fai attenzione.");
  4024. GivePlayerMoney(playerid, -1000);
  4025. SetPlayerHealth(playerid, Vita+60);
  4026. SetPlayerDrunkLevel(playerid, 5000);
  4027. SetPlayerWeather(playerid, -68);
  4028. Drogato[playerid] = true;
  4029. SetTimerEx("FineDrogato", 240000, false, "d", playerid);
  4030. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4031. }
  4032. }
  4033. }
  4034. /*==========================================================================Compra Pizzeria*/
  4035. if(dialogid == COMPRAPIZZA)
  4036. {
  4037. if(response)
  4038. {
  4039. new Float: Vita;
  4040. GetPlayerHealth(playerid, Vita);
  4041. GetPlayerName(playerid, nome, 24);
  4042. //Pizza ridotta
  4043. if(listitem == 0)
  4044. {
  4045. if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}10${FFFFFF}.");
  4046. new Float:x, Float: y, Float: z;
  4047. GetPlayerPos(playerid, x, y, z);
  4048. GetPlayerName(playerid, nome, 24);
  4049. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pizza.", nome);
  4050. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4051. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pizza.");
  4052. GivePlayerMoney(playerid, -10);
  4053. SetPlayerHealth(playerid, Vita+15);
  4054. ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
  4055. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4056. }
  4057. //Pizza media
  4058. if(listitem == 1)
  4059. {
  4060. if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}20${FFFFFF}.");
  4061. new Float:x, Float: y, Float: z;
  4062. GetPlayerPos(playerid, x, y, z);
  4063. GetPlayerName(playerid, nome, 24);
  4064. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pizza.", nome);
  4065. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4066. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pizza.");
  4067. GivePlayerMoney(playerid, -20);
  4068. SetPlayerHealth(playerid, Vita+20);
  4069. ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
  4070. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4071. }
  4072. //Pizza gigante
  4073. if(listitem == 2)
  4074. {
  4075. if(GetPlayerMoney(playerid) < 40) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}40${FFFFFF}.");
  4076. new Float:x, Float: y, Float: z;
  4077. GetPlayerPos(playerid, x, y, z);
  4078. GetPlayerName(playerid, nome, 24);
  4079. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pizza.", nome);
  4080. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4081. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pizza.");
  4082. GivePlayerMoney(playerid, -40);
  4083. SetPlayerHealth(playerid, Vita+30);
  4084. ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
  4085. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4086. }
  4087. //Bibita
  4088. if(listitem == 3)
  4089. {
  4090. if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}10${FFFFFF}.");
  4091. new Float:x, Float: y, Float: z;
  4092. GetPlayerPos(playerid, x, y, z);
  4093. GetPlayerName(playerid, nome, 24);
  4094. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una bibita.", nome);
  4095. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4096. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una bibita.");
  4097. GivePlayerMoney(playerid, -10);
  4098. SetPlayerHealth(playerid, Vita+10);
  4099. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  4100. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4101. }
  4102. //Insalata
  4103. if(listitem == 4)
  4104. {
  4105. if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}15${FFFFFF}.");
  4106. new Float:x, Float: y, Float: z;
  4107. GetPlayerPos(playerid, x, y, z);
  4108. GetPlayerName(playerid, nome, 24);
  4109. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un' insalata.", nome);
  4110. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4111. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un' insalata.");
  4112. GivePlayerMoney(playerid, -15);
  4113. SetPlayerHealth(playerid, Vita+20);
  4114. ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
  4115. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4116. }
  4117. }
  4118. }
  4119. /*==========================================================================Compra Burger Shot*/
  4120. if(dialogid == COMPRABSHOT)
  4121. {
  4122. if(response)
  4123. {
  4124. new Float: Vita;
  4125. GetPlayerHealth(playerid, Vita);
  4126. //Hamburger piccolo
  4127. if(listitem == 0)
  4128. {
  4129. if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}15${FFFFFF}.");
  4130. new Float:x, Float: y, Float: z;
  4131. GetPlayerPos(playerid, x, y, z);
  4132. GetPlayerName(playerid, nome, 24);
  4133. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un hamburger.", nome);
  4134. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4135. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un hamburger.");
  4136. GivePlayerMoney(playerid, -15);
  4137. SetPlayerHealth(playerid, Vita+15);
  4138. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
  4139. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4140. }
  4141. //Hamburger medio
  4142. if(listitem == 1)
  4143. {
  4144. if(GetPlayerMoney(playerid) < 35) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}35${FFFFFF}.");
  4145. new Float:x, Float: y, Float: z;
  4146. GetPlayerPos(playerid, x, y, z);
  4147. GetPlayerName(playerid, nome, 24);
  4148. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un hamburger.", nome);
  4149. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4150. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un hamburger.");
  4151. GivePlayerMoney(playerid, -35);
  4152. SetPlayerHealth(playerid, Vita+30);
  4153. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
  4154. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4155. }
  4156. //Hamburger grande
  4157. if(listitem == 2)
  4158. {
  4159. if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}50${FFFFFF}.");
  4160. new Float:x, Float: y, Float: z;
  4161. GetPlayerPos(playerid, x, y, z);
  4162. GetPlayerName(playerid, nome, 24);
  4163. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un hamburger.", nome);
  4164. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4165. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un hamburger.");
  4166. GivePlayerMoney(playerid, -50);
  4167. SetPlayerHealth(playerid, Vita+35);
  4168. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
  4169. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4170. }
  4171. //Bibita
  4172. if(listitem == 3)
  4173. {
  4174. if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}15${FFFFFF}.");
  4175. new Float:x, Float: y, Float: z;
  4176. GetPlayerPos(playerid, x, y, z);
  4177. GetPlayerName(playerid, nome, 24);
  4178. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una bibita.", nome);
  4179. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4180. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una bibita.");
  4181. GivePlayerMoney(playerid, -15);
  4182. SetPlayerHealth(playerid, Vita+10);
  4183. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  4184. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4185. }
  4186. //Patatine piccolo
  4187. if(listitem == 4)
  4188. {
  4189. if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}20${FFFFFF}.");
  4190. new Float:x, Float: y, Float: z;
  4191. GetPlayerPos(playerid, x, y, z);
  4192. GetPlayerName(playerid, nome, 24);
  4193. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un menù patatine.", nome);
  4194. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4195. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un menù patatine.");
  4196. GivePlayerMoney(playerid, -20);
  4197. SetPlayerHealth(playerid, Vita+20);
  4198. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
  4199. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4200. }
  4201. //Patatine grande
  4202. if(listitem == 5)
  4203. {
  4204. if(GetPlayerMoney(playerid) < 40) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}40${FFFFFF}.");
  4205. new Float:x, Float: y, Float: z;
  4206. GetPlayerPos(playerid, x, y, z);
  4207. GetPlayerName(playerid, nome, 24);
  4208. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un menù patatine.", nome);
  4209. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4210. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un menù patatine.");
  4211. GivePlayerMoney(playerid, -40);
  4212. SetPlayerHealth(playerid, Vita+30);
  4213. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
  4214. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4215. }
  4216. }
  4217. }
  4218. /*==========================================================================Compra Discoteca*/
  4219. if(dialogid == COMPRADISCO)
  4220. {
  4221. if(response)
  4222. {
  4223. new Float: Vita;
  4224. GetPlayerHealth(playerid, Vita);
  4225. //Bibita
  4226. if(listitem == 0)
  4227. {
  4228. if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}20${FFFFFF}.");
  4229. new Float:x, Float: y, Float: z;
  4230. GetPlayerPos(playerid, x, y, z);
  4231. GetPlayerName(playerid, nome, 24);
  4232. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una bibita.", nome);
  4233. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4234. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una bibita.");
  4235. GivePlayerMoney(playerid, -20);
  4236. SetPlayerHealth(playerid, Vita+10);
  4237. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  4238. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4239. }
  4240. //Birra
  4241. if(listitem == 1)
  4242. {
  4243. if(GetPlayerMoney(playerid) < 30) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}30${FFFFFF}.");
  4244. new Float:x, Float: y, Float: z;
  4245. GetPlayerPos(playerid, x, y, z);
  4246. GetPlayerName(playerid, nome, 24);
  4247. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una birra.", nome);
  4248. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4249. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una birra.");
  4250. GivePlayerMoney(playerid, -30);
  4251. SetPlayerHealth(playerid, Vita+30);
  4252. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  4253. SetPlayerDrunkLevel(playerid, 3000);
  4254. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4255. }
  4256. //Super Alcolico
  4257. if(listitem == 2)
  4258. {
  4259. if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}50${FFFFFF}.");
  4260. new Float:x, Float: y, Float: z;
  4261. GetPlayerPos(playerid, x, y, z);
  4262. GetPlayerName(playerid, nome, 24);
  4263. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un super alcolico.", nome);
  4264. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4265. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un super alcolico.");
  4266. GivePlayerMoney(playerid, -50);
  4267. SetPlayerHealth(playerid, Vita+40);
  4268. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  4269. SetPlayerDrunkLevel(playerid, 4000);
  4270. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4271. }
  4272. //Cocktail
  4273. if(listitem == 3)
  4274. {
  4275. if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}100${FFFFFF}.");
  4276. new Float:x, Float: y, Float: z;
  4277. GetPlayerPos(playerid, x, y, z);
  4278. GetPlayerName(playerid, nome, 24);
  4279. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un cocktail.", nome);
  4280. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4281. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un cocktail.");
  4282. GivePlayerMoney(playerid, -100);
  4283. SetPlayerHealth(playerid, Vita+50);
  4284. SetPlayerDrunkLevel(playerid, 5000);
  4285. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4286. }
  4287. }
  4288. }
  4289. /*==========================================================================Compra Vestiti*/
  4290. if(dialogid == COMPRAVESTITI)
  4291. {
  4292. if(response)
  4293. {
  4294. if(listitem == 0)
  4295. {
  4296. if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}100${FFFFFF}.");
  4297. GivePlayerMoney(playerid, -100);
  4298. new Float:x, Float: y, Float: z;
  4299. GetPlayerPos(playerid, x, y, z);
  4300. GetPlayerName(playerid, nome, 24);
  4301. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un paio di occhiali.", nome);
  4302. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4303. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un paio di occhiali.");
  4304. dini_IntSet(pFile, "Occhiali", 1);
  4305. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4306. }
  4307. if(listitem == 1)
  4308. {
  4309. if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}150${FFFFFF}.");
  4310. GivePlayerMoney(playerid, -150);
  4311. new Float:x, Float: y, Float: z;
  4312. GetPlayerPos(playerid, x, y, z);
  4313. GetPlayerName(playerid, nome, 24);
  4314. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un paio di occhiali.", nome);
  4315. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4316. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un paio di occhiali.");
  4317. dini_IntSet(pFile, "Occhiali", 2);
  4318. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4319. }
  4320. if(listitem == 2)
  4321. {
  4322. if(GetPlayerMoney(playerid) < 80) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}80${FFFFFF}.");
  4323. GivePlayerMoney(playerid, -80);
  4324. new Float:x, Float: y, Float: z;
  4325. GetPlayerPos(playerid, x, y, z);
  4326. GetPlayerName(playerid, nome, 24);
  4327. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un paio di occhiali.", nome);
  4328. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4329. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un paio di occhiali.");
  4330. dini_IntSet(pFile, "Occhiali", 3);
  4331. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4332. }
  4333. if(listitem == 3)
  4334. {
  4335. if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}200${FFFFFF}.");
  4336. GivePlayerMoney(playerid, -200);
  4337. new Float:x, Float: y, Float: z;
  4338. GetPlayerPos(playerid, x, y, z);
  4339. GetPlayerName(playerid, nome, 24);
  4340. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un casco.", nome);
  4341. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4342. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un casco.");
  4343. dini_IntSet(pFile, "Casco", 1);
  4344. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4345. }
  4346. if(listitem == 4)
  4347. {
  4348. if(GetPlayerMoney(playerid) < 460) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}460${FFFFFF}.");
  4349. GivePlayerMoney(playerid, -460);
  4350. new Float:x, Float: y, Float: z;
  4351. GetPlayerPos(playerid, x, y, z);
  4352. GetPlayerName(playerid, nome, 24);
  4353. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un casco.", nome);
  4354. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4355. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un casco.");
  4356. dini_IntSet(pFile, "Casco", 2);
  4357. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4358. }
  4359. if(listitem == 5)
  4360. {
  4361. if(GetPlayerMoney(playerid) < 350) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}350${FFFFFF}.");
  4362. GivePlayerMoney(playerid, -350);
  4363. new Float:x, Float: y, Float: z;
  4364. GetPlayerPos(playerid, x, y, z);
  4365. GetPlayerName(playerid, nome, 24);
  4366. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un casco.", nome);
  4367. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4368. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un casco.");
  4369. dini_IntSet(pFile, "Casco", 3);
  4370. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4371. }
  4372. }
  4373. }
  4374. /*==========================================================================Compra Ammunation*/
  4375. if(dialogid == COMPRARMI)
  4376. {
  4377. if(response)
  4378. {
  4379. if(listitem == 0)
  4380. {
  4381. ShowPlayerDialog(playerid, PISTOLE, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "9mm 200$\n9mm silenziata 300$\nDesert Eagle 600$", "Compra", "Chiudi");
  4382. }
  4383. if(listitem == 1)
  4384. {
  4385. ShowPlayerDialog(playerid, MITRA, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Micro-Uzi 350$\nTec-9 500$\nMP5 650$", "Compra", "Chiudi");
  4386. }
  4387. if(listitem == 2)
  4388. {
  4389. ShowPlayerDialog(playerid, FUCILI_POMPA, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Sawn-Off 700$\nFucile a pompa 800$\nSPAS-12 1000$", "Compra", "Chiudi");
  4390. }
  4391. if(listitem == 3)
  4392. {
  4393. ShowPlayerDialog(playerid, FUCILI_ASSALTO, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "AK-47 1000$\nM4 1200$", "Compra", "Chiudi");
  4394. }
  4395. if(listitem == 4)
  4396. {
  4397. ShowPlayerDialog(playerid, FUCILI_PREC, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Fucile di precisione 1000$\nFucile 800$", "Compra", "Chiudi");
  4398. }
  4399. if(listitem == 5)
  4400. {
  4401. ShowPlayerDialog(playerid, ESPLOSIVI, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Granate 400$\nMolotov 200$\nC4 550$", "Compra", "Chiudi");
  4402. }
  4403. if(listitem == 6)
  4404. {
  4405. GetPlayerName(playerid, nome, 24);
  4406. if(GetPlayerMoney(playerid) < 700)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}700${FFFFFF}.");
  4407. SetPlayerAttachedObject(playerid, 3, 1242, 1, 0.019999, 0.039999, 0.000000, 2.459999, 89.699989, -3.100000, 1.710000, 2.119999, 1.719999);
  4408. GivePlayerMoney(playerid, -700);
  4409. SetPlayerArmour(playerid, 100);
  4410. new Float:x, Float: y, Float: z;
  4411. GetPlayerPos(playerid, x, y, z);
  4412. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un giubotto antiproiettile.", nome);
  4413. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4414. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4415. }
  4416. }
  4417. }
  4418. /*==========================================================================Pistole(Ammunation)*/
  4419. if(dialogid == PISTOLE)
  4420. {
  4421. if(response)
  4422. {
  4423. if(listitem == 0)
  4424. {
  4425. if(GetPlayerMoney(playerid) < 200)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}300${FFFFFF}.");
  4426. GivePlayerWeapon(playerid, 22, 200);
  4427. GivePlayerMoney(playerid, -200);
  4428. new Float:x, Float: y, Float: z;
  4429. GetPlayerPos(playerid, x, y, z);
  4430. GetPlayerName(playerid, nome, 24);
  4431. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una 9mm.", nome);
  4432. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4433. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una 9mm.");
  4434. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4435. }
  4436. if(listitem == 1)
  4437. {
  4438. if(GetPlayerMoney(playerid) < 300)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}300${FFFFFF}.");
  4439. GivePlayerWeapon(playerid, 23, 200);
  4440. GivePlayerMoney(playerid, -300);
  4441. new Float:x, Float: y, Float: z;
  4442. GetPlayerPos(playerid, x, y, z);
  4443. GetPlayerName(playerid, nome, 24);
  4444. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una 9mm silenziata.", nome);
  4445. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4446. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una 9mm silenziata.");
  4447. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4448. }
  4449. if(listitem == 2)
  4450. {
  4451. if(GetPlayerMoney(playerid) < 600)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}600${FFFFFF}.");
  4452. GivePlayerWeapon(playerid, 24, 300);
  4453. GivePlayerMoney(playerid, -600);
  4454. new Float:x, Float: y, Float: z;
  4455. GetPlayerPos(playerid, x, y, z);
  4456. GetPlayerName(playerid, nome, 24);
  4457. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una Desert Eagle..", nome);
  4458. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4459. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una Desert Eagle.");
  4460. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4461. }
  4462. }
  4463. }
  4464. /*==========================================================================Mitra Leggeri(Ammunation)*/
  4465. if(dialogid == MITRA)
  4466. {
  4467. GetPlayerName(playerid, nome, 24);
  4468. if(response)
  4469. {
  4470. if(listitem == 0)
  4471. {
  4472. if(GetPlayerMoney(playerid) < 350)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}350${FFFFFF}.");
  4473. GivePlayerWeapon(playerid, 28, 300);
  4474. GivePlayerMoney(playerid, -350);
  4475. new Float:x, Float: y, Float: z;
  4476. GetPlayerPos(playerid, x, y, z);
  4477. GetPlayerName(playerid, nome, 24);
  4478. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un Micro-Uzi.", nome);
  4479. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4480. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un Micro-uzi.");
  4481. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4482. }
  4483. if(listitem == 1)
  4484. {
  4485. if(GetPlayerMoney(playerid) < 500)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}500${FFFFFF}.");
  4486. GivePlayerWeapon(playerid, 32, 350);
  4487. GivePlayerMoney(playerid, -500);
  4488. new Float:x, Float: y, Float: z;
  4489. GetPlayerPos(playerid, x, y, z);
  4490. GetPlayerName(playerid, nome, 24);
  4491. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un Tec-9.", nome);
  4492. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4493. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un Tec-9.");
  4494. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4495. }
  4496. if(listitem == 2)
  4497. {
  4498. if(GetPlayerMoney(playerid) < 650)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}650${FFFFFF}.");
  4499. GivePlayerWeapon(playerid, 29, 350);
  4500. GivePlayerMoney(playerid, -650);
  4501. new Float:x, Float: y, Float: z;
  4502. GetPlayerPos(playerid, x, y, z);
  4503. GetPlayerName(playerid, nome, 24);
  4504. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un MP5.", nome);
  4505. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4506. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un MP5.");
  4507. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4508. }
  4509. }
  4510. }
  4511.  
  4512. /*==========================================================================Fucili a pompa(Ammunation)*/
  4513. if(dialogid == FUCILI_POMPA)
  4514. {
  4515. if(response)
  4516. {
  4517. if(listitem == 0)
  4518. {
  4519. if(GetPlayerMoney(playerid) < 700)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}700${FFFFFF}.");
  4520. GivePlayerWeapon(playerid, 26, 200);
  4521. GivePlayerMoney(playerid, -700);
  4522. new Float:x, Float: y, Float: z;
  4523. GetPlayerPos(playerid, x, y, z);
  4524. GetPlayerName(playerid, nome, 24);
  4525. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile a canne mozze.", nome);
  4526. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4527. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile a canne mozze.");
  4528. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4529. }
  4530. if(listitem == 1)
  4531. {
  4532. if(GetPlayerMoney(playerid) < 800)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}800${FFFFFF}.");
  4533. GivePlayerWeapon(playerid, 25, 250);
  4534. GivePlayerMoney(playerid, -800);
  4535. new Float:x, Float: y, Float: z;
  4536. GetPlayerPos(playerid, x, y, z);
  4537. GetPlayerName(playerid, nome, 24);
  4538. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile a pompa.", nome);
  4539. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4540. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile a pompa.");
  4541. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4542. }
  4543. if(listitem == 2)
  4544. {
  4545. if(GetPlayerMoney(playerid) < 1000)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
  4546. GivePlayerWeapon(playerid, 27, 200);
  4547. GivePlayerMoney(playerid, -1000);
  4548. new Float:x, Float: y, Float: z;
  4549. GetPlayerPos(playerid, x, y, z);
  4550. GetPlayerName(playerid, nome, 24);
  4551. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra uno SPAS-12.", nome);
  4552. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4553. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato uno SPAS-12.");
  4554. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4555. }
  4556. }
  4557. }
  4558.  
  4559. /*==========================================================================Fucili d'assalto(Ammunation)*/
  4560. if(dialogid == FUCILI_ASSALTO)
  4561. {
  4562. if(response)
  4563. {
  4564. GetPlayerName(playerid, nome, 24);
  4565. if(listitem == 0)
  4566. {
  4567. if(GetPlayerMoney(playerid) < 1000)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
  4568. GivePlayerWeapon(playerid, 30, 400);
  4569. GivePlayerMoney(playerid, -1000);
  4570. new Float:x, Float: y, Float: z;
  4571. GetPlayerPos(playerid, x, y, z);
  4572. GetPlayerName(playerid, nome, 24);
  4573. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un AK-47.", nome);
  4574. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4575. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un AK-47.");
  4576. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4577. }
  4578. if(listitem == 1)
  4579. {
  4580. if(GetPlayerMoney(playerid) < 1200)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1200${FFFFFF}.");
  4581. GivePlayerWeapon(playerid, 31, 450);
  4582. GivePlayerMoney(playerid, -1200);
  4583. new Float:x, Float: y, Float: z;
  4584. GetPlayerPos(playerid, x, y, z);
  4585. GetPlayerName(playerid, nome, 24);
  4586. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un M4.", nome);
  4587. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4588. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un M4.");
  4589. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4590. }
  4591. }
  4592. }
  4593.  
  4594. /*==========================================================================Fucili precisione(Ammunation)*/
  4595. if(dialogid == FUCILI_PREC)
  4596. {
  4597. if(response)
  4598. {
  4599. GetPlayerName(playerid, nome, 24);
  4600. if(listitem == 0)
  4601. {
  4602. if(GetPlayerMoney(playerid) < 1000)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
  4603. GivePlayerWeapon(playerid, 34, 100);
  4604. GivePlayerMoney(playerid, -1000);
  4605. new Float:x, Float: y, Float: z;
  4606. GetPlayerPos(playerid, x, y, z);
  4607. GetPlayerName(playerid, nome, 24);
  4608. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile di precisione.", nome);
  4609. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4610. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile di precisione.");
  4611. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4612. }
  4613. if(listitem == 1)
  4614. {
  4615. if(GetPlayerMoney(playerid) < 800)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}800${FFFFFF}.");
  4616. GivePlayerWeapon(playerid, 33, 200);
  4617. GivePlayerMoney(playerid, -800);
  4618. new Float:x, Float: y, Float: z;
  4619. GetPlayerPos(playerid, x, y, z);
  4620. GetPlayerName(playerid, nome, 24);
  4621. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile.", nome);
  4622. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4623. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile.");
  4624. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4625. }
  4626. }
  4627. }
  4628.  
  4629. /*==========================================================================Esplosivi(Ammunation)*/
  4630. if(dialogid == ESPLOSIVI)
  4631. {
  4632. if(response)
  4633. {
  4634. GetPlayerName(playerid, nome, 24);
  4635. if(listitem == 0)
  4636. {
  4637. if(GetPlayerMoney(playerid) < 400)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}400${FFFFFF}.");
  4638. GivePlayerWeapon(playerid,16, 20);
  4639. GivePlayerMoney(playerid, -400);
  4640. new Float:x, Float: y, Float: z;
  4641. GetPlayerPos(playerid, x, y, z);
  4642. GetPlayerName(playerid, nome, 24);
  4643. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un kit di granate.", nome);
  4644. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4645. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un kit di granate.");
  4646. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4647. }
  4648. if(listitem == 1)
  4649. {
  4650. if(GetPlayerMoney(playerid) < 200)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}200${FFFFFF}.");
  4651. GivePlayerWeapon(playerid, 18, 30);
  4652. GivePlayerMoney(playerid, -200);
  4653. new Float:x, Float: y, Float: z;
  4654. GetPlayerPos(playerid, x, y, z);
  4655. GetPlayerName(playerid, nome, 24);
  4656. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un kit di molotov.", nome);
  4657. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4658. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un kit di molotov.");
  4659. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4660. }
  4661. if(listitem == 2)
  4662. {
  4663. if(GetPlayerMoney(playerid) < 550)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}550${FFFFFF}.");
  4664. GivePlayerWeapon(playerid, 39, 20);
  4665. GivePlayerWeapon(playerid, 40, 1);
  4666. GivePlayerMoney(playerid, -550);
  4667. new Float:x, Float: y, Float: z;
  4668. GetPlayerPos(playerid, x, y, z);
  4669. GetPlayerName(playerid, nome, 24);
  4670. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un kit di C4.", nome);
  4671. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4672. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un kit di C4.");
  4673. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4674. }
  4675. }
  4676. }
  4677.  
  4678. /*==========================================================================Emergenza Polizia*/
  4679. if(dialogid == EMERGENZA)
  4680. {
  4681. if(response)
  4682. {
  4683. if(!strlen(inputtext))
  4684. {
  4685. format(stringa, sizeof(stringa), "{FF4444}Errore:{FFFFFF} Inserisci un messaggio.\n{FFFFFF}Inserisci il messaggio da inviare alla centrale, specificando dove ti trovi.", nome);
  4686. ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
  4687. return 0;
  4688. }
  4689. for(new i = 0; i < MAX_PLAYERS; i++)
  4690. {
  4691. if(GetPlayerTeam(i) == Polizia)
  4692. {
  4693. GetPlayerName(playerid, nome, 24);
  4694. format(stringa, sizeof(stringa), "[{FFFFFF}POLIZIA{00BFFF}] ** L'agente {FFFFFF}%s{00BFFF} è in pericolo e richiede rinforzi. Messaggio: {FFFFFF}%s{00BFFF}", nome, inputtext);
  4695. SendClientMessage(i, BLU_CHIARO, stringa);
  4696. }
  4697. }
  4698. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai inviato una segnalazione d'emergenza alla centrale.");
  4699. }
  4700. }
  4701. /*==========================================================================GPS*/
  4702. if(dialogid == GPS)
  4703. {
  4704. if(response)
  4705. {
  4706. new Float:x, Float: y, Float: z;
  4707. GetPlayerPos(playerid, x, y, z);
  4708. GetPlayerName(playerid, nome, 24);
  4709. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} imposta una meta nel GPS.", nome);
  4710. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  4711. if(listitem == 0)
  4712. {
  4713. SetPlayerCheckpoint(playerid, 2243.4275, -1659.5256, 15.2882, 5.0);
  4714. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Negozio di vestiti {FFFFFF}nel GPS.");
  4715. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
  4716. }
  4717. if(listitem == 1)
  4718. {
  4719. if(GetPlayerTeam(playerid) == Groove) {SetPlayerCheckpoint(playerid, 2500.0652, -1677.9636, 13.0304, 5.0);}
  4720. if(GetPlayerTeam(playerid) == Ballas) {SetPlayerCheckpoint(playerid, 2008.5146, -1130.1874, 24.9206, 5.0);}
  4721. if(GetPlayerTeam(playerid) == Vagos) {SetPlayerCheckpoint(playerid, 2350.3357, -1162.9158, 27.0327, 5.0);}
  4722. if(GetPlayerTeam(playerid) == Atzecas) {SetPlayerCheckpoint(playerid, 1946.9575, -2099.9319, 13.2093, 5.0);}
  4723. if(GetPlayerTeam(playerid) == Triade) {SetPlayerCheckpoint(playerid, 365.2892, -1594.5588, 31.2771, 5.0);}
  4724. if(GetPlayerTeam(playerid) == Bikers) {SetPlayerCheckpoint(playerid, 961.7084, -1832.8285, 12.6022, 5.0);}
  4725. if(GetPlayerTeam(playerid) == Polizia) {SetPlayerCheckpoint(playerid, 1535.2240, -1672.3832, 13.0518, 5.0);}
  4726. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Base della fazione {FFFFFF}nel GPS.");
  4727. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
  4728. }
  4729. if(listitem == 2)
  4730. {
  4731. SetPlayerCheckpoint(playerid, 1179.6179, -919.4143, 42.9274, 5.0);
  4732. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Burger Shot {FFFFFF}nel GPS.");
  4733. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
  4734. }
  4735. if(listitem == 3)
  4736. {
  4737. SetPlayerCheckpoint(playerid,1360.4415,-1275.3129,13.0885, 5.0);
  4738. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Ammunation {FFFFFF}nel GPS.");
  4739. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
  4740. }
  4741. if(listitem == 4)
  4742. {
  4743. SetPlayerCheckpoint(playerid,1664.6586,-1408.9457,13.3096, 5.0);
  4744. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Banca {FFFFFF}nel GPS.");
  4745. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
  4746. }
  4747. }
  4748. }
  4749. if(dialogid == SCEGLILAVORO)
  4750. {
  4751. if(response)
  4752. {
  4753. if(listitem == 0)
  4754. {
  4755. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai ottenuto il permesso di lavoro come {33AA33}Camionista{FFFFFF}. Dirigiti al checkpoint.");
  4756. new Float:x, Float: y, Float: z;
  4757. GetPlayerPos(playerid, x, y, z);
  4758. GetPlayerName(playerid, nome, 24);
  4759. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ottiene il permesso di lavoro come {FFFFFF}Camionista{00BFFF}.", nome);
  4760. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4761. SetPlayerCheckpoint(playerid, 780.9424, -1363.6980, 13.5365, 5.0);
  4762. LavoratoreConsegna[playerid] = true;
  4763. if(Pizzaboy[playerid] == true) Pizzaboy[playerid] = false;
  4764. if(VendHotDog[playerid] == true) VendHotDog[playerid] = false;
  4765. }
  4766. if(listitem == 2)
  4767. {
  4768. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai ottenuto il permesso di lavoro come {33AA33}Pizzaboy{FFFFFF}. Dirigiti al checkpoint.");
  4769. new Float:x, Float: y, Float: z;
  4770. GetPlayerPos(playerid, x, y, z);
  4771. GetPlayerName(playerid, nome, 24);
  4772. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ottiene il permesso di lavoro come {FFFFFF}Pizzaboy{00BFFF}.", nome);
  4773. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4774. SetPlayerCheckpoint(playerid, 2097.9609, -1815.6866, 13.3828, 5.0);
  4775. Pizzaboy[playerid] = true;
  4776. if(VendHotDog[playerid] == true) VendHotDog[playerid] = false;
  4777. if(LavoratoreConsegna[playerid] == true) LavoratoreConsegna[playerid] = false;
  4778. }
  4779. if(listitem == 3)
  4780. {
  4781. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai ottenuto il permesso di lavoro come {33AA33}Venditore di HotDog{FFFFFF}. Dirigiti al checkpoint.");
  4782. new Float:x, Float: y, Float: z;
  4783. GetPlayerPos(playerid, x, y, z);
  4784. GetPlayerName(playerid, nome, 24);
  4785. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ottiene il permesso di lavoro come {FFFFFF}Venditore di HotDog{00BFFF}.", nome);
  4786. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4787. SetPlayerCheckpoint(playerid, 1216.8407, -875.6584, 42.4739, 5.0);
  4788. VendHotDog[playerid] = true;
  4789. if(LavoratoreConsegna[playerid] == true) LavoratoreConsegna[playerid] = false;
  4790. if(Pizzaboy[playerid] == true) Pizzaboy[playerid] = false;
  4791. }
  4792. }
  4793. }
  4794.  
  4795. return 1;
  4796. }
  4797.  
  4798. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  4799. {
  4800. return 1;
  4801. }
  4802.  
  4803. //Seifader
  4804. public OnPlayerScreenFade(playerid, color, speed)
  4805. {
  4806. return 1;
  4807. }
  4808. public OnPlayerScreenColorFade(playerid, color, speed)
  4809. {
  4810. return 1;
  4811. }
  4812.  
  4813. public OnPlayerFadeFlashed(playerid, color, speed)
  4814. {
  4815. return 1;
  4816. }
  4817.  
  4818. /*==============================================================================Timers*/
  4819. //Spawn
  4820. public Spawn(playerid)
  4821. {
  4822. SpawnPlayer(playerid);
  4823. ShowPlayerDialog(playerid, SCELTA_TEAM, DIALOG_STYLE_LIST, "{33AA33}Selezione Fazione:", "{33AA33}Groove Street\n{B200FF}Ballas\n{FFFF00}Vagos\n{00FFFF}Atzecas\n{FFFFFF}Triade\n{F97804}Bikers\n{0000FF}Polizia\n{00BFFF}Medici\n{AFAFAF}Cittadino", "Scegli", "Chiudi");
  4824. SetPlayerCameraLookAt(playerid, 2521.2009, -1475.4996, 23.9941);
  4825. SetPlayerCameraPos(playerid, 2513.6978, -1464.2731, 24.0043);
  4826. SendClientMessage(playerid, ROSA, "*** {FFFFFF}Scegli uno tra i Team nella lista.");
  4827. return 1;
  4828. }
  4829.  
  4830. //Telecamera
  4831. public Telecamera(playerid)
  4832. {
  4833. SetPlayerPos(playerid, 343.2539, -2003.4648, 22.8738);
  4834. SetPlayerCameraPos(playerid, 345.3194, -2002.9467, 23.3376);
  4835. SetPlayerCameraLookAt(playerid, 383.5432, -2040.4696, 23.3376);
  4836. return 1;
  4837. }
  4838.  
  4839. //Aggiorna tempo
  4840. public UpdateTime()
  4841. {
  4842. new ora, minuti;
  4843. gettime(ora, minuti);
  4844. SetWorldTime(ora);
  4845. new t = 0;
  4846. while(t != MAX_PLAYERS)
  4847. {
  4848. if(IsPlayerConnected(t) && GetPlayerState(t) != PLAYER_STATE_NONE)
  4849. {
  4850. SetPlayerTime(t, ora, minuti);
  4851. }
  4852. t++;
  4853. }
  4854. }
  4855.  
  4856. //VoteKick
  4857. public FineVoteKick(id, playerid)
  4858. {
  4859. new nomeid[24];
  4860. GetPlayerName(id, nomeid, 24);
  4861. if(VotiPlayers >= VOTI_NECESSARI)
  4862. {
  4863. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Votekick{00BFFF}]", nomeid);
  4864. SendClientMessageToAll(BLU_CHIARO, stringa);
  4865. VotekickAttivo = false;
  4866. Votato[playerid] = false;
  4867. VotiPlayers = 0;
  4868. }
  4869. else {format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} non è stato kickato dal Server. [Motivo: {FFFFFF}Voti insufficienti{00BFFF}]", nomeid); SendClientMessageToAll(BLU_CHIARO, stringa); }
  4870. }
  4871.  
  4872. //Rapina in Banca
  4873. public FineRapina(playerid)
  4874. {
  4875. RapinaAttiva = false;
  4876. Rapinatore[playerid] = false;
  4877. StopRapina[playerid] = true;
  4878. new bottino = random(2000)+8000;
  4879. GivePlayerMoney(playerid, bottino);
  4880. SetPlayerWantedLevel(playerid, 4);
  4881. new nome[24];
  4882. GetPlayerName(playerid, nome, 24);
  4883. new Float:x, Float: y, Float: z;
  4884. GetPlayerPos(playerid, x, y, z);
  4885. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha rapinato con successo {FFFFFF}%d{00BFFF}$ alla banca.", nome, bottino);
  4886. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4887. format(stringa, sizeof(stringa), "* {FFFFFF}Hai rapinato con successo {33AA33}%d {FFFFFF}alla banca. Attendi un'ora prima di rapinarla di nuovo.", bottino);
  4888. SendClientMessage(playerid, COLORE_GROOVE, stringa);
  4889. SetTimerEx("FineStopRapina", 3600000, false, "d", playerid);
  4890. }
  4891.  
  4892. //Rapina in Banca
  4893. public FineStopRapina(playerid)
  4894. {
  4895. StopRapina[playerid] = false;
  4896. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ora puoi effettuare un'altra rapina.");
  4897. }
  4898.  
  4899. //Esci di prigione
  4900. public EsciPrigione(id)
  4901. {
  4902. SetPlayerWantedLevel(id, 0);
  4903. Jailato[id] = false;
  4904. new nomeid[24];
  4905. GetPlayerName(id, nomeid, 24);
  4906. if(GetPlayerTeam(id) == Groove)
  4907. {
  4908. new Float:x, Float: y, Float: z;
  4909. GetPlayerPos(id, x, y, z);
  4910. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
  4911. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4912. SetPlayerPos(id, 2496.1279, -1683.8066, 13.3645);
  4913. GivePlayerWeapon(id, 5, 1);
  4914. GivePlayerWeapon(id, 28, 400);
  4915. GivePlayerWeapon(id, 25, 500);
  4916. }
  4917. if(GetPlayerTeam(id) == Ballas)
  4918. {
  4919. new Float:x, Float: y, Float: z;
  4920. GetPlayerPos(id, x, y, z);
  4921. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
  4922. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4923. SetPlayerPos(id, 2000.0258, -1121.1666, 26.7448);
  4924. GivePlayerWeapon(id, 1, 1);
  4925. GivePlayerWeapon(id, 32, 450);
  4926. GivePlayerWeapon(id, 22, 400);
  4927. }
  4928. if(GetPlayerTeam(id) == Vagos)
  4929. {
  4930. new Float:x, Float: y, Float: z;
  4931. GetPlayerPos(id, x, y, z);
  4932. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
  4933. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4934. SetPlayerPos(id, 2323.1489, -1192.1659, 27.9693);
  4935. GivePlayerWeapon(id, 6, 1);
  4936. GivePlayerWeapon(id, 26, 400);
  4937. GivePlayerWeapon(id, 28, 450);
  4938. }
  4939. if(GetPlayerTeam(id) == Atzecas)
  4940. {
  4941. new Float:x, Float: y, Float: z;
  4942. GetPlayerPos(id, x, y, z);
  4943. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
  4944. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4945. SetPlayerPos(id, 1931.7733, -2110.7942, 13.6953);
  4946. GivePlayerWeapon(id, 7, 1);
  4947. GivePlayerWeapon(id, 32, 450);
  4948. GivePlayerWeapon(id, 33, 400);
  4949. }
  4950. if(GetPlayerTeam(id) == Triade)
  4951. {
  4952. new Float:x, Float: y, Float: z;
  4953. GetPlayerPos(id, x, y, z);
  4954. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
  4955. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4956. SetPlayerPos(id, 327.4093, -1515.8767, 36.0391);
  4957. GivePlayerWeapon(id, 8, 1);
  4958. GivePlayerWeapon(id, 24, 400);
  4959. GivePlayerWeapon(id, 28, 500);
  4960. }
  4961. if(GetPlayerTeam(id) == Bikers)
  4962. {
  4963. new Float:x, Float: y, Float: z;
  4964. GetPlayerPos(id, x, y, z);
  4965. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
  4966. SendNearMessage(x, y, z, BLU_CHIARO, stringa);
  4967. SetPlayerPos(id, 973.5109, -1829.7964, 13.3227);
  4968. GivePlayerWeapon(id, 4, 1);
  4969. GivePlayerWeapon(id, 30, 350);
  4970. GivePlayerWeapon(id, 25, 500);
  4971. }
  4972. }
  4973.  
  4974. //Fine Drogato
  4975. public FineDrogato(playerid)
  4976. {
  4977. if(Drogato[playerid] == true)
  4978. {
  4979. Drogato[playerid] = false;
  4980. SetPlayerWeather(playerid, 4);
  4981. SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}L'effetto della droga è finito.");
  4982. }
  4983. }
  4984.  
  4985. //PayDay
  4986. public PayDay()
  4987. {
  4988. for(new i = 0; i < MAX_PLAYERS; i++)
  4989. {
  4990. if(GetPlayerTeam(i) == Medici || GetPlayerTeam(i) == Polizia)
  4991. {
  4992. GivePlayerMoney(i, SOLDI_PAYDAY);
  4993. format(stringa, sizeof(stringa), "~y~Hai ricevuto il tuo payday di %d$", SOLDI_PAYDAY);
  4994. GameTextForPlayer(i, stringa, 3000, 4);
  4995. }
  4996. }
  4997. }
  4998.  
  4999. //StopTramortito
  5000. public StopTramortito(id)
  5001. {
  5002. SendClientMessage(id, COLORE_GROOVE, "* {FFFFFF}Ti sei rialzato.");
  5003. new Float:x, Float: y, Float: z;
  5004. GetPlayerPos(id, x, y, z);
  5005. new nome[24];
  5006. GetPlayerName(id, nome, 24);
  5007. format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si rialza.", nome);
  5008. SendNearMessage(x, y, z, BLU_CHIARO,stringa);
  5009. ClearAnimations(id);
  5010. Tramortito[id] = false;
  5011. }
  5012.  
  5013. /*==============================================================================Funzioni*/
  5014. //Strtok
  5015. strtok(const stringhe[], &index)
  5016. {
  5017. new length = strlen(stringhe);
  5018. while((index < length) && (stringhe[index] <= ' ')) index++;
  5019. new
  5020. offset = index,
  5021. result[20];
  5022. while((index < length) && (stringhe[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  5023. {
  5024. result[index - offset] = stringhe[index];
  5025. index++;
  5026. }
  5027. result[index - offset] = EOS;
  5028. return result;
  5029. }
  5030.  
  5031. //Strrest
  5032. stock strrest(const string[], &index)
  5033. {
  5034. new length = strlen(string);
  5035. while ((index < length) && (string[index] <= ' '))
  5036. {
  5037. index++;
  5038. }
  5039. new offset = index;
  5040. new result[128];
  5041. while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
  5042. {
  5043. result[index - offset] = string[index];
  5044. index++;
  5045. }
  5046. result[index - offset] = EOS;
  5047. return result;
  5048. }
  5049.  
  5050. //Salva Account
  5051. SalvaAccount(playerid)
  5052. {
  5053. new nome[24];
  5054. GetPlayerName(playerid, nome, 24);
  5055. format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
  5056. dini_IntSet(pFile, "Soldi", GetPlayerMoney(playerid));
  5057. dini_IntSet(pFile, "Kills", PlayerInfo[playerid][pKills]);
  5058. dini_IntSet(pFile, "Deaths", PlayerInfo[playerid][pDeaths]);
  5059. dini_IntSet(pFile, "Bannato", PlayerInfo[playerid][Bannato]);
  5060. dini_IntSet(pFile, "Ricercato", GetPlayerWantedLevel(playerid));
  5061. Loggato[playerid] = false;
  5062. return 1;
  5063. }
  5064.  
  5065. //Messaggio Vicino
  5066. stock SendNearMessage(Float:x, Float:y, Float:z, color, const message[])
  5067. {
  5068. for(new i = 0; i < MAX_PLAYERS; i++)
  5069. {
  5070. if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
  5071. {
  5072. SendClientMessage(i, color, message);
  5073. }
  5074. }
  5075. return 1;
  5076. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement