Advertisement
Guest User

GangWar 1.0.3c by theblade

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