Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ___________________________________________________
- | Gang War v. 1.0.3c |
- | |
- | Crediti: |
- | - Francesco_Ronaldo aka The_Blade: Scripter GM |
- | - Allan Jader (CyNiC): Coordinate occhiali(suo FS)|
- | - DracoBlue: Dini.inc |
- | - Peppinux aka Peppe_Stasu: Teamchat |
- | - mitosking: Alcuni aiuti sul Register System |
- | - Scrip: Coordinate casco |
- | |
- | Potete editare la gm, ma lasciando i crediti |
- | sopra riportati. |
- |___________________________________________________|
- =============================Includes*/
- #include <a_samp>
- #include <Dini>
- #include <Seifader>
- #include <gl_common>
- #pragma unused Seifader_OnExit
- /*=============================Colori*/
- #define COLORE_GROOVE 0x33AA33AA
- #define COLORE_BALLAS 0xB200FFAA
- #define COLORE_VAGOS 0xFFFF00AA
- #define COLORE_ATZECAS 0x00FFFFFF
- #define COLORE_TRIADE 0xFFFFFFAA
- #define COLORE_BIKERS 0xF97804AA
- #define COLORE_POLIZIA 0x0000FFAA
- #define GRIGIO 0xAFAFAFAA
- #define ROSA 0xFF66FFAA
- #define BLU_CHIARO 0x00BFFFAA
- #define COLORE_ERRORE 0xFF4444AA
- #define NERO 0x000000AA
- /*=============================Dialogs*/
- #define SCELTA_TEAM 1000
- #define REGISTER_DIALOG 1200
- #define LOGIN_DIALOG 1300
- #define USERPANEL 1400
- #define CAMBIAPASS 1500
- #define AIUTO 1700
- #define REGOLE 1800
- #define CREDITI 1900
- #define COMANDI 2100
- #define ANIMAZIONI 2300
- #define BANCA 2400
- #define DEPOSITA 2500
- #define PRELEVA 2600
- #define CAMBIATEAM 2700
- #define COMPRADROGA 2800
- #define COMPRAPIZZA 2900
- #define COMPRABSHOT 3000
- #define COMPRADISCO 3100
- #define COMPRAVESTITI 3200
- #define COMPRARMI 3400
- #define ESPLOSIVI 3500
- #define FUCILI_POMPA 3600
- #define PISTOLE 3700
- #define FUCILI_ASSALTO 3800
- #define MITRA 3900
- #define FUCILI_PREC 4000
- #define CMD_ADMIN 4100
- #define CMDPOLIZIA 4400
- #define EMERGENZA 4500
- #define GPS 4600
- #define SCEGLILAVORO 4700
- /*=============================Teams*/
- #define Groove 1
- #define Ballas 2
- #define Vagos 3
- #define Atzecas 4
- #define Polizia 5
- #define Triade 6
- #define Bikers 7
- #define Medici 8
- #define Cittadini 9
- /*=============================Variabili*/
- enum pInfo {pKills, pDeaths, Bannato}
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new stringa[500], pFile[64], Ip[16];
- new Massimoping = 600;
- new Skin;
- new moto_admin1, auto_admin1, auto_admin2, eli_admin1; //Veicoli Admin
- new Avvisi[MAX_PLAYERS] = 0;
- new VotiPlayers = 0;
- new ZonaGroove, ZonaBallas, ZonaVagos, ZonaAtzecas, ZonaTriade, ZonaBikers;
- 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;
- new veicoloconsegna1, veicoloconsegna2, veicoloconsegna3, veicoloconsegna4, veicoloconsegna5, veicoloconsegna6, veicoloconsegna7;
- /*new affitta1, affitta2, affitta3, affitta4, affitta5, affitta6, affitta7, affitta8, affitta9, affitta10, affitta11, affitta12, affitta13;*/
- new pizzaboy1, pizzaboy2, pizzaboy3, pizzaboy4, pizzaboy5, pizzaboy6, pizzaboy7;
- new hotdog1, hotdog2, hotdog3, hotdog4;
- new banc;
- new TimerRapina;
- new Text3D: Afk[MAX_PLAYERS];
- new Blocco[MAX_PLAYERS];
- new Banconota[MAX_PLAYERS];
- /*=============================Bool*/
- new bool: Loggato[MAX_PLAYERS];
- new bool: Morto[MAX_PLAYERS];
- new bool: Votato[MAX_PLAYERS];
- new bool: VotekickAttivo = false;
- new bool: RapinaAttiva = false;
- new bool: Rapinatore[MAX_PLAYERS];
- new bool: StopRapina[MAX_PLAYERS];
- new bool: AFK[MAX_PLAYERS];
- new bool: PostoDiBlocco[MAX_PLAYERS];
- new bool: Jailato[MAX_PLAYERS];
- new bool: Acceso[MAX_VEHICLES] = false;
- new bool: Luci[MAX_VEHICLES] = false;
- new bool: Drogato[MAX_PLAYERS] = false;
- new bool: LavoratoreConsegna[MAX_PLAYERS] = false;
- new bool: Pizzaboy[MAX_PLAYERS] = false;
- new bool: VendHotDog[MAX_PLAYERS] = false;
- new bool: Animazione[MAX_PLAYERS] = false;
- new bool: Tramortito[MAX_PLAYERS] = false;
- /*=============================Forwards*/
- forward Spawn(playerid);
- forward Telecamera(playerid);
- forward UpdateTime();
- forward FineVoteKick(id, playerid);
- forward FineRapina(playerid);
- forward FineStopRapina(playerid);
- forward EsciPrigione(id);
- forward FineDrogato(playerid);
- forward PayDay();
- forward StopTramortito(id);
- /*=============================Array*/
- new Rskingroove[3][1] =
- {
- {105},{106},{107}
- };
- new Rskinballas[3][1] =
- {
- {102},{103},{104}
- };
- new Rskinvagos[3][1] =
- {
- {108},{109},{110}
- };
- new Rskinatz[3][1] =
- {
- {114},{115},{116}
- };
- new Rskintriade[3][1] =
- {
- {117},{118},{120}
- };
- new Rskinbikers[3][1] =
- {
- {247},{248},{254}
- };
- new Rskinpolizia[3][1] =
- {
- {280},{281},{284}
- };
- new Rskinmedici[3][1] =
- {
- {274},{275},{276}
- };
- new Rskincittadini[24][1] =
- {
- {101},{12},{13},{136},{14},{142},{144},{15}, {17},{170},{180},{182},{184},{185},{186},{20}, {206},{21},{22},{214},{223},{234},{250},{261}
- };
- new Proibite[][] =
- {
- "bastardo", "puttana", "dio", "madonna", "troia", "motherfucker", "bitch", "asshole"
- };
- new Spam[][] =
- {
- "www.", ".it", ".com", ".org"
- };
- /*=============================Altro*/
- #define righe 5035
- #define aggiornamento "Quotidiano"
- #define versione "1.0.3c"
- #define VOTI_NECESSARI 8
- #define SOLDI_PAYDAY 300
- /*==============================================================================Server Dos*/
- main()
- {
- print("\n--------------------------------------------------");
- print(" GangWar 1.0.3c by Francesco_Ronaldo / The_Blade");
- print(" Caricata con Successo!");
- print("--------------------------------------------------\n");
- }
- public OnGameModeInit()
- {
- /*==========================================================================Generale*/
- SetGameModeText("GangWar 1.0.3c");
- AddPlayerClass(0, 2521.2009, -1475.4996 ,23.9941, 27.3088, 0, 0, 0, 0, 0, 0);
- EnableStuntBonusForAll(0);
- DisableInteriorEnterExits();
- ShowPlayerMarkers(0);
- AllowInteriorWeapons(true);
- ManualVehicleEngineAndLights();
- UpdateTime();
- SetTimer("UpdateTime", 1000 * 60, 1);
- SetTimer("PayDay", 1800000, true);
- for(new i = 0; i < MAX_VEHICLES; i++){ SetVehicleToRespawn(i);}
- /*==========================================================================Veicoli*/
- LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
- LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Groove.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Ballas.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Vagos.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Atzecas.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Triade.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Bikers.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Polizia.txt");
- LoadStaticVehiclesFromFile("vehicles/Veicoli_Medici.txt");
- //Admin
- eli_admin1 = AddStaticVehicle(487, 1291.2463, -786.8067, 96.6687, 112.3016, 166, 1);//Maverick Admin
- auto_admin1 = AddStaticVehicle(451, 1242.7451, -804.8408, 84.1406, 179.0912, 166, 1);//Turismo Admin
- auto_admin2 = AddStaticVehicle(411, 1248.2983, -804.3279, 84.1406, 185.6713, 166, 1);//Infernus Admin
- moto_admin1 = AddStaticVehicle(522, 1255.1449, -804.1754, 84.1406, 179.0912, 166, 1); //Moto privata Admin
- //Consegna
- veicoloconsegna1 = AddStaticVehicle(414, 780.9424, -1363.6980, 13.5365, 92.6315, 11, 11);
- veicoloconsegna2 = AddStaticVehicle(414, 781.0551, -1368.3329, 13.5366, 79.7847, 11, 11);
- veicoloconsegna3 = AddStaticVehicle(414, 780.9845, -1376.4435, 13.6139, 90.4381, 11, 11);
- veicoloconsegna4 = AddStaticVehicle(414, 770.8369, -1336.3174, 13.5364, 182.5590, 11, 11);
- veicoloconsegna5 = AddStaticVehicle(414, 765.8628, -1336.9015, 13.5351, 182.5590, 11, 11);
- veicoloconsegna6 = AddStaticVehicle(414, 783.3825, -1347.7689, 13.2448, 90.3079, 11, 11);
- veicoloconsegna7 = AddStaticVehicle(414, 783.3726, -1356.8368, 13.4375, 272.7029, 11, 11);
- //Pizzaboy
- pizzaboy1 = AddStaticVehicle(448, 2097.7898, -1812.9028, 13.3828, 91.0419, 151, 1);
- pizzaboy2 = AddStaticVehicle(448, 2097.9609, -1815.6866, 13.3828, 87.9086, 151, 1);
- pizzaboy3 = AddStaticVehicle(448, 2097.5603, -1818.2117, 13.3828, 90.1019, 151, 1);
- pizzaboy4 = AddStaticVehicle(448, 2097.8145, -1821.0215, 13.3828, 90.1019, 151, 1);
- pizzaboy5 = AddStaticVehicle(448, 2097.8708, -1801.4630, 13.3828, 92.6086, 151, 1);
- pizzaboy6 = AddStaticVehicle(448, 2097.5530, -1799.1718, 13.3889, 82.2685, 151, 1);
- pizzaboy7 = AddStaticVehicle(448, 2096.7837, -1796.5861, 13.3889, 92.6086, 151, 1);
- //Venditore HotDog
- hotdog1 = AddStaticVehicle(588, 1212.7352, -877.1066, 42.4861, 184.2732, 1, 0);
- hotdog2 = AddStaticVehicle(588, 1216.8407, -875.6584, 42.4739, 179.6949, 1, 0);
- hotdog3 = AddStaticVehicle(588, 1220.5930, -872.9952, 42.4667, 183.2418, 1, 0);
- hotdog4 = AddStaticVehicle(588, 1207.5348, -876.3549, 42.4880, 191.9818, 1, 0);
- /*Veicoli da affittare
- AddStaticVehicle(510, 1109.2578, -1382.5623, 13.7813, 181.6183, 0, 0); // affitta veicolo 1
- AddStaticVehicle(510, 1106.2860, -1383.4672, 13.7813, 180.3650, 0, 0); // affitta veicolo 2
- AddStaticVehicle(510, 1106.0280, -1381.4001, 13.7813, 183.1850, 0, 0); // affitta veicolo 3
- AddStaticVehicle(510, 1103.9633, -1383.8191, 13.7813, 185.3784, 0, 0); // affitta veicolo 4
- AddStaticVehicle(462, 1104.2202, -1380.4529, 13.7813, 176.9183, 0, 0); // affitta veicolo 5
- AddStaticVehicle(462, 1101.4409, -1383.5104, 13.7813, 178.7983, 0, 0); // affitta veicolo 6
- AddStaticVehicle(586, 1101.5391, -1379.5109, 13.7813, 178.4850, 0, 0); // affitta veicolo 7
- AddStaticVehicle(586, 1098.9530, -1382.9902, 13.7878, 183.4984, 0, 0); // affitta veicolo 8
- AddStaticVehicle(521, 1096.0002, -1383.5317, 13.7878, 183.4984, 0, 0); // affitta veicolo 9
- AddStaticVehicle(521, 1091.5355, -1382.4917, 13.7813, 178.7983, 0, 0); // affitta veicolo 10
- AddStaticVehicle(575, 1087.0264, -1382.5604, 13.7813, 177.8583, 0, 0); // affitta veicolo 11
- AddStaticVehicle(542, 1085.1398, -1370.7142, 13.7813, 182.2216, 0, 0); // affitta veicolo 12
- AddStaticVehicle(467, 1090.1141, -1374.7758, 13.7813, 181.9083, 0, 0); affitta veicolo 13*/
- /*==========================================================================Pickups*/
- PickDisco = CreatePickup(1318, 1, 1836.0126, -1683.2328, 13.3657, 0); //Discoteca
- PickBurgershot = CreatePickup(1318, 1, 1199.4087, -919.3823, 43.1128, 0); //Burgershot
- PickPizzeria = CreatePickup(1318, 1, 2104.8066, -1806.3562, 13.5547, 0); //Pizzeria
- PickBinco = CreatePickup(1318, 1, 2244.4541, -1664.9598, 15.4766, 0); //Binco
- PickProLaps = CreatePickup(1318, 1, 499.8427, -1360.2126, 16.3287, 0); //ProLaps
- PickBanca = CreatePickup(1318, 1, 1657.8302, -1395.7705, 13.5469, 0); //Banca
- PickAmmunation = CreatePickup(1318, 1, 1368.3346, -1279.8079, 13.5469, 0); //Ammunation
- PickBGroove1 = CreatePickup(1318, 1, 2459.4397, -1690.9667, 13.5455, 0); //Base Groove 1
- PickBGroove2 = CreatePickup(1318, 1, 2495.2207, -1690.6324, 14.7656, 0); //Base Groove 2
- PickBBallas = CreatePickup(1318, 1, 2000.1630, -1114.9568, 27.1250, 0); //Base Ballas
- PickBVagos = CreatePickup(1318, 1, 2352.0879, -1170.2889, 28.0564, 0); //Base Vagos
- PickBPolizia = CreatePickup(1318, 1, 1554.5031, -1675.5303, 16.1953, 0); //Stazione Polizia
- PickBBikers = CreatePickup(1318, 1, 962.0483, -1824.2063, 13.3268, 0); //Base Bikers
- PickBTriade = CreatePickup(1318, 1, 363.9694, -1601.4688, 31.9817, 0); //Base Triade
- PickBAtzecas = CreatePickup(1318, 1, 1935.0416, -2081.3706, 13.5622, 0); //Base Atzecas
- PickIBanca = CreatePickup(1274, 1, 2316.1282, -10.0103, 26.7422, 0); //Interagisci Banca
- IDroga1 = CreatePickup(1274, 1, 2325.4238, -1252.2784, 22.5000, 0); //Interagisci Droga 1
- IDroga2 = CreatePickup(1274, 1, 1394.6309, -1460.5256, 11.6406, 0); //Interagisci Droga 2
- IDroga3 = CreatePickup(1274, 1, 975.9379, -1286.6793, 13.5540, 0); //Interagisci Droga 3
- IPizzeria = CreatePickup(1274, 1, 374.5851, -119.1880, 1001.4995, 0); //Interagisci pizzeria
- IBurgershot = CreatePickup(1274, 1, 376.7253, -67.7049, 1001.5151, 0); //Interagisci Bshot
- IDisco = CreatePickup(1274, 1, 499.4358, -20.5824, 1000.6797, 0); //Interagisci Discoteca
- IBinco = CreatePickup(1274, 1, 217.3809, -98.3706, 1005.2578, 0); //Interagisci Binco
- IProlaps = CreatePickup(1274, 1, 199.5624, -127.6274, 1003.5152, 0); //Interagisci Prolaps
- IAmmunation = CreatePickup(1274, 1, 308.2633, -141.1325, 999.6016, 0); //Interagisci Ammunation
- Resp1 = CreatePickup(1314, 1, 1575.5601, -1636.0497, 13.5510, 0); //Cambia area respawn 1
- Resp2 = CreatePickup(1314, 1, 2231.8052, -1333.4749, 23.98169, 0); //Cambia area respawn 2
- Resp3 = CreatePickup(1314, 1, 2004.9958, -1443.7739, 13.5625, 0); //Cambia area respawn 3
- Resp4 = CreatePickup(1314, 1, 1182.2101, -1324.9923, 13.5817, 0); //Cambia area respawn 4
- Resp5 = CreatePickup(1314, 1, 731.9648, -1275.7582, 13.5664, 0); //Cambia area respawn 5
- Resp6 = CreatePickup(1314, 1, 153.7769, -1942.7628, 3.7734, 0); //Cambia area respawn 6
- PickComune = CreatePickup(1318, 1, 1480.6362, -1770.8400, 18.7958, 0);//Entra Comune
- IComune = CreatePickup(1239, 1, 362.6935, 173.6410, 1008.3828, 0);//Interagisci Comune
- HotD = CreatePickup(1239, 1, 1216.4849, -884.0098, 42.9072, 0);//Interagisci lavoro
- PizzaB = CreatePickup(1239, 1, 2093.7961, -1816.8896, 13.3828, 0);//Interagisci lavoro
- Camionisti = CreatePickup(1239, 1, 774.3252, -1362.6146, 13.5284, 0);//Interagisci lavoro
- /*==========================================================================3DTextLabels*/
- //Negozi
- Create3DTextLabel("[{F97804}Discoteca{FFFFFF}]", COLORE_TRIADE, 1836.0126, -1683.2328, 13.3657, 40, 0);
- Create3DTextLabel("[{F97804}Burger Shot{FFFFFF}]", COLORE_TRIADE, 1199.4087, -919.3823, 43.1128, 40, 0);
- Create3DTextLabel("[{F97804}Well Stacked Pizza{FFFFFF}]", COLORE_TRIADE, 2104.8066, -1806.3562, 13.5547, 40, 0);
- Create3DTextLabel("[{F97804}Binco{FFFFFF}]", COLORE_TRIADE, 2244.4541, -1664.9598, 15.4766, 40, 0);
- Create3DTextLabel("[{F97804}ProLaps{FFFFFF}]", COLORE_TRIADE, 499.8427, -1360.2126, 16.3287, 40, 0);
- Create3DTextLabel("[{F97804}Banca di Stato{FFFFFF}]", COLORE_TRIADE, 1657.8302, -1395.7705, 13.5469, 40, 0);
- Create3DTextLabel("[{F97804}Ammunation{FFFFFF}]", COLORE_TRIADE, 1368.3346, -1279.8079, 13.5469, 40, 0);
- Create3DTextLabel("[{F97804}Base Groove{FFFFFF}]", COLORE_TRIADE, 2459.4397, -1690.9667, 13.5455, 40, 0);
- Create3DTextLabel("[{F97804}Base Groove{FFFFFF}]", COLORE_TRIADE, 2495.2207, -1690.6324, 14.7656, 40, 0);
- Create3DTextLabel("[{F97804}Base Ballas{FFFFFF}]", COLORE_TRIADE, 2000.1630, -1114.9568, 27.1250, 40, 0);
- Create3DTextLabel("[{F97804}Base Vagos{FFFFFF}]", COLORE_TRIADE, 2352.0879, -1170.2889, 28.0564, 40, 0);
- Create3DTextLabel("[{F97804}Stazione di polizia{FFFFFF}]", COLORE_TRIADE, 1554.5031, -1675.5303, 16.1953, 40, 0);
- Create3DTextLabel("[{F97804}Base Bikers{FFFFFF}]", COLORE_TRIADE, 962.0483, -1824.2063, 13.3268, 40, 0);
- Create3DTextLabel("[{F97804}Base Triade{FFFFFF}]", COLORE_TRIADE, 363.9694, -1601.4688, 31.9817, 40, 0);
- Create3DTextLabel("[{F97804}Base Atzecas{FFFFFF}]", COLORE_TRIADE, 1935.0416,- 2081.3706, 13.5622, 40, 0);
- Create3DTextLabel("[{F97804}Comune di Los Santos{FFFFFF}]", COLORE_TRIADE, 1480.6362, -1770.8400, 18.7958, 40, 0);
- Create3DTextLabel("[{F97804}Comune di Los Santos{FFFFFF}]", COLORE_TRIADE, 1480.6362, -1770.8400, 18.7958, 40, 0);
- Create3DTextLabel("[{F97804}Pizzaboy{FFFFFF}]", COLORE_TRIADE, 2092.9856, -1798.6075, 13.3828, 40, 0);
- Create3DTextLabel("[{F97804}Pizzaboy{FFFFFF}]", COLORE_TRIADE, 2093.7961, -1816.8896, 13.3828, 40, 0);
- Create3DTextLabel("[{F97804}Venditore HotDog{FFFFFF}]", COLORE_TRIADE, 1216.4849, -884.0098, 42.9072, 40, 0);
- Create3DTextLabel("[{F97804}Camionista{FFFFFF}]", COLORE_TRIADE, 774.3252, -1362.6146, 13.5284, 40, 0);
- //Esci
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 493.5561, -24.4094, 1000.6797, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 363.4143, -74.8518, 1001.5078, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 372.3421, -133.2352, 1001.4922, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 318.5674, 1114.9526, 1083.8828, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2305.3340, -16.0902, 26.7422, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 315.6836, -142.7931, 999.6016, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2455.6248, -1706.5425, 1013.5078, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2496.1160, -1692.2500, 1014.7422, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_GROOVE, 207.0748, -140.1034, 1003.5078, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 207.8046, -111.0572, 1005.1328, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 2807.5852, -1174.6793, 1025.5703, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 962.3438, -1821.0420, 515.8799, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 774.0907, -50.1249, 1000.5859, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 1927.4575, -2084.3145, 441.1686, 8, 0);
- Create3DTextLabel("[{F97804}Esci{FFFFFF}]", COLORE_TRIADE, 207.0748, -140.1034, 1003.5078, 8, 0);
- //Interagisci
- Create3DTextLabel("[{F97804}Banca di Stato{FFFFFF}]", COLORE_TRIADE, 2316.1282, -10.0103, 26.7422, 10, 0);
- Create3DTextLabel("[{F97804}Spacciatore{FFFFFF}]", COLORE_TRIADE, 2325.4238, -1252.2784, 22.5000, 10, 0);
- Create3DTextLabel("[{F97804}Spacciatore{FFFFFF}]", COLORE_TRIADE, 1394.6309, -1460.5256, 11.6406, 10, 0);
- Create3DTextLabel("[{F97804}Spacciatore{FFFFFF}]", COLORE_TRIADE, 975.9379, -1286.6793, 13.5540, 10, 0);
- Create3DTextLabel("[{F97804}Well Stacked Pizza{FFFFFF}]", COLORE_TRIADE, 374.5851, -119.1880, 1001.4995, 10, 0);
- Create3DTextLabel("[{F97804}Burger Shot{FFFFFF}]", COLORE_TRIADE, 376.7253, -67.7049, 1001.5151, 10, 0);
- Create3DTextLabel("[{F97804}Discoteca{FFFFFF}]", COLORE_TRIADE, 499.4358, -20.5824, 1000.6797, 10, 0);
- Create3DTextLabel("[{F97804}Binco{FFFFFF}]", COLORE_TRIADE, 217.3809, -98.3706, 1005.2578, 10, 0);
- Create3DTextLabel("[{F97804}ProLaps{FFFFFF}]", COLORE_TRIADE, 199.5624, -127.6274, 1003.5152, 10, 0);
- Create3DTextLabel("[{F97804}Ammunation{FFFFFF}]", COLORE_TRIADE, 308.2633, -141.1325, 999.6016, 10, 0);
- Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 1575.5601, -1636.0497, 13.5510, 40, 0);
- Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 2231.8052, -1333.4749, 23.98169, 40, 0);
- Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 2004.9958, -1443.7739, 13.5625, 40, 0);
- Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 1182.2101, -1324.9923, 13.5817, 40, 0);
- Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 731.9648, -1275.7582, 13.5664, 40, 0);
- Create3DTextLabel("[{F97804}Area respawn{FFFFFF}]", COLORE_TRIADE, 153.7769, -1942.7628, 3.7734, 40, 0);
- Create3DTextLabel("[{F97804}Lavori{FFFFFF}]", COLORE_TRIADE, 362.6935, 173.6410, 1008.3828, 40, 0);
- /*==========================================================================GangZones*/
- ZonaGroove = GangZoneCreate(2265.644, -1839.771, 2562.265, -1610.802);
- ZonaBallas = GangZoneCreate(1832.12, -1271.297, 2113.53, -1022.589);
- ZonaVagos = GangZoneCreate(2265.644, -1346.304, 2505.222, -1144.969);
- ZonaAtzecas = GangZoneCreate(1782.684, -2171.382, 2067.896, -2017.42);
- ZonaBikers = GangZoneCreate(793.9462, -1863.458, 1098.173, -1709.496);
- ZonaTriade = GangZoneCreate(288.169, -1602.907, 584.7902, -1429.206);
- /*==========================================================================Objects*/
- //Base Bikers
- CreateObject(14718, 959.1611328125, -1813.13671875, 514.87213134766, 0, 0, 2.0269775390625);
- CreateObject(2670, 971.66772460938, -1813.2768554688, 514.97198486328, 0, 0, 0);
- CreateObject(14556, 964.56146240234, -1811.5073242188, 516.40246582031, 0, 0, 180.54052734375);
- CreateObject(15037, 968.62274169922, -1817.41796875, 515.28692626953, 0, 0, 27.789794921875);
- CreateObject(1713, 971.28576660156, -1813.2219238281, 514.87994384766, 0, 0, 320.30029296875);
- CreateObject(1713, 967.87548828125, -1814.0114746094, 514.87994384766, 0, 0, 37.709838867188);
- CreateObject(2032, 959.96343994141, -1815.9769287109, 514.87994384766, 0, 0, 89.324493408203);
- CreateObject(14820, 959.86029052734, -1815.4837646484, 515.78912353516, 0, 0, 89.324493408203);
- CreateObject(1671, 958.81884765625, -1815.3891601563, 515.34014892578, 0, 0, 87.339508056641);
- CreateObject(2672, 921.25244140625, -1787.7060546875, 438.35656738281, 0, 0, 0);
- CreateObject(2672, 961.35723876953, -1811.8553466797, 515.15942382813, 0, 0, 0);
- CreateObject(2672, 971.564453125, -1816.0191650391, 515.15942382813, 0, 0, 0);
- CreateObject(2673, 968.99432373047, -1815.5743408203, 514.9677734375, 0, 0, 0);
- CreateObject(2670, 962.98101806641, -1814.6876220703, 514.97198486328, 0, 0, 0);
- CreateObject(2672, 965.08728027344, -1815.5263671875, 515.15942382813, 0, 0, 0);
- CreateObject(2232, 964.16467285156, -1810.9030761719, 515.47784423828, 0, 0, 0);
- CreateObject(2232, 965.1630859375, -1810.857421875, 515.47784423828, 0, 0, 0);
- CreateObject(920, 956.73779296875, -1815.0561523438, 515.36474609375, 0, 0, 0);
- CreateObject(2229, 958.68109130859, -1817.2332763672, 514.87994384766, 0, 0, 89.324493408203);
- CreateObject(2229, 960.22686767578, -1813.7564697266, 514.87994384766, 0, 0, 91.309265136719);
- CreateObject(1829, 956.14166259766, -1813.2277832031, 515.34448242188, 0, 0, 103.21948242188);
- CreateObject(2099, 957.91375732422, -1810.7674560547, 514.87994384766, 0, 0, 0);
- //Base Atzecas
- CreateObject(14755, 1935.603515625, -2084.255859375, 441.41864013672, 0, 0, 89.324340820313);
- CreateObject(1441, 1919.3969726563, -2086.5070800781, 440.82778930664, 0, 0, 266.70568847656);
- CreateObject(1431, 1912.6917724609, -2079.970703125, 440.72375488281, 0, 0, 47.639770507813);
- CreateObject(12954, 1905.5583496094, -2087.4692382813, 440.76171875, 0, 0, 92.026611328125);
- CreateObject(2670, 1917.0161132813, -2085.26953125, 440.26068115234, 0, 0, 0);
- CreateObject(2673, 1913.0454101563, -2082.3813476563, 440.25646972656, 0, 0, 0);
- CreateObject(2675, 1916.7957763672, -2082.4489746094, 440.23291015625, 0, 0, 21.834838867188);
- CreateObject(2675, 1918.3037109375, -2079.85546875, 440.23291015625, 0, 0, 45.649719238281);
- CreateObject(2677, 1914.1245117188, -2080.7888183594, 440.44064331055, 0, 0, 0);
- CreateObject(913, 1919.0458984375, -2079.0798339844, 441.00784301758, 0, 0, 0);
- CreateObject(1812, 1912.6246337891, -2074.5092773438, 440.16864013672, 0, 0, 0);
- CreateObject(2103, 1912.7875976563, -2079.8989257813, 441.28131103516, 0, 0, 45.65478515625);
- CreateObject(2316, 1919.4119873047, -2076.9484863281, 441.01840209961, 0, 0, 246.85583496094);
- CreateObject(2827, 1920.8109130859, -2085.7495117188, 440.16864013672, 0, 0, 0);
- CreateObject(1728, 1917.0922851563, -2072.8369140625, 440.16864013672, 0, 0, 326.25524902344);
- CreateObject(1729, 1914.0709228516, -2076.2905273438, 440.17614746094, 0, 0, 85.3544921875);
- CreateObject(2346, 1919.3681640625, -2076.4436035156, 440.17614746094, 0, 0, 248.8408203125);
- CreateObject(2673, 1918.7795410156, -2075.2626953125, 440.25646972656, 0, 0, 0);
- CreateObject(2677, 1913.7084960938, -2073.3720703125, 440.44064331055, 0, 0, 0);
- CreateObject(2860, 1912.5043945313, -2072.849609375, 440.6432800293, 0, 0, 39.699768066406);
- CreateObject(2857, 1916.2197265625, -2075.8957519531, 440.16864013672, 0, 0, 0);
- CreateObject(2840, 1913.1174316406, -2076.1069335938, 440.17614746094, 0, 0, 0);
- CreateObject(2675, 1916.0953369141, -2074.0703125, 440.23291015625, 0, 0, 344.1201171875);
- CreateObject(1829, 1922.8729248047, -2076.8361816406, 440.63317871094, 0, 0, 0);
- CreateObject(2100, 1925.8868408203, -2080.0874023438, 440.17614746094, 0, 0, 268.69067382813);
- CreateObject(14861, 1924.9477539063, -2077.3901367188, 440.62316894531, 0, 0, 358.01501464844);
- CreateObject(11102, 1928.4118652344, -2084.7258300781, 442.33392333984, 0, 0, 358.01501464844);
- CreateObject(14638, 1928.1791992188, -2085.0832519531, 440.19650268555, 0, 0, 0);
- CreateObject(2232, 1917.5754394531, -2077.4716796875, 440.76651000977, 0, 0, 238.91589355469);
- CreateObject(2232, 1916.5341796875, -2072.2421875, 440.76651000977, 0, 0, 304.41870117188);
- return 1;
- }
- public OnGameModeExit()
- {
- /*==============================================================================Server Dos*/
- print("\n--------------------------------------------------");
- print(" GangWar 1.0.3c by Francesco_Ronaldo / The_Blade");
- print(" Non caricata!");
- print("--------------------------------------------------\n");
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- /*==========================================================================Messaggio Iniziale*/
- new ora, minuti;
- gettime(ora, minuti);
- SetPlayerTime(playerid, ora, minuti);
- SetTimerEx("Telecamera", 100, false, "d", playerid);
- GetPlayerIp(playerid, Ip, 16);
- new nome[24];
- GetPlayerName(playerid, nome, 24);
- SendClientMessage(playerid, COLORE_GROOVE, "__________________________{FFFFFF}__________________________{FF4444}__________________________");
- SendClientMessage(playerid, COLORE_ERRORE, "");
- 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);
- SendClientMessage(playerid, COLORE_TRIADE, stringa);
- SendClientMessage(playerid, COLORE_TRIADE, "Gamemode scriptata interamente da {FFFF00}Francesco_Ronaldo{FFFFFF}:");
- format(stringa, sizeof stringa, "Numero di righe: {FFFF00}%d{FFFFFF} Aggiornamento: {FFFF00}%s{FFFFFF} Versione: {FFFF00}%s{FFFFFF}", righe, aggiornamento, versione);
- SendClientMessage(playerid, COLORE_TRIADE, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "__________________________{FFFFFF}__________________________{FF4444}__________________________");
- PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~r~Benvenuto!", 6000, 1);
- //Bools
- Votato[playerid] = false;
- Rapinatore[playerid] = false;
- AFK[playerid] = false;
- PostoDiBlocco[playerid] = false;
- /*==========================================================================Icone*/
- SetPlayerMapIcon(playerid, 1, 1836.0126, -1683.2328, 13.3657, 49, 0, MAPICON_LOCAL); //Discoteca
- SetPlayerMapIcon(playerid, 2, 1199.4087, -919.3823, 43.1128, 10, 0, MAPICON_LOCAL); //BurgerShot
- SetPlayerMapIcon(playerid, 3, 2104.8066, -1806.3562, 13.5547, 29, 0, MAPICON_LOCAL); //Pizzeria
- SetPlayerMapIcon(playerid, 4, 2244.4541, -1664.9598, 15.4766, 45, 0, MAPICON_LOCAL); //Binco
- SetPlayerMapIcon(playerid, 5, 499.8427, -1360.2126, 16.3287, 45, 0, MAPICON_LOCAL); //ProLaps
- SetPlayerMapIcon(playerid, 6, 1657.8302, -1395.7705, 13.5469, 52, 0, MAPICON_LOCAL); //Banca
- SetPlayerMapIcon(playerid, 7, 1367.1731, -1279.3574, 13.5469, 6, 0, MAPICON_LOCAL); //Ammunation
- SetPlayerMapIcon(playerid, 8, 2459.4397, -1690.9667, 13.5455, 62, 0, MAPICON_LOCAL); //Base Groove 1 (ryder)
- SetPlayerMapIcon(playerid, 9, 2495.2207, -1690.6324, 14.7656, 62, 0, MAPICON_LOCAL); //Base Groove 2 (cj)
- SetPlayerMapIcon(playerid, 10, 2000.1630, -1114.9568, 27.1250, 59, 0, MAPICON_LOCAL); //Base Ballas
- SetPlayerMapIcon(playerid, 11, 2352.0879, -1170.2889, 28.0564, 60, 0, MAPICON_LOCAL); //Base Vagos
- SetPlayerMapIcon(playerid, 12, 1554.5031, -1675.5303, 16.1953, 30, 0, MAPICON_LOCAL); //Stazione Polizia
- SetPlayerMapIcon(playerid, 13, 962.0483, -1824.2063, 13.3268, 60, 0, MAPICON_LOCAL); //Base Bikers
- SetPlayerMapIcon(playerid, 14, 363.9694, -1601.4688, 31.9817, 44, 0, MAPICON_LOCAL); //Base Triade
- SetPlayerMapIcon(playerid, 15, 1935.0416, -2081.3706, 13.5622, 58, 0, MAPICON_LOCAL); //Base Atzecas
- SetPlayerMapIcon(playerid, 16, 780.9424, -1363.6980, 13.5365, 51, 0, MAPICON_LOCAL); //Lavoro Camionista
- SetPlayerMapIcon(playerid, 17, 1477.8528, -1756.7296, 17.5313, 56, 0, MAPICON_LOCAL); //Comune
- SetPlayerMapIcon(playerid, 18, 2097.7898, -1812.9028, 13.3828, 51, 0, MAPICON_LOCAL); //Lavoro pizzaboy
- SetPlayerMapIcon(playerid, 19, 1212.7352, -877.1066, 42.4861, 51, 0, MAPICON_LOCAL); //Lavoro Hotdog
- /*==========================================================================GangZones*/
- GangZoneShowForPlayer(playerid, ZonaGroove, 0x33AA3399);
- GangZoneShowForPlayer(playerid, ZonaBallas, 0x800080AA);
- GangZoneShowForPlayer(playerid, ZonaVagos, 0xFFFF0099);
- GangZoneShowForPlayer(playerid, ZonaAtzecas, 0x00BFFFAA);
- GangZoneShowForPlayer(playerid, ZonaBikers, 0xF9780499);
- GangZoneShowForPlayer(playerid, ZonaTriade, 0xFFFFFFAA);
- /*==========================================================================File Dini*/
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- if(!fexist(pFile))
- {
- GetPlayerName(playerid, nome, 24);
- 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);
- ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è arrivato per la prima volta a Los Santos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- }
- else if(fexist(pFile))
- {
- //Se è stato bannato precedentemente
- if(dini_Int(pFile, "Bannato") == 1)
- {
- PlayerInfo[playerid][Bannato] = 1;
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Bannato in precedenza{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato kickato. Motivo: {33AA33}Bannato in precedenza{FFFFFF}.");
- Kick(playerid);
- }
- GetPlayerName(playerid, nome, 24);
- 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);
- ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è rientrato a Los Santos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- SalvaAccount(playerid);
- Avvisi[playerid] = 0;
- if(Rapinatore[playerid] == true) Rapinatore[playerid] = false; RapinaAttiva = false;
- if(PostoDiBlocco[playerid] == true) DestroyObject(Blocco[playerid]);
- Votato[playerid] = false;
- new nome[24];
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito da Los Santos.", nome); //Messaggio a tutti
- SendClientMessageToAll(BLU_CHIARO, stringa);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
- /*==========================================================================Respawn dopo la morte*/
- if(Morto[playerid] == true)
- {
- if(GetPlayerTeam(playerid) == Groove)
- {
- SetPlayerInterior(playerid, 0);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid, 5, 1);
- GivePlayerWeapon(playerid, 28, 400);
- GivePlayerWeapon(playerid, 25, 500);
- SetPlayerSkin(playerid, Skin);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2496.1279, -1683.8066, 13.3645);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Ballas)
- {
- SetPlayerInterior(playerid, 0);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 32, 450);
- GivePlayerWeapon(playerid, 22, 400);
- SetPlayerSkin(playerid, Skin);
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Vagos)
- {
- SetPlayerInterior(playerid, 0);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid, 6, 1);
- GivePlayerWeapon(playerid, 26, 400);
- GivePlayerWeapon(playerid, 28, 450);
- SetPlayerSkin(playerid, Skin);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2323.1489, -1192.1659, 27.9693);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Atzecas)
- {
- SetPlayerInterior(playerid, 0);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid, 7, 1);
- GivePlayerWeapon(playerid, 32, 450);
- GivePlayerWeapon(playerid, 33, 400);
- TogglePlayerControllable(playerid, 1);
- SetPlayerSkin(playerid, Skin);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1931.7733, -2110.7942, 13.6953);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Triade)
- {
- SetPlayerInterior(playerid, 0);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 24, 400);
- GivePlayerWeapon(playerid, 28, 500);
- SetPlayerSkin(playerid, Skin);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 327.4093, -1515.8767, 36.0391);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Bikers)
- {
- SetPlayerInterior(playerid, 0);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 30, 350);
- GivePlayerWeapon(playerid, 25, 500);
- SetPlayerSkin(playerid, Skin);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 973.5109, -1829.7964, 13.3227);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Polizia)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
- SetCameraBehindPlayer(playerid);
- GivePlayerWeapon(playerid, 3, 1);
- GivePlayerWeapon(playerid, 23, 600);
- GivePlayerWeapon(playerid, 27, 600);
- SetPlayerSkin(playerid, Skin);
- SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Medici)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerSkin(playerid, Skin);
- SetCameraBehindPlayer(playerid);
- SetPlayerPos(playerid, 2029.9830, -1409.9507, 16.9989);
- Morto[playerid] = false;
- }
- if(GetPlayerTeam(playerid) == Cittadini)
- {
- SetPlayerInterior(playerid, 0);
- SetCameraBehindPlayer(playerid);
- SetPlayerSkin(playerid, Skin);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1188.4009,- 1326.9329, 13.5598);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- //Respawn Admin
- if(IsPlayerAdmin(playerid))
- {
- SetPlayerPos(playerid, 1251.1160, -816.1332, 84.1478);
- SetPlayerSkin(playerid, 217);
- }
- //Respawn Jailato
- if(Jailato[playerid] == true)
- {
- ResetPlayerWeapons(playerid);
- SetPlayerInterior(playerid, 6);//Prigione
- SetPlayerPos(playerid, 264.5743, 77.5118, 1001.0391);//Prigione
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- FadePlayerScreen(playerid, 0xAA3333FF, 8);
- SetPlayerWantedLevel(playerid, 0);
- Morto[playerid] = true;
- Skin = GetPlayerSkin(playerid);
- PlayerInfo[playerid][pDeaths]++;
- new nome[24];
- banc = GetPlayerMoney(playerid);
- ResetPlayerMoney(playerid);
- new Float: bx, Float: by, Float: bz;
- Banconota[playerid] = CreatePickup(1212, 1, bx, by, bz, 0);
- //Scores, kills, deaths
- if(killerid != INVALID_PLAYER_ID)
- {
- PlayerInfo[killerid][pKills] ++;
- SendDeathMessage(killerid, playerid, reason);
- if(GetPlayerTeam(killerid) != Polizia)
- {
- if(PlayerInfo[killerid][pKills] == 5) SetPlayerWantedLevel(killerid, 1);
- if(PlayerInfo[killerid][pKills] == 15) SetPlayerWantedLevel(killerid, 2);
- if(PlayerInfo[killerid][pKills] == 30) SetPlayerWantedLevel(killerid, 3);
- if(PlayerInfo[killerid][pKills] >= 30) SetPlayerWantedLevel(killerid, 5);
- }
- /*======================================Rapina*/
- if(Rapinatore[playerid] == true)
- {
- Rapinatore[playerid] = false;
- RapinaAttiva = false;
- KillTimer(TimerRapina);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha fallito una rapina in banca.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei stato ucciso durante una rapina e hai fallito.");
- }
- /*======================================Anticheats*/
- //Anti weapons
- if(GetPlayerWeapon(killerid) == 35 || GetPlayerWeapon(killerid) == 36 || GetPlayerWeapon(killerid) == 37 || GetPlayerWeapon(killerid) == 38)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato bannato dal Server. [Motivo: {FFFFFF}Uso di armi proibite{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato bannato. Motivo: {33AA33}Uso di armi proibite{FFFFFF}.");
- PlayerInfo[killerid][Bannato] = 1;
- Ban(killerid);
- }
- //Anti-Helikill
- if(GetPlayerVehicleID(killerid) == 548 || GetPlayerVehicleID(killerid) == 417 ||GetPlayerVehicleID(killerid) == 487 || GetPlayerVehicleID(killerid) == 488 || GetPlayerVehicleID(killerid) == 563 || GetPlayerVehicleID(killerid) == 469)
- {
- SetPlayerHealth(killerid, 0.0);
- SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato ucciso. Motivo: {33AA33}Helikill{FFFFFF}.");
- }
- }
- else if(killerid == INVALID_PLAYER_ID)
- {
- SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
- if(Rapinatore[playerid] == true)
- {
- Rapinatore[playerid] = false;
- RapinaAttiva = false;
- KillTimer(TimerRapina);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha fallito una rapina in banca.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei ucciso durante una rapina e hai fallito.");
- }
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- Acceso[vehicleid] = false;
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- /*==============================================================================Anticheats*/
- //Anti Swear
- for(new a;a < sizeof(Proibite); a++)
- if(strfind(text, Proibite[a], true) != -1)
- {
- SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La tua frase contiene uno o più caratteri volgari riconosciuti dal Server.");
- return 0;
- }
- //Anti Spam
- for(new b; b < sizeof(Spam); b++)
- if(strfind(text, Spam[b], true) != -1)
- {
- new nome[24];
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato bannato dal Server. [Motivo: {FFFFFF}Spam{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato bannato. Motivo: {33AA33}Spam{FFFFFF}.");
- PlayerInfo[playerid][Bannato] = 1;
- Ban(playerid);
- return 0;
- }
- /*==============================================================================TeamChat by Peppinux aka Peppe_Stasu*/
- if(text[0] == '#')
- {
- new nome[24];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && GetPlayerTeam(playerid) == GetPlayerTeam(i))
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "[TEAM]: %s{FFFFFF}: %s", nome, text[1]);
- SendClientMessage(i, BLU_CHIARO, stringa);
- }
- }
- return 0;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(Loggato[playerid] == false) return Kick(playerid);
- new cmd[256];
- new idx;
- new nome[24];
- new nomeid[24];
- cmd = strtok(cmdtext, idx);
- /*=======================================Kill*/
- if(!strcmp(cmdtext, "/kill", true))
- {
- if(GetPlayerWeapon(playerid) == 4)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} prende il coltello e si taglia la gola.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerHealth(playerid, 0.0);
- }
- 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)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si spara in testa.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerHealth(playerid, 0.0);
- }
- else
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si suicida con un oggetto.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerHealth(playerid, 0.0);
- }
- return 1;
- }
- /*=======================================Userpanel*/
- if(!strcmp(cmdtext, "/userpanel", true))
- {
- ShowPlayerDialog(playerid, USERPANEL, DIALOG_STYLE_LIST, "{33AA33}UserPanel:", "Cambia password\nReset Statistiche\nCancella Account\nStats", "Scegli", "Chiudi");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai aperto il Pannello di Controllo utente.");
- return 1;
- }
- /*=======================================Help*/
- if(!strcmp(cmdtext, "/help", true) || !strcmp(cmdtext, "/aiuto", true))
- {
- ShowPlayerDialog(playerid, AIUTO, DIALOG_STYLE_LIST, "{33AA33}Informazioni Server:", "Regole \nComandi \nCrediti", "Scegli", "Indietro");
- return 1;
- }
- /*=======================================Anims*/
- if(!strcmp(cmdtext, "/animazioni", true) || !strcmp(cmdtext, "/anims", true))
- {
- ShowPlayerDialog(playerid, ANIMAZIONI, DIALOG_STYLE_LIST, "{33AA33}Animazioni:", "Siediti\nBraccia incrociate\nMani in alto\nFinta morte\nInsulto", "Scegli", "Indietro");
- return 1;
- }
- if(!strcmp(cmdtext, "/stopanim", true))
- {
- if(Animazione[playerid] != true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non stai compiendo un'animazione.");
- if(Tramortito[playerid] == true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Attendi 15 secondi.");
- ClearAnimations(playerid);
- Animazione[playerid] = false;
- return 1;
- }
- /*=======================================Cambiateam*/
- if(!strcmp(cmdtext, "/cambiateam", true) || !strcmp(cmdtext, "/cambiafazione", true))
- {
- if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}500$ {FFFFFF}per pagare una penale.");
- 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");
- return 1;
- }
- /*=======================================Smettilavorare*/
- if(!strcmp(cmdtext, "/smettilavorare", true))
- {
- if(GetPlayerTeam(playerid) != Cittadini)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Cittadini{FFFFFF} possono chiedere di lavorare.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} smette di lavorare.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- if(Pizzaboy[playerid] == true) Pizzaboy[playerid] = false;
- if(LavoratoreConsegna[playerid] == true) LavoratoreConsegna[playerid] = false;
- if(VendHotDog[playerid] == true) VendHotDog[playerid] = false;
- return 1;
- }
- //*=======================================Metticasco*/
- if(!strcmp(cmdtext, "/metticasco", true))
- {
- if(dini_Int(pFile, "Casco") == 0) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai un casco.");
- if(GetPlayerTeam(playerid) == Polizia) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La polizia non può indossare il casco.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si mette il casco.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei messo il casco.");
- if(dini_Int(pFile, "Casco") == 1)
- {
- if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 2, 18645, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- }
- if(dini_Int(pFile, "Casco") == 2)
- {
- if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 2, 18977, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- }
- if(dini_Int(pFile, "Casco") == 3)
- {
- if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 2, 18978, 2, 0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
- }
- return 1;
- }
- /*=======================================Toglicasco*/
- if(!strcmp(cmdtext, "/toglicasco", true))
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, 2))
- {
- RemovePlayerAttachedObject(playerid, 2);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si toglie il casco.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei tolto il casco.");
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non indossi un casco."); }
- return 1;
- }
- /*=======================================Mettiocchiali*/
- if(!strcmp(cmdtext, "/mettiocchiali", true))
- {
- if(dini_Int(pFile, "Occhiali") == 0) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai degli occhiali.");
- if(GetPlayerTeam(playerid) == Polizia) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La polizia non può indossare gli occhiali.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si mette gli occhiali.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei messo gli occhiali.");
- if(dini_Int(pFile, "Occhiali") == 1)
- {
- if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.091779, 0.037620, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.084179, 0.035251, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.089387, 0.040297, -0.006006, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.081864, 0.047914, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.089607, 0.036717, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.079655, 0.042021, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.081930, 0.030756, 0.001523, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
- if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
- if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.097520, 0.044296, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.097408, 0.043470, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.092588, 0.049832, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.081444, 0.037602, -0.003125, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.078678, 0.037602, -0.001816, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.089214, 0.029291, -0.000784, 90.928329, 84.624763, 0.000000);
- if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.101566, 0.037019, 0.000750, 89.675476, 83.514060, 0.000000);
- if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.091887, 0.047776, -0.000040, 89.675476, 83.514060, 0.000000);
- if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 1, 19022, 2, 0.099198, 0.037362, -0.000264, 89.675476, 82.959915, 0.000000);
- }
- if(dini_Int(pFile, "Occhiali") == 2)
- {
- if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.091779, 0.037620, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.084179, 0.035251, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.089387, 0.040297, -0.006006, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.081864, 0.047914, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.089607, 0.036717, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.079655, 0.042021, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.081930, 0.030756, 0.001523, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
- if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
- if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.097520, 0.044296, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.097408, 0.043470, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.092588, 0.049832, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.081444, 0.037602, -0.003125, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.078678, 0.037602, -0.001816, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.089214, 0.029291, -0.000784, 90.928329, 84.624763, 0.000000);
- if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.101566, 0.037019, 0.000750, 89.675476, 83.514060, 0.000000);
- if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.091887, 0.047776, -0.000040, 89.675476, 83.514060, 0.000000);
- if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 1, 19023, 2, 0.099198, 0.037362, -0.000264, 89.675476, 82.959915, 0.000000);
- }
- if(dini_Int(pFile, "Occhiali") == 3)
- {
- if(GetPlayerSkin(playerid) == 105) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.091779, 0.037620, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 106) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.084179, 0.035251, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 107) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.089387, 0.040297, -0.006006, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 102) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.081864, 0.047914, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 103) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.089607, 0.036717, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 104) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.079655, 0.042021, -0.005079, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 108) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.081930, 0.030756, 0.001523, 90.928329, 78.145759, 0.000000);
- if(GetPlayerSkin(playerid) == 109) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
- if(GetPlayerSkin(playerid) == 110) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.092857, 0.043070, -0.006084, 90.928329, 85.326652, 0.000000);
- if(GetPlayerSkin(playerid) == 114) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.097520, 0.044296, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 115) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.097408, 0.043470, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 116) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.092588, 0.049832, -0.007286, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 117) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.081444, 0.037602, -0.003125, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 118) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.078678, 0.037602, -0.001816, 90.928329, 90.217376, 0.000000);
- if(GetPlayerSkin(playerid) == 120) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.089214, 0.029291, -0.000784, 90.928329, 84.624763, 0.000000);
- if(GetPlayerSkin(playerid) == 247) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.101566, 0.037019, 0.000750, 89.675476, 83.514060, 0.000000);
- if(GetPlayerSkin(playerid) == 248) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.091887, 0.047776, -0.000040, 89.675476, 83.514060, 0.000000);
- if(GetPlayerSkin(playerid) == 254) return SetPlayerAttachedObject(playerid, 1, 19034, 2, 0.099198, 0.037362, -0.000264, 89.675476, 82.959915, 0.000000);
- }
- return 1;
- }
- /*=======================================TogliOcchiali*/
- if(!strcmp(cmdtext, "/togliocchiali", true))
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1))
- {
- RemovePlayerAttachedObject(playerid, 1);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si toglie gli occhiali.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei tolto gli occhiali.");
- }
- else
- { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non indossi degli occhiali."); }
- return 1;
- }
- /*=======================================Votekick*/
- if(strcmp(cmd, "/startvoto", true) == 0)
- {
- new tmp[256];
- new id;
- if(VotekickAttivo == false)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /startvoto [playerid] [motivo]");
- id = strval(tmp);
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi votare te stesso.");
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- GetPlayerName(playerid, nome, 24);
- GetPlayerName(id, nomeid, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha avviato un votekick verso {FFFFFF}%s{00BFFF} Motivo: {FFFFFF}%s", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai avviato un votekick verso {33AA33}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- SetTimerEx("FineVoteKick", 120000, false, "d", id);
- VotekickAttivo = true;
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}C'è già un votekick in corso."); }
- return 1;
- }
- /*=======================================Vota*/
- if(!strcmp(cmdtext, "/vota", true))
- {
- if(VotekickAttivo == true)
- {
- if(Votato[playerid] == true) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Hai già votato in questo votekick.");
- VotiPlayers ++;
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha votato. (Voti: {FFFFFF}%d{00BFFF}/%d)", nome, VotiPlayers, VOTI_NECESSARI);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai votato.");
- Votato[playerid] = true;
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non c'è nessuno votekick in corso."); }
- return 1;
- }
- /*=======================================Rapina*/
- if(!strcmp(cmdtext, "/rapina", true))
- {
- if(StopRapina[playerid] == true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Attendi prima di rapinare di nuovo la banca.");
- 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.");
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono rapinare la banca.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}I poliziotti non possono rapinare la banca.");
- if(RapinaAttiva == true)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}C'è già una rapina in corso.");
- if((GetPlayerWeapon(playerid) > 18) && (GetPlayerWeapon(playerid) < 35))
- {
- RapinaAttiva = true;
- Rapinatore[playerid] = true;
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "[{00BFFF}SICUREZZA{FFFFFF}]{00BFFF}** {FFFFFF}%s{00BFFF} sta rapinando la banca.", nome);
- SendClientMessageToAll(COLORE_TRIADE, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Stai rapinando la banca.");
- TimerRapina = SetTimer("FineRapina", 600000, false);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere almeno un'arma da fuoco."); }
- return 1;
- }
- /*=======================================Afk*/
- if(!strcmp(cmdtext, "/afk", true))
- {
- if(AFK[playerid] == false)
- {
- AFK[playerid] = true;
- new Float: Px, Float: Pz, Float: Py;
- GetPlayerPos(playerid, Px, Py, Pz);
- format(stringa, sizeof(stringa), "%s: Away From Keyboard", nome);
- Afk[playerid] = Create3DTextLabel(stringa, ROSA, Px, Py, Pz+1, 30, 0);
- TogglePlayerControllable(playerid, 0);
- GetPlayerName(playerid, nome, 24);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei passato in stato AFK.");
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} entra in stato AFK.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- }
- else
- {
- AFK[playerid] = false;
- Delete3DTextLabel(Afk[playerid]);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} esce dallo stato AFK.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito dallo stato AFK.");
- TogglePlayerControllable(playerid, 1);
- }
- return 1;
- }
- /*=======================================Admins*/
- if(!strcmp(cmdtext, "/admins", true))
- {
- new Admins = 0;
- for (new x = 0; x < GetMaxPlayers(); x++)
- {
- if (IsPlayerConnected(x) && IsPlayerAdmin(x))
- {
- Admins ++;
- SendClientMessage(playerid, COLORE_TRIADE, "___________________[{FF66FF}Admins Online{FFFFFF}:]___________________");
- GetPlayerName(x, nome, 24);
- SendClientMessage(playerid, ROSA, nome);
- }
- }
- if(Admins == 0){ SendClientMessage(playerid, COLORE_ERRORE, "Non ci sono Admins online."); }
- return 1;
- }
- /*=======================================GPS*/
- if(!strcmp(cmdtext, "/gps", true))
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere guidatore di un veicolo per utilizzare il GPS.");
- ShowPlayerDialog(playerid, GPS, DIALOG_STYLE_LIST, "{33AA33}Gps:", "{FFFFFF}Negozio di vestiti\nBase della tua fazione\nBurger Shot\nAmmunation\nBanca", "Scegli", "Chiudi");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai acceso il GPS.");
- return 1;
- }
- /*=======================================GPS*/
- if(!strcmp(cmdtext, "/resetrespawn", true))
- {
- if(dini_Int(pFile, "AreaRespawn") == 0)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}La tua area di respawn è quella prestabilita.");
- dini_IntSet(pFile, "AreaRespawn", 0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai resettato la tua area di respawn.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} resetta la sua area di respawn.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- return 1;
- }
- /*=======================================DaiSoldi*/
- if(strcmp(cmd, "/daisoldi", true) == 0)
- {
- new tmp[256], tmp2[256];
- new id;
- new num;
- tmp = strtok(cmdtext, idx);
- tmp2= strtok(cmdtext, idx);
- num = strval (tmp2);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /daisoldi [playerid][soldi]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: px, Float: py, Float: pz;
- GetPlayerPos(id, px, py, pz);
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore.");
- GivePlayerMoney(id, num);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai dato {33AA33}%d{FFFFFF}$ a {33AA33}%s{FFFFFF}.", num, nomeid);
- SendClientMessageToAll(COLORE_GROOVE, stringa);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} dà {FFFFFF}%d{00BFFF}$ a {FFFFFF}%s{00BFFF}.", nome, nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- return 1;
- }
- /*=======================================DaiSoldi*/
- if(strcmp(cmd, "/minaccia", true) == 0)
- {
- new tmp[256], tmp2[256];
- new id;
- new num;
- tmp = strtok(cmdtext, idx);
- tmp2= strtok(cmdtext, idx);
- num = strval(tmp2);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /minaccia [playerid][soldirichiesti]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(GetPlayerTeam(playerid) == Polizia || GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi minacciare un altro giocatore.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: px, Float: py, Float: pz;
- GetPlayerPos(id, px, py, pz);
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da minacciare.");
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai minacciato {33AA33}%s{FFFFFF} chiedendogli {33AA33}%d{FFFFFF}$.", nomeid, num);
- SendClientMessageToAll(COLORE_GROOVE, stringa);
- new Float: x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} minaccia {FFFFFF}%s{00BFFF}.", nome, nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- format(stringa, sizeof(stringa), "* %s{FFFFFF} ti ha minacciato, chiedendoti {33AA33}%d{FFFFFF}$.", nome, num);
- SendClientMessage(id, COLORE_GROOVE, stringa);
- return 1;
- }
- /*=======================================Tramortisce*/
- if(strcmp(cmd, "/tramortisci", true) == 0)
- {
- new tmp[256];
- new id;
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /tramortisci [playerid][soldirichiesti]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(GetPlayerTeam(playerid) == Polizia || GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi tramortire un altro giocatore.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: px, Float: py, Float: pz;
- GetPlayerPos(id, px, py, pz);
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da tramortite.");
- ApplyAnimation(id, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 1);
- Tramortito[id] = true;
- SetPlayerWantedLevel(playerid, 1);
- SetTimerEx("StopTramortito", 15000, false, "d", id);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai tramortito {33AA33}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- new Float: x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} tramortisce {FFFFFF}%s{00BFFF}.", nome, nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- format(stringa, sizeof(stringa), "* %s{FFFFFF} ti ha tramortito.", nome);
- SendClientMessage(id, COLORE_GROOVE, stringa);
- return 1;
- }
- /*=======================================Ruba*/
- if(strcmp(cmd, "/deruba", true) == 0)
- {
- new tmp[256];
- new id;
- tmp = strtok(cmdtext, idx);
- if(GetPlayerTeam(playerid) == Medici || GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi derubare un altro utente.");
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /deruba [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: px, Float: py, Float: pz;
- GetPlayerPos(id, px, py, pz);
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da derubare.");
- GivePlayerMoney(playerid, GetPlayerMoney(id));
- ResetPlayerMoney(id);
- SetPlayerWantedLevel(playerid, 1);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- new Float: x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} deruba {FFFFFF}%s{00BFFF}.", nome, nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai derubato {33AA33}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- format(stringa, sizeof(stringa), "* {FFFFFF}Sei stato derubato da {33AA33}%s{FFFFFF}.", nome);
- SendClientMessage(id, COLORE_GROOVE, stringa);
- return 1;
- }
- /*=======================================Freccia DX*/
- if(!strcmp(cmdtext, "/frecciadx", true))
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere guidatore di un veicolo per utilizzare le frecce.");
- new Float: x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} mette la freccia a destra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- GameTextForPlayer(playerid, "~>~", 3000, 4);
- return 1;
- }
- /*=======================================Freccia SX*/
- if(!strcmp(cmdtext, "/frecciasx", true))
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere guidatore di un veicolo per utilizzare le frecce.");
- new Float: x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} mette la freccia a sinistra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- GameTextForPlayer(playerid, "~<~", 3000, 4);
- return 1;
- }
- /*==============================================================================Comandi Medici
- =======================================Cura*/
- if(strcmp(cmd, "/cura", true) == 0)
- {
- new tmp[256];
- new id;
- tmp = strtok(cmdtext, idx);
- if(GetPlayerTeam(playerid) != Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i Medici possono usare questo comando.");
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /cura [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: px, Float: py, Float: pz;
- GetPlayerPos(id, px, py, pz);
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da curare.");
- SetPlayerHealth(id, 100);
- GivePlayerMoney(id, -200);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- new Float: x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** Il medico {FFFFFF}%s{00BFFF} cura {FFFFFF}%s{00BFFF}.", nome, nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai curato {33AA33}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- SendClientMessage(id, COLORE_GROOVE, "* {FFFFFF}Sei stato curato da un medico e hai pagato 200$.");
- return 1;
- }
- /*==============================================================================Comandi Polizia*/
- /*=======================================Posto di Blocco*/
- if(!strcmp(cmdtext, "/postoblocco", true))
- {
- if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
- new Float: x, Float: y, Float: z, Float: angle;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- if(PostoDiBlocco[playerid] == false)
- {
- PostoDiBlocco[playerid] = true;
- Blocco[playerid] = CreateObject(981, x, y, z, 0.0, 0.0, angle);
- SetPlayerPos(playerid, x, y, z+4);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai creato un posto di blocco.");
- }
- else
- {
- PostoDiBlocco[playerid] = false;
- DestroyObject(Blocco[playerid]);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai smantellato un posto di blocco.");
- }
- return 1;
- }
- /*=======================================Arresta*/
- if(strcmp(cmd, "/arresta", true) == 0)
- {
- new tmp[256];
- new id;
- tmp = strtok(cmdtext, idx);
- if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /arresta [playerid] [Motivo]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(GetPlayerTeam(id) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi arrestare un poliziotto.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- if(GetPlayerWantedLevel(id) < 1) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Il giocatore non è ricercato.");
- Jailato[id] = true;
- ResetPlayerWeapons(id);
- new Float: px, Float: py, Float: pz;
- GetPlayerPos(id, px, py, pz);
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, px, py, pz)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi essere vicino al giocatore da arrestare.");
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} arresta {FFFFFF}%s{00BFFF}.", nome, nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai arrestato {33AA33}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- SetPlayerInterior(id, 6);//Prigione
- SetPlayerPos(id, 264.5743, 77.5118, 1001.0391);//Prigione
- SetTimerEx("EsciPrigione", 600000, false, "d", id);
- return 1;
- }
- /*=======================================Cmdpolizia*/
- if(!strcmp(cmdtext, "/cmdpolizia", true))
- {
- if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
- ShowPlayerDialog(playerid, CMDPOLIZIA, DIALOG_STYLE_MSGBOX, "{33AA33}Comandi Polizia:", "/postoblocco /arresta /emergenza", "Indietro", "");
- return 1;
- }
- /*=======================================Emergenza*/
- if(!strcmp(cmdtext, "/emergenza", true))
- {
- if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la Polizia può usare questo comando.");
- ShowPlayerDialog(playerid, EMERGENZA, DIALOG_STYLE_INPUT, "{33AA33}Radio:", "{FFFFFF}Inserisci il messaggio da inviare alla centrale, specificando dove ti trovi.", "Invia", "Chiudi");
- return 1;
- }
- /*==============================================================================Admin*/
- /*=======================================Servizio*/
- if(!strcmp(cmdtext, "/aduty", true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1251.1160, -816.1332, 84.1478);
- SetPlayerSkin(playerid, 217);
- SetPlayerTeam(playerid, 0);
- SetPlayerColor(playerid, COLORE_ERRORE);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}è entrato in servizio.", nome);
- SendClientMessageToAll(ROSA, stringa);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei entrato in servizio.");
- return 1;
- }
- /*=======================================Base*/
- if(!strcmp(cmdtext, "/base", true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1251.1160, -816.1332, 84.1478);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Ti sei teletrasportato alla base.");
- return 1;
- }
- /*=======================================ClearChat*/
- if(!strcmp(cmdtext, "/clearchat", true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- for(new i=0; i < 50; i++)
- {
- SendClientMessageToAll(COLORE_ERRORE, " ");
- }
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha ripulito la chat. Motivo: {FF66FF}%s ", nome, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Hai ripulito la chat.");
- return 1;
- }
- /*=======================================Comandi*/
- if(!strcmp(cmdtext, "/cmdadmin", true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- 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", "");
- return 1;
- }
- /*=======================================GodMode*/
- if(!strcmp(cmdtext, "/godmode", true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- SetPlayerHealth(playerid, 100000);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha attivato la god-mode su se stesso.", nome);
- SendClientMessageToAll(ROSA, stringa);
- return 1;
- }
- /*=======================================Resetarmi*/
- if(strcmp(cmd, "/resetarmi", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /resetarmi [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- ResetPlayerWeapons(id);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- 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]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai resettato le armi a {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Cura*/
- if(strcmp(cmd, "/heal", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /cura [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- SetPlayerHealth(id, 100);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha curato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai curato {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================ResetSoldi*/
- if(strcmp(cmd, "/resetsoldi", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /resetsoldi [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- SetPlayerHealth(id, 100);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- 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]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai resettato i soldi a {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Goto*/
- if(strcmp(cmd, "/goto", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /goto [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: Px, Float: Pz, Float: Py;
- SetPlayerInterior(playerid, GetPlayerInterior(id));
- GetPlayerPos(id, Px, Py, Pz);
- SetPlayerPos(playerid, Px+1, Py, Pz);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}si è teletrasportato da {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Ti sei teletrasportato da {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================GetThere*/
- if(strcmp(cmd, "/getthere", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /getthere [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: Px, Float: Pz, Float: Py;
- GetPlayerPos(playerid, Px, Py, Pz);
- SetPlayerPos(id, Px+1, Py, Pz);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha teletrasportato a se {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai teletrasportato a te {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Freeze*/
- if(strcmp(cmd, "/freeze", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /freeze [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- TogglePlayerControllable(id, 0);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha freezato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai freezato {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Sfreeze*/
- if(strcmp(cmd, "/sfreeze", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /sfreeze [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- TogglePlayerControllable(id, 1);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha sfreezato {FF66FF}%s{FFFFFF}", nome, nomeid);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai sfreezato {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Spectate*/
- if(strcmp(cmd, "/spectate", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /spectate [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- PlayerSpectatePlayer(playerid, id);
- GetPlayerName(id, nomeid, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Stai spectando {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================StopSpectate*/
- if(strcmp(cmd, "/stopspectate", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- TogglePlayerSpectating(playerid, 0);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Non stai più osservando nessun player.");
- return 1;
- }
- /*=======================================Uccidi*/
- if(strcmp(cmd, "/uccidi", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /uccidi [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- SetPlayerHealth(id, 0.0);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha ucciso {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai ucciso {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Uccidi*/
- if(strcmp(cmd, "/armatura", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /uccidi [playerid]");
- id = strval(tmp);
- if(!IsPlayerConnected(id))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- SetPlayerArmour(id, 100);
- SetPlayerAttachedObject(id, 3, 1242, 1, 0.019999, 0.039999, 0.000000, 2.459999, 89.699989, -3.100000, 1.710000, 2.119999, 1.719999);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha dato armatura a {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s ", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai dato armatura a {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Kick*/
- if(strcmp(cmd, "/kick", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /kick [playerid] [motivo]");
- id = strval(tmp);
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha kickato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s{FFFFFF}.", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai kickato {FF66FF}%s{FFFFFF}.", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- Kick(id);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Ban*/
- if(strcmp(cmd, "/ban", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /ban [playerid] [motivo]");
- id = strval(tmp);
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha bannato {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s{FFFFFF}.", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai bannato {FF66FF}%s{FFFFFF}", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- PlayerInfo[id][Bannato] = 1;
- Ban(id);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- /*=======================================Kickall*/
- if(!strcmp(cmdtext, "/kickall", true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && i != playerid)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha kickato tutti i giocatori. Motivo: {FF66FF}%s", nome, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- Kick(i);
- }
- }
- return 1;
- }
- /*=======================================BanAll*/
- if(!strcmp(cmdtext, "/banall", true))
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli Admin possono usare questo comando.");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && i != playerid)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha bannato tutti i giocatori. Motivo: {FF66FF}%s", nome, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- PlayerInfo[i][Bannato] = 1;
- Ban(i);
- }
- }
- return 1;
- }
- /*=======================================Explode*/
- if(strcmp(cmd, "/explode", true) == 0)
- {
- new tmp[256];
- new id;
- if(IsPlayerAdmin(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Utilizza /explode [playerid] [motivo]");
- id = strval(tmp);
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Giocatore non connesso.");
- if(id == playerid) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non puoi eseguire questo comando su te stesso.");
- new Float: Px, Float: Pz, Float: Py;
- GetPlayerPos(id, Px, Py, Pz);
- CreateExplosion(Px, Py, Pz, 10, 100);
- CreateExplosion(Px, Py, Pz, 10, 100);
- GetPlayerName(id, nomeid, 24);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}L'Admin {FF66FF}%s {FFFFFF}ha fatto esplodere {FF66FF}%s{FFFFFF} Motivo: {FF66FF}%s", nome, nomeid, cmdtext[idx]);
- SendClientMessageToAll(ROSA, stringa);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Hai fatto esplodere {FF66FF}%s{FFFFFF}", nomeid);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else { SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Admin {FFFFFF}possono usare questo comando."); }
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- //Lavoro consegna
- if(vehicleid == veicoloconsegna1 || vehicleid == veicoloconsegna2 || vehicleid == veicoloconsegna3 || vehicleid == veicoloconsegna4 || vehicleid == veicoloconsegna5 || vehicleid == veicoloconsegna6 || vehicleid == veicoloconsegna7)
- {
- DisablePlayerCheckpoint(playerid);
- }
- //Lavoro Pizzaboy
- if(vehicleid == pizzaboy1 || vehicleid == pizzaboy2 || vehicleid == pizzaboy3 || vehicleid == pizzaboy4 || vehicleid == pizzaboy5 || vehicleid == pizzaboy6 || vehicleid == pizzaboy7)
- {
- DisablePlayerCheckpoint(playerid);
- }
- //Lavoro Venditore HotDog
- if(vehicleid == hotdog1 || vehicleid == hotdog2 || vehicleid == hotdog3 || vehicleid == hotdog4)
- {
- DisablePlayerCheckpoint(playerid);
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- new nome[24];
- if(newstate == PLAYER_STATE_DRIVER)
- {
- /*=====================================Veicoli Admin privati*/
- if(vehicleid == eli_admin1 || vehicleid == auto_admin1 || vehicleid == auto_admin2 || vehicleid == moto_admin1)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "*** {FFFFFF}Benvenuto in questo veicolo, Admin {FF4444}%s.", nome);
- SendClientMessage(playerid, ROSA, stringa);
- }
- else {RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}solo gli {FF4444}Admin{FFFFFF} possono entrare in questo veicolo.");}
- }
- /*=====================================Veicoli lavoro consegna*/
- if(vehicleid == veicoloconsegna1 || vehicleid == veicoloconsegna2 || vehicleid == veicoloconsegna3 || vehicleid == veicoloconsegna4 || vehicleid == veicoloconsegna5 || vehicleid == veicoloconsegna6 || vehicleid == veicoloconsegna7)
- {
- if(LavoratoreConsegna[playerid] != true) RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai le chiavi di questo veicolo.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai iniziato a lavorare, porta il carico a destinazione seguendo i checkpoints. Per annullare l'incarico, esci dal veicolo.");
- SetPlayerCheckpoint(playerid, 717.7769, -1401.1205, 12.9404, 5.0);
- }
- /*=====================================Veicoli lavoro pizzaboy*/
- if(vehicleid == pizzaboy1 || vehicleid == pizzaboy2 || vehicleid == pizzaboy3 || vehicleid == pizzaboy4 || vehicleid == pizzaboy5 || vehicleid == pizzaboy6 || vehicleid == pizzaboy7)
- {
- if(Pizzaboy[playerid] != true) RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai le chiavi di questo veicolo.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai iniziato a lavorare, porta le pizze alle case seguendo i checkpoints. Per annullare l'incarico, esci dal veicolo.");
- SetPlayerCheckpoint(playerid, 2090.5012, -1762.7268, 12.9697, 5.0);
- }
- /*=====================================Veicoli lavoro hotdog*/
- if(vehicleid == hotdog1 || vehicleid == hotdog2 || vehicleid == hotdog3 || vehicleid == hotdog4)
- {
- if(VendHotDog[playerid] != true) RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Non hai le chiavi di questo veicolo.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai iniziato a lavorare, porta gli hotdog seguendo i checkpoints. Per annullare l'incarico, esci dal veicolo.");
- SetPlayerCheckpoint(playerid, 1197.5222, -945.8870, 42.2574, 5.0);
- }
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- /*=====================================GPS*/
- 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))
- {
- GameTextForPlayer(playerid, "~y~Meta GPS raggiunta!", 3000, 4);
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- DisablePlayerCheckpoint(playerid);
- }
- 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))
- {
- GameTextForPlayer(playerid, "~y~Meta GPS raggiunta!", 3000, 4);
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- DisablePlayerCheckpoint(playerid);
- }
- 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))
- {
- GameTextForPlayer(playerid, "~y~Meta GPS raggiunta!", 3000, 4);
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- DisablePlayerCheckpoint(playerid);
- }
- /*=====================================Lavoro Consegna*/
- if(LavoratoreConsegna[playerid] == true)
- {
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 717.7769, -1401.1205, 12.9404))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 631.4457, -1314.6154, 13.1527, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 631.4457, -1314.6154, 13.1527))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 685.0699, -1164.3223, 14.7883, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 685.0699, -1164.3223, 14.7883))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 792.1463, -1049.9283, 24.2532, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 792.1463, -1049.9283, 24.2532))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 795.8797, -1048.2489, 24.5434, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 795.8797, -1048.2489, 24.5434))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 960.8597, -979.5512, 38.5668, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 960.8597, -979.5512, 38.5668))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1018.9778, -1040.4060, 31.2240, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1018.9778, -1040.4060, 31.2240))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1160.6720, -1040.4868, 31.4298, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1160.6720, -1040.4868, 31.4298))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1171.3936, -1146.5953, 23.3643, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1171.3936, -1146.5953, 23.3643))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1319.7435, -1148.4357, 23.3610, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1319.7435, -1148.4357, 23.3610))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1319.7435, -1148.4357, 23.3610, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1319.7435, -1148.4357, 23.3610))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1479.0820, -1140.1831, 23.6128, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1479.0820, -1140.1831, 23.6128))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 764.1746, -1349.9253, 13.5160, 5.0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Incarico completato. Riporta il veicolo nel checkpoint per terminare.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 764.1746, -1349.9253, 13.5160))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~y~Lavoro completato!", 3000, 4);
- GivePlayerMoney(playerid, 300);
- }
- }
- if(Pizzaboy[playerid] == true)
- {
- /*=====================================Lavoro Pizzaboy*/
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2090.5012, -1762.7268, 12.9697))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2085.7749, -1725.8237, 12.9536, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2085.7749, -1725.8237, 12.9536))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2011.9045, -1670.1033, 12.9267, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2011.9045, -1670.1033, 12.9267))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2009.7294, -1656.9786, 13.1177, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2009.7294, -1656.9786, 13.1177))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2009.5795, -1641.6029, 13.1022, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2009.5795, -1641.6029, 13.1022))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1910.5032, -1604.9689, 13.1170, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1910.5032, -1604.9689, 13.1170))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1865.0052, -1604.6249, 13.1137, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1865.0052, -1604.6249, 13.1137))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1840.4406, -1511.7986, 12.9114, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1840.4406, -1511.7986, 12.9114))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1756.5543, -1450.8396, 13.1174, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1756.5543, -1450.8396, 13.1174))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1713.6444, -1308.1168, 12.9578, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1713.6444, -1308.1168, 12.9578))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1802.4146, -1257.3538, 13.2033, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1802.4146, -1257.3538, 13.2033))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1892.2423, -1049.0839, 23.4054, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1892.2423, -1049.0839, 23.4054))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1937.2775, -1051.0919, 23.6763, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1937.2775, -1051.0919, 23.6763))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2019.4218, -1057.1331, 24.2048, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2019.4218, -1057.1331, 24.2048))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2049.9202, -1088.7666, 24.3123, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2049.9202, -1088.7666, 24.3123))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2078.2876, -1119.2366, 23.8088, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2078.2876, -1119.2366, 23.8088))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2136.2188, -1407.5031, 23.5628, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2136.2188, -1407.5031, 23.5628))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2135.5522, -1431.6008, 23.5327, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2135.5522, -1431.6008, 23.5327))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2111.9895, -1666.5313, 13.7396, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2111.9895, -1666.5313, 13.7396))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 2093.8630, -1794.3344, 12.9614, 5.0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Incarico completato. Riporta il veicolo nel checkpoint per terminare.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 2093.8630, -1794.3344, 12.9614))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~y~Lavoro completato!", 3000, 4);
- GivePlayerMoney(playerid, 500);
- }
- }
- /*=====================================Lavoro hotdog*/
- if(VendHotDog[playerid] == true)
- {
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1197.5222, -945.8870, 42.2574))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1162.6039, -1033.5615, 31.5724, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1162.6039, -1033.5615, 31.5724))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1203.3802, -1144.8864, 23.1528, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1203.3802, -1144.8864, 23.1528))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1211.2742, -1379.9830, 13.0196, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1211.2742, -1379.9830, 13.0196))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1105.5205, -1408.6232, 13.0052, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1105.5205, -1408.6232, 13.0052))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 941.7152, -1392.9265, 12.7559, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 941.7152, -1392.9265, 12.7559))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 814.8148, -1393.2880, 12.9743, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 814.8148, -1393.2880, 12.9743))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 791.5134, -1261.3954, 13.1843, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 791.5134, -1261.3954, 13.1843))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 875.4116, -1148.8075, 23.3391, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 875.4116, -1148.8075, 23.3391))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1046.5488, -1139.0198, 23.1905, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1046.5488, -1139.0198, 23.1905))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1167.7229, -1100.4186, 24.7236, 5.0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1167.7229, -1100.4186, 24.7236))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(playerid, 1207.0366, -878.4235, 42.5009, 5.0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Incarico completato. Riporta il veicolo nel checkpoint per terminare.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 6.0, 1167.7229, -1100.4186, 24.7236))
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~y~Lavoro completato!", 3000, 4);
- GivePlayerMoney(playerid, 400);
- }
- //Check Arriva al Lavoro
- 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))
- {
- DisablePlayerCheckpoint(playerid);
- }
- }
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- //Entra interiors
- 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)
- {
- GameTextForPlayer(playerid, "~y~Premi il tasto sprint per entrare", 3000, 4);
- }
- //Interagisci
- 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)
- {
- GameTextForPlayer(playerid, "~y~Premi il tasto sprint per interagire", 3000, 4);
- }
- //Soldi
- if(pickupid == Banconota[playerid])
- {
- GivePlayerMoney(playerid, banc);
- new nome[24];
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} raccoglie {FFFFFF}%d{00BFFF}$ da terra.", nome, banc);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- }
- //Lavori
- if(pickupid == HotD)
- {
- if(VendHotDog[playerid] == true) GameTextForPlayer(playerid, "~y~Sali sui veicoli per lavorare", 3000, 4);
- else GameTextForPlayer(playerid, "~y~Chiedi il permesso di lavoro al Comune", 3000, 4);
- }
- if(pickupid == Camionisti)
- {
- if(LavoratoreConsegna[playerid] == true) GameTextForPlayer(playerid, "~y~Sali sui veicoli per lavorare", 3000, 4);
- else GameTextForPlayer(playerid, "~y~Chiedi il permesso di lavoro al Comune", 3000, 4);
- }
- if(pickupid == PizzaB)
- {
- if(Pizzaboy[playerid] == true) GameTextForPlayer(playerid, "~y~Sali sui veicoli per lavorare", 3000, 4);
- else GameTextForPlayer(playerid, "~y~Chiedi il permesso di lavoro al Comune", 3000, 4);
- }
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new nome[24];
- /*==============================================================================Tasti entrare interiors*/
- if((newkeys & KEY_SPRINT))
- {
- //Discoteca
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1836.0126, -1683.2328, 13.3657))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 17);
- SetPlayerPos(playerid, 493.5265, -23.6006, 1000.6797);
- SetPlayerFacingAngle(playerid, 350.0625);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //BurgerShot
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1199.4087, -919.3823, 43.1128))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 10);
- SetPlayerPos(playerid, 364.0989, -74.2291, 1001.5078);
- SetPlayerFacingAngle(playerid, 310.9424);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Pizzeria
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2104.8066, -1806.3562, 13.5547))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 5);
- SetPlayerPos(playerid, 372.1908, -132.6964, 1001.4922);
- SetPlayerFacingAngle(playerid, 6.9067);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Binco
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2244.4541, -1664.9598, 15.4766))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 15);
- SetPlayerPos(playerid, 208.0200, -110.1315, 1005.1328);
- SetPlayerFacingAngle(playerid, 3.3203);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //ProLaps
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 499.8427, -1360.2126, 16.3287))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 206.8816, -139.1696, 1003.5078);
- SetPlayerFacingAngle(playerid, 356.1557);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Banca di Stato
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1657.8302, -1395.7705, 13.5469))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerPos(playerid, 2306.0256, -16.2414, 26.7496);
- SetPlayerFacingAngle(playerid, 286.2411);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Ammunation
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1367.1731, -1279.3574, 13.5469))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 7);
- SetPlayerPos(playerid, 315.4380, -142.2053, 999.6016);
- SetPlayerFacingAngle(playerid, 20.2511);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Stazione di polizia
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1554.5031, -1675.5303, 16.1953))
- {
- if(GetPlayerTeam(playerid) != Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo la {FF4444}polizia{FFFFFF} può entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 6);
- SetPlayerPos(playerid, 246.8360, 63.6771, 1003.6406);
- SetPlayerFacingAngle(playerid, 11.1885);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Base Groove 1 (ryder)
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2459.4397, -1690.9667, 13.5455))
- {
- if(GetPlayerTeam(playerid) != Groove)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Groove{FFFFFF} possono entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 2455.1929, -1705.1763, 1013.5078);
- SetPlayerFacingAngle(playerid, 32.6354);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Base Groove 2 (cj)
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2495.2207, -1690.6324, 14.7656))
- {
- if(GetPlayerTeam(playerid) != Groove)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Groove{FFFFFF} possono entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 2495.8367, -1693.4261, 1014.7422);
- SetPlayerFacingAngle(playerid, 181.7836);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Base Ballas
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2000.1630, -1114.9568, 27.1250))
- {
- if(GetPlayerTeam(playerid) != Ballas)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Ballas{FFFFFF} possono entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 5);
- SetPlayerPos(playerid, 318.7632, 1115.8464, 1083.8828);
- SetPlayerFacingAngle(playerid, 359.0991);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Base Vagos
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2352.0879, -1170.2889, 28.0564))
- {
- if(GetPlayerTeam(playerid) != Vagos)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Vagos{FFFFFF} possono entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 8);
- SetPlayerPos(playerid, 2807.4937, -1173.3921, 1025.5703);
- SetPlayerFacingAngle(playerid, 9.1932);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Base Bikers
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 962.0483, -1824.2063, 13.3268))
- {
- if(GetPlayerTeam(playerid) != Bikers)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Bikers{FFFFFF} possono entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerPos(playerid, 962.4126, -1819.8746, 515.8799);
- SetPlayerFacingAngle(playerid, 3.1699);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Base Triade
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 363.9694, -1601.4688, 31.9817))
- {
- if(GetPlayerTeam(playerid) != Triade)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Triade{FFFFFF} possono entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 6);
- SetPlayerPos(playerid, 774.2307, -49.1291, 1000.5859);
- SetPlayerFacingAngle(playerid, 0.3852);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Base Atzecas
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1935.0416, -2081.3706, 13.5622))
- {
- if(GetPlayerTeam(playerid) != Atzecas)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo gli {FF4444}Atzecas{FFFFFF} possono entrare.");
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerPos(playerid, 1926.0680, -2084.2607, 441.1686);
- SetPlayerFacingAngle(playerid, 90.1654);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- //Comune
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1480.6362, -1770.8400, 18.7958))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed entra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerPos(playerid, 384.808624, 173.804992, 1008.382812);
- SetPlayerInterior(playerid, 3);
- SetPlayerFacingAngle(playerid, 90.1654);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato.");
- }
- /*==============================================================================Tasti uscire interiors*/
- //Discoteca
- if(GetPlayerInterior(playerid) == 17)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 493.5561, -24.4094, 1000.6797))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1834.6368, -1682.9688, 13.4232);
- SetPlayerFacingAngle(playerid, 85.6301);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //BurgerShot
- if(GetPlayerInterior(playerid) == 10)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 363.4143, -74.8518, 1001.5078))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1199.5793, -920.3532, 43.1115);
- SetPlayerFacingAngle(playerid, 179.6778);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Pizzeria & Base Ballas
- if(GetPlayerInterior(playerid) == 5)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 372.3421, -133.2352, 1001.4922))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 2103.8457, -1806.5625, 13.5547);
- SetPlayerFacingAngle(playerid, 81.7706);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 318.5674, 1114.9526, 1083.8828))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1999.9961, -1115.4863, 27.1318);
- SetPlayerFacingAngle(playerid, 178.3041);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Banca di Stato
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2305.3340, -16.0902, 26.7422))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerPos(playerid, 1657.7428, -1397.1429, 13.5469);
- SetPlayerFacingAngle(playerid, 172.2101);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- if(Rapinatore[playerid] == true)
- {
- RapinaAttiva = false;
- Rapinatore[playerid] = false;
- KillTimer(TimerRapina);
- GetPlayerName(playerid, nome, 24);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai fallito una rapina alla banca.");
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha fallito una rapina in banca.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- }
- }
- //Ammunation
- if(GetPlayerInterior(playerid) == 7)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 315.6836, -142.7931, 999.6016))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1367.1580, -1279.4025, 13.5469);
- SetPlayerFacingAngle(playerid, 94.1985);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Base Groove 1 (ryder)
- if(GetPlayerInterior(playerid) == 2)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2455.6248, -1706.5425, 1013.5078))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 2459.6699, -1689.2321, 13.5330);
- SetPlayerFacingAngle(playerid, 347.2017);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Base Groove 2 (cj), ProLaps & Comune
- if(GetPlayerInterior(playerid) == 3)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2496.1160, -1692.2500, 1014.7422))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 2495.3174, -1689.0780, 14.2060);
- SetPlayerFacingAngle(playerid, 359.8077);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 207.0748, -140.1034, 1003.5078))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 500.2337, -1359.3263, 16.2514);
- SetPlayerFacingAngle(playerid, 320.7487);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 389.8217, 174.0705, 1008.3828))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1480.8525, -1769.4618, 18.7958);
- SetPlayerFacingAngle(playerid, 1.7449);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Binco
- if(GetPlayerInterior(playerid) == 15)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 207.8046, -111.0572, 1005.1328))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 2244.3215, -1664.1178, 15.4766);
- SetPlayerFacingAngle(playerid, 345.7501);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Polizia & Base Triade
- if(GetPlayerInterior(playerid) == 6)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.7747, 62.5972, 1003.6406))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1553.5432, -1675.3571, 16.1953);
- SetPlayerFacingAngle(playerid, 90.7525);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 774.0907, -50.1249, 1000.5859))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 364.4635, -1599.8014, 31.9585);
- SetPlayerFacingAngle(playerid, 356.3073);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Base Vagos
- if(GetPlayerInterior(playerid) == 8)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2807.5852, -1174.6793, 1025.5703))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 2352.1755, -1168.9280, 27.9894);
- SetPlayerFacingAngle(playerid, 359.7931);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- //Base Bikers
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 962.3438, -1821.0420, 515.8799))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 961.5237, -1825.3502, 13.3179);
- SetPlayerFacingAngle(playerid, 167.3347);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- //Base Atzecas
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1927.4575, -2084.3145, 441.1686))
- {
- FadePlayerScreen(playerid, 0x000000FF, 10);
- new Float:x, Float: y, Float: z;
- GetPlayerName(playerid, nome, 24);
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} apre la porta ed esce.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1936.8071, -2080.9675, 13.5614);
- SetPlayerFacingAngle(playerid, 264.7938);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei uscito.");
- }
- }
- /*==============================================================================Tasti interagire*/
- if(newkeys & KEY_SPRINT)
- {
- //Banca
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2316.1282, -10.0103, 26.7422))
- {
- ShowPlayerDialog(playerid, BANCA, DIALOG_STYLE_LIST, "{33AA33}Banca:", "{FFFFFF}Conto in banca\nPreleva\nDeposita", "Scegli", "Chiudi");
- }
- //Spacciatore 1
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2325.4238, -1252.2784, 22.5000))
- {
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- ShowPlayerDialog(playerid, COMPRADROGA, DIALOG_STYLE_LIST, "{33AA33}Spacciatore:", "{FFFFFF}Marijuana 300$\nCocaina 500$\nEroina 600$\nHashish 1000$", "Compra", "Chiudi");
- }
- //Spacciatore 2
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1394.6309, -1460.5256, 11.6406))
- {
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- ShowPlayerDialog(playerid, COMPRADROGA, DIALOG_STYLE_LIST, "{33AA33}Spacciatore:", "{FFFFFF}Marijuana 300$\nCocaina 500$\nEroina 600$\nHashish 1000$", "Compra", "Chiudi");
- }
- //Spacciatore 3
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 975.9379, -1286.6793, 13.5540))
- {
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- ShowPlayerDialog(playerid, COMPRADROGA, DIALOG_STYLE_LIST, "{33AA33}Spacciatore:", "{FFFFFF}Marijuana 300$\nCocaina 500$\nEroina 600$\nHashish 1000$", "Compra", "Chiudi");
- }
- //Pizzeria
- if(GetPlayerInterior(playerid) == 5)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 374.5851, -119.1880, 1001.4995))
- {
- 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");
- }
- }
- //Burger Shot
- if(GetPlayerInterior(playerid) == 10)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 376.7253, -67.7049, 1001.5151))
- {
- 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");
- }
- }
- //Discoteca
- if(GetPlayerInterior(playerid) == 17)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 499.4358, -20.5824, 1000.6797))
- {
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- ShowPlayerDialog(playerid, COMPRADISCO, DIALOG_STYLE_LIST, "{33AA33}Discoteca:", "{FFFFFF}Bibita 20$\nBirra 30$\nSuper Alcolico 50$\nCocktail 100$", "Compra", "Chiudi");
- }
- }
- //Binco
- if(GetPlayerInterior(playerid) == 15)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 217.3809, -98.3706, 1005.2578))
- {
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- 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");
- }
- }
- //ProLaps & comune
- if(GetPlayerInterior(playerid) == 3)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 199.5624, -127.6274, 1003.5152))
- {
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- 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");
- }
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 362.6935, 173.6410, 1008.3828))
- {
- if(GetPlayerTeam(playerid) != Cittadini)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Solo i {FF4444}Cittadini{FFFFFF} possono chiedere di lavorare.");
- ShowPlayerDialog(playerid, SCEGLILAVORO, DIALOG_STYLE_LIST, "{33AA33}Lavori:", "Camionista\nPizzaboy\nVenditore di HotDog", "Scegli", "Chiudi");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} parla con un impiegato comunale.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- }
- }
- //Ammunation
- if(GetPlayerInterior(playerid) == 7)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 308.2633, -141.1325, 999.6016))
- {
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono comprare armi.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- 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");
- }
- }
- //Area respawn
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2231.8052, -1333.4749, 23.9816))
- {
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- dini_IntSet(pFile, "AreaRespawn", 1);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- //Area respawn
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 2004.9958, -1443.7739, 13.5625))
- {
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- dini_IntSet(pFile, "AreaRespawn", 2);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- //Area respawn
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1182.2101, -1324.9923, 13.5817))
- {
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- dini_IntSet(pFile, "AreaRespawn", 3);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- //Area respawn
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 731.9648, -1275.7582, 13.5664))
- {
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- dini_IntSet(pFile, "AreaRespawn", 4);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- //Area respawn
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 153.7769, -1942.7628, 3.7734))
- {
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- dini_IntSet(pFile, "AreaRespawn", 5);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- //Area respawn
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1244.5392, -2054.8833, 59.8589))
- {
- if(IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Gli Admin non possono cambiare la loro area di respawn.");
- if(GetPlayerTeam(playerid) == Polizia)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Polizia{FFFFFF}.");
- if(GetPlayerTeam(playerid) == Medici)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Azione non disponibile per la fazione {FF4444}Medici{FFFFFF}.");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato la tua zona di respawn. Digita {33AA33}/resetrespawn {33AA33}per annullarla.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la sua area di respawn.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- dini_IntSet(pFile, "AreaRespawn", 6);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- }
- if((newkeys & KEY_FIRE))
- {
- //Accensione motore
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(Acceso[vehicleid] == false)
- {
- new engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai acceso il motore.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} accende il motore.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- Acceso[vehicleid] = true;
- }
- else
- {
- new engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai spento il motore.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} spegne il motore.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- Acceso[vehicleid] = false;
- }
- }
- }
- //Accensione Fari
- if(newkeys & KEY_ANALOG_UP)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(Luci[vehicleid] == false)
- {
- new engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai acceso i fari.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} accende i fari.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- Luci[vehicleid] = true;
- }
- else
- {
- new engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai spento i fari.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} spegne i fari.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- Luci[vehicleid] = false;
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new nome[24];
- /*==============================================================================Anticheats*/
- //Anti jetpack
- if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
- {
- if(!IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato bannato dal Server. [Motivo: {FFFFFF}Uso di jetpack{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato bannato. Motivo: {33AA33}Uso di Jetpack{FFFFFF}.");
- PlayerInfo[playerid][Bannato] = 1;
- Ban(playerid);
- }
- }
- //AntiHighping
- if(GetPlayerPing(playerid) != 65535)
- {
- if(GetPlayerPing(playerid) >= Massimoping)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Ping alto{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "[ANTICHEATS]: {FFFFFF}Sei stato kickato. Motivo: {33AA33}Ping alto{FFFFFF}.");
- Kick(playerid);
- }
- }
- /*==============================================================================Armatura*/
- new Float: Armatura;
- GetPlayerArmour(playerid, Armatura);
- if(Armatura < 1) if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new nome[24];
- /*==========================================================================Registrazione*/
- if(dialogid == REGISTER_DIALOG)
- {
- if(response)
- {
- GetPlayerName(playerid, nome, 24);
- if(!strlen(inputtext))
- {
- 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);
- ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
- return 0;
- }
- if(strfind(inputtext, "=", true) == 0)
- {
- 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);
- ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
- return 0;
- }
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- dini_Create(pFile);
- dini_Set(pFile, "Password", inputtext);
- dini_IntSet(pFile, "Soldi", 0);
- dini_IntSet(pFile, "Kills", 0);
- dini_IntSet(pFile, "Deaths", 0);
- dini_IntSet(pFile, "Bannato", 0);
- dini_IntSet(pFile, "SoldiInBanca", 0);
- dini_IntSet(pFile, "Casco", 0);
- dini_IntSet(pFile, "Maschera", 0);
- dini_IntSet(pFile, "Occhiali", 0);
- dini_IntSet(pFile, "Ricercato", 0);
- dini_IntSet(pFile, "AreaRespawn", 0);
- format(stringa,sizeof(stringa), "** {FFFFFF}%s{00BFFF} registra con successo un nuovo Account.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- 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);
- ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai creato con successo un account. Ora esegui il Login.");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- else if(!response)
- {
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Registrazione obbligatoria{FFFFFF}.");
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Registrazione obbligatoria{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- Kick(playerid);
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- }
- /*==========================================================================Login*/
- if(dialogid == LOGIN_DIALOG)
- {
- if(response)
- {
- GetPlayerName(playerid, nome, 24);
- if(!strlen(inputtext))
- {
- 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);
- ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
- return 0;
- }
- if(!strcmp(inputtext, dini_Get(pFile, "Password"), false))
- {
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- Loggato[playerid] = true;
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, dini_Int(pFile, "Soldi"));
- PlayerInfo[playerid][pKills] = dini_Int(pFile, "Kills");
- PlayerInfo[playerid][pDeaths] = dini_Int(pFile, "Deaths");
- PlayerInfo[playerid][Bannato] = dini_Int(pFile, "Bannato");
- SetPlayerWantedLevel(playerid, dini_Int(pFile, "Ricercato"));
- format(stringa, sizeof(stringa), "* {FFFFFF}Benvenuto {33AA33}%s{FFFFFF}, i tuoi dati sono stati caricati con successo. Attendi qualche secondo.", nome);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} esegue il Login con successo.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SetTimerEx("Spawn", 5000, false, "d", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- return 1;
- }
- else
- {
- 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);
- ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Login", "Chiudi");
- Avvisi[playerid] ++;
- if(Avvisi[playerid] == 3)
- {
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Tentativi Login falliti{FFFFFF}.");
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Tentativi Login falliti{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- Kick(playerid);
- }
- return 0;
- }
- }
- else if(!response)
- {
- GetPlayerName(playerid, nome, 24);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Login obbligatorio{FFFFFF}.");
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Login obbligatorio{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- Kick(playerid);
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- }
- /*==========================================================================Scelta Team*/
- if(dialogid == SCELTA_TEAM)
- {
- if(response)
- {
- GetPlayerName(playerid, nome, 24);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Digita {FF66FF}/aiuto {FFFFFF}per ambientarti nel Server.");
- //Groove
- if(listitem == 0)
- {
- new rand = random(sizeof(Rskingroove));
- SetPlayerSkin(playerid, Rskingroove[rand][0]);
- SetPlayerTeam(playerid, Groove);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte di Groove Street.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Groove Street.");
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, COLORE_GROOVE);
- GivePlayerWeapon(playerid, 5, 1);
- GivePlayerWeapon(playerid, 28, 400);
- GivePlayerWeapon(playerid, 25, 500);
- TogglePlayerControllable(playerid, 1);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2496.1279, -1683.8066, 13.3645);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- //Ballas
- if(listitem == 1)
- {
- new rand = random(sizeof(Rskinballas));
- SetPlayerSkin(playerid, Rskinballas[rand][0]);
- SetPlayerTeam(playerid, Ballas);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte dei Ballas.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Ballas.");
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, COLORE_BALLAS);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 32, 450);
- GivePlayerWeapon(playerid, 22, 400);
- TogglePlayerControllable(playerid, 1);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2000.0258, -1121.1666, 26.7448);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- //Vagos
- if(listitem == 2)
- {
- new rand = random(sizeof(Rskinvagos));
- SetPlayerSkin(playerid, Rskinvagos[rand][0]);
- SetPlayerTeam(playerid, Vagos);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte dei Vagos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Vagos.");
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, COLORE_VAGOS);
- GivePlayerWeapon(playerid, 6, 1);
- GivePlayerWeapon(playerid, 26, 400);
- GivePlayerWeapon(playerid, 28, 450);
- TogglePlayerControllable(playerid, 1);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 2323.1489, -1192.1659, 27.9693);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- //Atzecas
- if(listitem == 3)
- {
- new rand = random(sizeof(Rskinatz));
- SetPlayerSkin(playerid, Rskinatz[rand][0]);
- SetPlayerTeam(playerid, Atzecas);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte degli Atzecas.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Atzecas.");
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, COLORE_ATZECAS);
- GivePlayerWeapon(playerid, 7, 1);
- GivePlayerWeapon(playerid, 32, 450);
- GivePlayerWeapon(playerid, 33, 400);
- TogglePlayerControllable(playerid, 1);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1931.7733, -2110.7942, 13.6953);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- //Triade
- if(listitem == 4)
- {
- new rand = random(sizeof(Rskintriade));
- SetPlayerSkin(playerid, Rskintriade[rand][0]);
- SetPlayerTeam(playerid, Triade);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte della Triade.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Triade.");
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, COLORE_TRIADE);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 24, 400);
- GivePlayerWeapon(playerid, 28, 500);
- TogglePlayerControllable(playerid, 1);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 327.4093, -1515.8767, 36.0391);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- //Bikers
- if(listitem == 5)
- {
- new rand = random(sizeof(Rskinbikers));
- SetPlayerSkin(playerid, Rskinbikers[rand][0]);
- SetPlayerTeam(playerid, Bikers);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato a far parte dei Bikers.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nel team Bikers.");
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, COLORE_BIKERS);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 30, 350);
- GivePlayerWeapon(playerid, 25, 500);
- TogglePlayerControllable(playerid, 1);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 973.5109, -1829.7964, 13.3227);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- //Polizia
- if(listitem == 6)
- {
- new rand = random(sizeof(Rskinpolizia));
- SetPlayerSkin(playerid, Rskinpolizia[rand][0]);
- SetPlayerTeam(playerid, Polizia);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si è arruolato nella Polizia di Los Santos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nella Polizia di Los Santos.");
- SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, COLORE_POLIZIA);
- GivePlayerWeapon(playerid, 3, 1);
- GivePlayerWeapon(playerid, 23, 600);
- GivePlayerWeapon(playerid, 27, 600);
- TogglePlayerControllable(playerid, 1);
- }
- //Medici
- if(listitem == 7)
- {
- new rand = random(sizeof(Rskinmedici));
- SetPlayerSkin(playerid, Rskinmedici[rand][0]);
- SetPlayerTeam(playerid, Medici);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è entrato nella fazione Medici di Los Santos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Medici di Los Santos.");
- SetPlayerPos(playerid, 2029.9830, -1409.9507, 16.9989);
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, BLU_CHIARO);
- TogglePlayerControllable(playerid, 1);
- }
- if(listitem == 8)
- {
- new rand = random(sizeof(Rskincittadini));
- SetPlayerSkin(playerid, Rskincittadini[rand][0]);
- SetPlayerTeam(playerid, Cittadini);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è diventato un cittadino.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei diventato un cittadino.");
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid, GRIGIO);
- TogglePlayerControllable(playerid, 1);
- if(dini_Int(pFile, "AreaRespawn") == 0) {SetPlayerPos(playerid, 1129.2941, -1465.8682, 15.7571);}
- if(dini_Int(pFile, "AreaRespawn") == 1) {SetPlayerPos(playerid, 2231.8052, -1333.4749, 23.98169);}
- if(dini_Int(pFile, "AreaRespawn") == 2) {SetPlayerPos(playerid, 2004.9958, -1443.7739, 13.5625);}
- if(dini_Int(pFile, "AreaRespawn") == 3) {SetPlayerPos(playerid, 1182.2101, -1324.9923, 13.5817);}
- if(dini_Int(pFile, "AreaRespawn") == 4) {SetPlayerPos(playerid, 731.9648, -1275.7582, 13.5664);}
- if(dini_Int(pFile, "AreaRespawn") == 5) {SetPlayerPos(playerid, 153.7769, -1942.7628, 3.7734);}
- if(dini_Int(pFile, "AreaRespawn") == 6) {SetPlayerPos(playerid, 1244.5392, -2054.8833, 59.8589);}
- }
- }
- else if(!response)
- {
- GetPlayerName(playerid, nome, 24);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Sei stato kickato. Motivo: {FF66FF}Scelta team obbligatoria{FFFFFF}.");
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Scelta team obbligatoria{00BFFF}]", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- Kick(playerid);
- }
- }
- /*==========================================================================Userpanel*/
- if(dialogid == USERPANEL)
- {
- if(response)
- {
- //Cambia password
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, CAMBIAPASS, DIALOG_STYLE_INPUT, "{33AA33}UserPanel:", "Inserisci la tua nuova {FF4444}password{FFFFFF}, che sostuirà la precendente.", "Cambia", "Chiudi");
- }
- //Reset Statistiche
- if(listitem == 1)
- {
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- ResetPlayerMoney(playerid);
- PlayerInfo[playerid][pKills] = 0;
- PlayerInfo[playerid][pDeaths] = 0;
- dini_IntSet(pFile, "SoldiInBanca", 0);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} resetta le statistiche del suo account.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai resettato con successo le tue statistiche. Al tuo rientro nel Server, saranno tutte azzerate.");
- }
- //Elimina Account
- if(listitem == 2)
- {
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- if(fexist(pFile))
- {
- dini_Remove(pFile);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} elimina con successo il suo Account, viene eseguito un auto-kick per evitare Crash.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai eliminato con successo il tuo Account. Ti viene applicato un auto-kick per evitare Crash.");
- Kick(playerid);
- }
- }
- //Stats
- if(listitem == 3)
- {
- new Float: Ratio;
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- if(dini_Int(pFile, "Deaths") == 0)
- {
- Ratio = 0;
- }
- else
- {
- Ratio = 1.0 * dini_Int(pFile, "Kills") / dini_Int(pFile, "Deaths");
- }
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "____________________________[{33AA33}%s{FFFFFF}]____________________________", nome);
- format(stringa, sizeof(stringa), "Uccisioni: {33AA33}%d {FFFFFF}Morti: {33AA33}%d {FFFFFF}Ratio: {33AA33}%.2f", dini_Int(pFile, "Kills"), dini_Int(pFile, "Deaths"), Ratio);
- SendClientMessage(playerid, COLORE_TRIADE, stringa);
- }
- }
- }
- /*==========================================================================CambiaPassword*/
- if(dialogid == CAMBIAPASS)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- 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");
- return 0;
- }
- if(strfind(inputtext, "=", true) == 0)
- {
- 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");
- return 0;
- }
- GetPlayerName(playerid, nome, 24);
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- dini_Set(pFile, "Password", inputtext);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} cambia la password del suo account.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai cambiato con successo la tua password. La prossima volta che entri, esegui il Login con essa.");
- }
- }
- /*==========================================================================Animazioni*/
- if(dialogid == ANIMAZIONI)
- {
- if(response)
- {
- //Siediti
- if(listitem == 0)
- {
- ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 1);
- Animazione[playerid] = true;
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei seduto.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si siede.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO ,stringa);
- }
- //Braccia Incrociate
- if(listitem == 1)
- {
- ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, 1);
- Animazione[playerid] = true;
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai incrociato le braccia.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} incrocia le braccia.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- }
- //Mani in alto
- if(listitem == 2)
- {
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
- Animazione[playerid] = true;
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai alzato le mani.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} alza le mani.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- }
- //Finta morte
- if(listitem == 3)
- {
- ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 1);
- Animazione[playerid] = true;
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ti sei gettato in terra.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si getta in terra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- }
- //Insulto
- if(listitem == 4)
- {
- ApplyAnimation(playerid, "PED", "fucku", 4.0, 1, 0, 0, 0, 1);
- Animazione[playerid] = true;
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai insultato qualcuno.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} insulta qualcuno.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- }
- }
- }
- /*==========================================================================Banca*/
- if(dialogid == BANCA)
- {
- if(response)
- {
- new soldibanca = dini_Int(pFile, "SoldiInBanca");
- if(listitem == 0)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "[BANCA]: {FFFFFF}Utente: {33AA33}%s {FFFFFF}Soldi in Banca: {33AA33}%d", nome, soldibanca);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} controlla il suo conto in banca.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- }
- if(listitem == 1)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "{FFFFFF}Utente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi prelevare.", nome, soldibanca);
- ShowPlayerDialog(playerid, PRELEVA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Preleva", "Chiudi");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 2)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "{FFFFFF}Utente: {FF4444}%s {FFFFFF}Soldi in Banca: {FF4444}%d\n{FFFFFF}Inserisci la somma che vuoi depositare.", nome, soldibanca);
- ShowPlayerDialog(playerid, DEPOSITA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Deposita", "Chiudi");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Preleva*/
- if(dialogid == PRELEVA)
- {
- if(response)
- {
- new preleva = strval(inputtext);
- new soldibanca = dini_Int(pFile, "SoldiInBanca");
- if(!preleva)
- {
- GetPlayerName(playerid, nome, 24);
- 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);
- ShowPlayerDialog(playerid, PRELEVA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Preleva", "Chiudi");
- }
- else if(preleva > soldibanca)
- {
- GetPlayerName(playerid, nome, 24);
- 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);
- ShowPlayerDialog(playerid, PRELEVA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Preleva", "Chiudi");
- }
- else if(preleva <= soldibanca)
- {
- GetPlayerName(playerid, nome, 24);
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- GivePlayerMoney(playerid, preleva);
- dini_IntSet(pFile, "SoldiInBanca",soldibanca-preleva);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai prelevato {33AA33}%d${FFFFFF}.", preleva);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} preleva {FFFFFF}%d{00BFFF}$ dal suo conto in banca.", nome, preleva);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- }
- }
- }
- /*==========================================================================Preleva*/
- if(dialogid == DEPOSITA)
- {
- if(response)
- {
- new deposita = strval(inputtext);
- new soldibanca = dini_Int(pFile, "SoldiInBanca");
- if(!deposita)
- {
- GetPlayerName(playerid, nome, 24);
- 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);
- ShowPlayerDialog(playerid, DEPOSITA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Deposita", "Chiudi");
- }
- else if(deposita > GetPlayerMoney(playerid))
- {
- GetPlayerName(playerid, nome, 24);
- 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);
- ShowPlayerDialog(playerid, DEPOSITA, DIALOG_STYLE_INPUT, "{33AA33}Banca", stringa, "Deposita", "Chiudi");
- }
- else if(deposita <= GetPlayerMoney(playerid))
- {
- GetPlayerName(playerid, nome, 24);
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- GivePlayerMoney(playerid, -deposita);
- dini_IntSet(pFile, "SoldiInBanca", soldibanca+deposita);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai depositato {33AA33}%d${FFFFFF}.", deposita);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} deposita {FFFFFF}%d{00BFFF}$ dal suo conto in banca.", nome, deposita);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- }
- }
- }
- /*==========================================================================Aiuto*/
- if(dialogid == AIUTO)
- {
- if(response)
- {
- if(listitem == 0)
- {
- 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", "");
- }
- if(listitem == 1)
- {
- 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", "");
- }
- if(listitem == 2)
- {
- 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", "");
- }
- }
- }
- /*==========================================================================CambiaTeam*/
- if(dialogid == CAMBIATEAM)
- {
- if(response)
- {
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Hai speso {FF66FF}500$ {FFFFFF}per entrare nella nuova fazione.");
- GivePlayerMoney(playerid, -500);
- if(listitem == 0)
- {
- new rand = random(sizeof(Rskingroove));
- SetPlayerSkin(playerid, Rskingroove[rand][0]);
- SetPlayerTeam(playerid, Groove);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Groove Street.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Groove Street.");
- SetPlayerPos(playerid, 2496.1279, -1683.8066, 13.3645);
- SetPlayerColor(playerid, COLORE_GROOVE);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 5, 1);
- GivePlayerWeapon(playerid, 28, 400);
- GivePlayerWeapon(playerid, 25, 500);
- }
- //Ballas
- if(listitem == 1)
- {
- new rand = random(sizeof(Rskinballas));
- SetPlayerSkin(playerid, Rskinballas[rand][0]);
- SetPlayerTeam(playerid, Ballas);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Ballas.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Ballas.");
- SetPlayerPos(playerid, 2000.0258, -1121.1666, 26.7448);
- SetPlayerColor(playerid, COLORE_BALLAS);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 32, 450);
- GivePlayerWeapon(playerid, 22, 400);
- }
- //Vagos
- if(listitem == 2)
- {
- new rand = random(sizeof(Rskinvagos));
- SetPlayerSkin(playerid, Rskinvagos[rand][0]);
- SetPlayerTeam(playerid, Vagos);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Vagos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Vagos.");
- SetPlayerPos(playerid, 2323.1489, -1192.1659, 27.9693);
- SetPlayerColor(playerid, COLORE_VAGOS);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 6, 1);
- GivePlayerWeapon(playerid, 26, 400);
- GivePlayerWeapon(playerid, 28, 450);
- }
- //Atzecas
- if(listitem == 3)
- {
- new rand = random(sizeof(Rskinatz));
- SetPlayerSkin(playerid, Rskinatz[rand][0]);
- SetPlayerTeam(playerid, Atzecas);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Atzecas.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Atzecas.");
- SetPlayerPos(playerid, 1931.7733, -2110.7942, 13.6953);
- SetPlayerColor(playerid, COLORE_ATZECAS);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 7, 1);
- GivePlayerWeapon(playerid, 32, 450);
- GivePlayerWeapon(playerid, 33, 400);
- }
- //Triade
- if(listitem == 4)
- {
- new rand = random(sizeof(Rskintriade));
- SetPlayerSkin(playerid, Rskintriade[rand][0]);
- SetPlayerTeam(playerid, Triade);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Triade.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nella Triade.");
- SetPlayerPos(playerid, 327.4093, -1515.8767, 36.0391);
- SetPlayerColor(playerid, COLORE_TRIADE);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 24, 400);
- GivePlayerWeapon(playerid, 28, 500);
- }
- //Bikers
- if(listitem == 5)
- {
- new rand = random(sizeof(Rskinbikers));
- SetPlayerSkin(playerid, Rskinbikers[rand][0]);
- SetPlayerTeam(playerid, Bikers);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Bikers.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Bikers.");
- SetPlayerPos(playerid, 973.5109, -1829.7964, 13.3227);
- SetPlayerColor(playerid, COLORE_BIKERS);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 30, 350);
- GivePlayerWeapon(playerid, 25, 500);
- }
- //Polizia
- if(listitem == 6)
- {
- new rand = random(sizeof(Rskinpolizia));
- SetPlayerSkin(playerid, Rskinpolizia[rand][0]);
- SetPlayerTeam(playerid, Polizia);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Polizia di Los Santos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nella Polizia di Los Santos.");
- SetPlayerPos(playerid, 1575.5601, -1636.0497, 13.5510);
- SetPlayerColor(playerid, COLORE_POLIZIA);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 3, 1);
- GivePlayerWeapon(playerid, 23, 600);
- GivePlayerWeapon(playerid, 27, 600);
- }
- //Medici
- if(listitem == 7)
- {
- new rand = random(sizeof(Rskinmedici));
- SetPlayerSkin(playerid, Rskinmedici[rand][0]);
- SetPlayerTeam(playerid, Medici);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Medici di Los Santos.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SetPlayerPos(playerid, 2029.9830, -1409.9507, 16.9989);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei Medici di Los Santos.");
- ResetPlayerWeapons(playerid);
- SetPlayerColor(playerid, BLU_CHIARO);
- }
- if(listitem == 8)
- {
- new rand = random(sizeof(Rskincittadini));
- SetPlayerSkin(playerid, Rskincittadini[rand][0]);
- SetPlayerTeam(playerid, Cittadini);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha cambiato la sua fazione in Cittadini.", nome);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- SetPlayerPos(playerid, 1129.2941, -1465.8682, 15.7571);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Sei entrato nei cittadini.");
- ResetPlayerWeapons(playerid);
- SetPlayerColor(playerid, GRIGIO);
- }
- }
- }
- /*==========================================================================Compra Droga*/
- if(dialogid == COMPRADROGA)
- {
- if(response)
- {
- new Float: Vita;
- GetPlayerHealth(playerid, Vita);
- //Marijuana
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}300${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra uno spinello di Marijuana.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato uno spinello di Marijuana.");
- GivePlayerMoney(playerid, -300);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
- SetPlayerHealth(playerid, Vita+20);
- SetPlayerDrunkLevel(playerid, 3000);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Cocaina
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}500${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una siringa di Cocaina.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una siringa di Cocaina e sei altamente drogato, fai attenzione.");
- GivePlayerMoney(playerid, -500);
- SetPlayerHealth(playerid, Vita+30);
- SetPlayerDrunkLevel(playerid, 3000);
- SetPlayerWeather(playerid, -68);
- Drogato[playerid] = true;
- SetTimerEx("FineDrogato", 240000, false, "d", playerid);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Eroina
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}600${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una siringa di Eroina.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una siringa di Eroina e sei altamente drogato, fai attenzione.");
- GivePlayerMoney(playerid, -600);
- SetPlayerHealth(playerid, Vita+50);
- SetPlayerDrunkLevel(playerid, 4000);
- SetPlayerWeather(playerid, -68);
- Drogato[playerid] = true;
- SetTimerEx("FineDrogato", 240000, false, "d", playerid);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Hashish
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pastiglia di Hashish.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pastiglia di Hashish e sei altamente drogato, fai attenzione.");
- GivePlayerMoney(playerid, -1000);
- SetPlayerHealth(playerid, Vita+60);
- SetPlayerDrunkLevel(playerid, 5000);
- SetPlayerWeather(playerid, -68);
- Drogato[playerid] = true;
- SetTimerEx("FineDrogato", 240000, false, "d", playerid);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Compra Pizzeria*/
- if(dialogid == COMPRAPIZZA)
- {
- if(response)
- {
- new Float: Vita;
- GetPlayerHealth(playerid, Vita);
- GetPlayerName(playerid, nome, 24);
- //Pizza ridotta
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}10${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pizza.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pizza.");
- GivePlayerMoney(playerid, -10);
- SetPlayerHealth(playerid, Vita+15);
- ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Pizza media
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}20${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pizza.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pizza.");
- GivePlayerMoney(playerid, -20);
- SetPlayerHealth(playerid, Vita+20);
- ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Pizza gigante
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 40) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}40${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una pizza.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una pizza.");
- GivePlayerMoney(playerid, -40);
- SetPlayerHealth(playerid, Vita+30);
- ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Bibita
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}10${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una bibita.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una bibita.");
- GivePlayerMoney(playerid, -10);
- SetPlayerHealth(playerid, Vita+10);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Insalata
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}15${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un' insalata.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un' insalata.");
- GivePlayerMoney(playerid, -15);
- SetPlayerHealth(playerid, Vita+20);
- ApplyAnimation(playerid, "FOOD", "EAT_Pizza", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Compra Burger Shot*/
- if(dialogid == COMPRABSHOT)
- {
- if(response)
- {
- new Float: Vita;
- GetPlayerHealth(playerid, Vita);
- //Hamburger piccolo
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}15${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un hamburger.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un hamburger.");
- GivePlayerMoney(playerid, -15);
- SetPlayerHealth(playerid, Vita+15);
- ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Hamburger medio
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 35) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}35${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un hamburger.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un hamburger.");
- GivePlayerMoney(playerid, -35);
- SetPlayerHealth(playerid, Vita+30);
- ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Hamburger grande
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}50${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un hamburger.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un hamburger.");
- GivePlayerMoney(playerid, -50);
- SetPlayerHealth(playerid, Vita+35);
- ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Bibita
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}15${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una bibita.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una bibita.");
- GivePlayerMoney(playerid, -15);
- SetPlayerHealth(playerid, Vita+10);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Patatine piccolo
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}20${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un menù patatine.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un menù patatine.");
- GivePlayerMoney(playerid, -20);
- SetPlayerHealth(playerid, Vita+20);
- ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Patatine grande
- if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) < 40) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}40${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un menù patatine.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un menù patatine.");
- GivePlayerMoney(playerid, -40);
- SetPlayerHealth(playerid, Vita+30);
- ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 1, 1, 1, 0, 4000, 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Compra Discoteca*/
- if(dialogid == COMPRADISCO)
- {
- if(response)
- {
- new Float: Vita;
- GetPlayerHealth(playerid, Vita);
- //Bibita
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}20${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una bibita.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una bibita.");
- GivePlayerMoney(playerid, -20);
- SetPlayerHealth(playerid, Vita+10);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Birra
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 30) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}30${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una birra.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una birra.");
- GivePlayerMoney(playerid, -30);
- SetPlayerHealth(playerid, Vita+30);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- SetPlayerDrunkLevel(playerid, 3000);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Super Alcolico
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}50${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un super alcolico.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un super alcolico.");
- GivePlayerMoney(playerid, -50);
- SetPlayerHealth(playerid, Vita+40);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- SetPlayerDrunkLevel(playerid, 4000);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- //Cocktail
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}100${FFFFFF}.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un cocktail.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un cocktail.");
- GivePlayerMoney(playerid, -100);
- SetPlayerHealth(playerid, Vita+50);
- SetPlayerDrunkLevel(playerid, 5000);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Compra Vestiti*/
- if(dialogid == COMPRAVESTITI)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}100${FFFFFF}.");
- GivePlayerMoney(playerid, -100);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un paio di occhiali.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un paio di occhiali.");
- dini_IntSet(pFile, "Occhiali", 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}150${FFFFFF}.");
- GivePlayerMoney(playerid, -150);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un paio di occhiali.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un paio di occhiali.");
- dini_IntSet(pFile, "Occhiali", 2);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 80) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}80${FFFFFF}.");
- GivePlayerMoney(playerid, -80);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un paio di occhiali.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un paio di occhiali.");
- dini_IntSet(pFile, "Occhiali", 3);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}200${FFFFFF}.");
- GivePlayerMoney(playerid, -200);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un casco.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un casco.");
- dini_IntSet(pFile, "Casco", 1);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) < 460) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}460${FFFFFF}.");
- GivePlayerMoney(playerid, -460);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un casco.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un casco.");
- dini_IntSet(pFile, "Casco", 2);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) < 350) return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}350${FFFFFF}.");
- GivePlayerMoney(playerid, -350);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un casco.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un casco.");
- dini_IntSet(pFile, "Casco", 3);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Compra Ammunation*/
- if(dialogid == COMPRARMI)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, PISTOLE, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "9mm 200$\n9mm silenziata 300$\nDesert Eagle 600$", "Compra", "Chiudi");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, MITRA, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Micro-Uzi 350$\nTec-9 500$\nMP5 650$", "Compra", "Chiudi");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, FUCILI_POMPA, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Sawn-Off 700$\nFucile a pompa 800$\nSPAS-12 1000$", "Compra", "Chiudi");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, FUCILI_ASSALTO, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "AK-47 1000$\nM4 1200$", "Compra", "Chiudi");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, FUCILI_PREC, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Fucile di precisione 1000$\nFucile 800$", "Compra", "Chiudi");
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(playerid, ESPLOSIVI, DIALOG_STYLE_LIST, "{33AA33}Ammunation:", "Granate 400$\nMolotov 200$\nC4 550$", "Compra", "Chiudi");
- }
- if(listitem == 6)
- {
- GetPlayerName(playerid, nome, 24);
- if(GetPlayerMoney(playerid) < 700)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}700${FFFFFF}.");
- SetPlayerAttachedObject(playerid, 3, 1242, 1, 0.019999, 0.039999, 0.000000, 2.459999, 89.699989, -3.100000, 1.710000, 2.119999, 1.719999);
- GivePlayerMoney(playerid, -700);
- SetPlayerArmour(playerid, 100);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un giubotto antiproiettile.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Pistole(Ammunation)*/
- if(dialogid == PISTOLE)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 200)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}300${FFFFFF}.");
- GivePlayerWeapon(playerid, 22, 200);
- GivePlayerMoney(playerid, -200);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una 9mm.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una 9mm.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 300)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}300${FFFFFF}.");
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerMoney(playerid, -300);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una 9mm silenziata.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una 9mm silenziata.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 600)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}600${FFFFFF}.");
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerMoney(playerid, -600);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra una Desert Eagle..", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato una Desert Eagle.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Mitra Leggeri(Ammunation)*/
- if(dialogid == MITRA)
- {
- GetPlayerName(playerid, nome, 24);
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 350)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}350${FFFFFF}.");
- GivePlayerWeapon(playerid, 28, 300);
- GivePlayerMoney(playerid, -350);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un Micro-Uzi.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un Micro-uzi.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 500)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}500${FFFFFF}.");
- GivePlayerWeapon(playerid, 32, 350);
- GivePlayerMoney(playerid, -500);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un Tec-9.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un Tec-9.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 650)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}650${FFFFFF}.");
- GivePlayerWeapon(playerid, 29, 350);
- GivePlayerMoney(playerid, -650);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un MP5.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un MP5.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Fucili a pompa(Ammunation)*/
- if(dialogid == FUCILI_POMPA)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 700)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}700${FFFFFF}.");
- GivePlayerWeapon(playerid, 26, 200);
- GivePlayerMoney(playerid, -700);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile a canne mozze.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile a canne mozze.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 800)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}800${FFFFFF}.");
- GivePlayerWeapon(playerid, 25, 250);
- GivePlayerMoney(playerid, -800);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile a pompa.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile a pompa.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 1000)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
- GivePlayerWeapon(playerid, 27, 200);
- GivePlayerMoney(playerid, -1000);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra uno SPAS-12.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato uno SPAS-12.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Fucili d'assalto(Ammunation)*/
- if(dialogid == FUCILI_ASSALTO)
- {
- if(response)
- {
- GetPlayerName(playerid, nome, 24);
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 1000)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
- GivePlayerWeapon(playerid, 30, 400);
- GivePlayerMoney(playerid, -1000);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un AK-47.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un AK-47.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 1200)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1200${FFFFFF}.");
- GivePlayerWeapon(playerid, 31, 450);
- GivePlayerMoney(playerid, -1200);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un M4.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un M4.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Fucili precisione(Ammunation)*/
- if(dialogid == FUCILI_PREC)
- {
- if(response)
- {
- GetPlayerName(playerid, nome, 24);
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 1000)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}1000${FFFFFF}.");
- GivePlayerWeapon(playerid, 34, 100);
- GivePlayerMoney(playerid, -1000);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile di precisione.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile di precisione.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 800)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}800${FFFFFF}.");
- GivePlayerWeapon(playerid, 33, 200);
- GivePlayerMoney(playerid, -800);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un fucile.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un fucile.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Esplosivi(Ammunation)*/
- if(dialogid == ESPLOSIVI)
- {
- if(response)
- {
- GetPlayerName(playerid, nome, 24);
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 400)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}400${FFFFFF}.");
- GivePlayerWeapon(playerid,16, 20);
- GivePlayerMoney(playerid, -400);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un kit di granate.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un kit di granate.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 200)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}200${FFFFFF}.");
- GivePlayerWeapon(playerid, 18, 30);
- GivePlayerMoney(playerid, -200);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un kit di molotov.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un kit di molotov.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 550)return SendClientMessage(playerid, COLORE_ERRORE, "[ERRORE]: {FFFFFF}Devi avere {FF4444}550${FFFFFF}.");
- GivePlayerWeapon(playerid, 39, 20);
- GivePlayerWeapon(playerid, 40, 1);
- GivePlayerMoney(playerid, -550);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} compra un kit di C4.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai comprato un kit di C4.");
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- }
- }
- /*==========================================================================Emergenza Polizia*/
- if(dialogid == EMERGENZA)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- format(stringa, sizeof(stringa), "{FF4444}Errore:{FFFFFF} Inserisci un messaggio.\n{FFFFFF}Inserisci il messaggio da inviare alla centrale, specificando dove ti trovi.", nome);
- ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "{33AA33}Account:", stringa, "Registrati", "Chiudi");
- return 0;
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(GetPlayerTeam(i) == Polizia)
- {
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "[{FFFFFF}POLIZIA{00BFFF}] ** L'agente {FFFFFF}%s{00BFFF} è in pericolo e richiede rinforzi. Messaggio: {FFFFFF}%s{00BFFF}", nome, inputtext);
- SendClientMessage(i, BLU_CHIARO, stringa);
- }
- }
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai inviato una segnalazione d'emergenza alla centrale.");
- }
- }
- /*==========================================================================GPS*/
- if(dialogid == GPS)
- {
- if(response)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} imposta una meta nel GPS.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- if(listitem == 0)
- {
- SetPlayerCheckpoint(playerid, 2243.4275, -1659.5256, 15.2882, 5.0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Negozio di vestiti {FFFFFF}nel GPS.");
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
- }
- if(listitem == 1)
- {
- if(GetPlayerTeam(playerid) == Groove) {SetPlayerCheckpoint(playerid, 2500.0652, -1677.9636, 13.0304, 5.0);}
- if(GetPlayerTeam(playerid) == Ballas) {SetPlayerCheckpoint(playerid, 2008.5146, -1130.1874, 24.9206, 5.0);}
- if(GetPlayerTeam(playerid) == Vagos) {SetPlayerCheckpoint(playerid, 2350.3357, -1162.9158, 27.0327, 5.0);}
- if(GetPlayerTeam(playerid) == Atzecas) {SetPlayerCheckpoint(playerid, 1946.9575, -2099.9319, 13.2093, 5.0);}
- if(GetPlayerTeam(playerid) == Triade) {SetPlayerCheckpoint(playerid, 365.2892, -1594.5588, 31.2771, 5.0);}
- if(GetPlayerTeam(playerid) == Bikers) {SetPlayerCheckpoint(playerid, 961.7084, -1832.8285, 12.6022, 5.0);}
- if(GetPlayerTeam(playerid) == Polizia) {SetPlayerCheckpoint(playerid, 1535.2240, -1672.3832, 13.0518, 5.0);}
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Base della fazione {FFFFFF}nel GPS.");
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
- }
- if(listitem == 2)
- {
- SetPlayerCheckpoint(playerid, 1179.6179, -919.4143, 42.9274, 5.0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Burger Shot {FFFFFF}nel GPS.");
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
- }
- if(listitem == 3)
- {
- SetPlayerCheckpoint(playerid,1360.4415,-1275.3129,13.0885, 5.0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Ammunation {FFFFFF}nel GPS.");
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
- }
- if(listitem == 4)
- {
- SetPlayerCheckpoint(playerid,1664.6586,-1408.9457,13.3096, 5.0);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai impostato {33AA33}Banca {FFFFFF}nel GPS.");
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
- }
- }
- }
- if(dialogid == SCEGLILAVORO)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai ottenuto il permesso di lavoro come {33AA33}Camionista{FFFFFF}. Dirigiti al checkpoint.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ottiene il permesso di lavoro come {FFFFFF}Camionista{00BFFF}.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerCheckpoint(playerid, 780.9424, -1363.6980, 13.5365, 5.0);
- LavoratoreConsegna[playerid] = true;
- if(Pizzaboy[playerid] == true) Pizzaboy[playerid] = false;
- if(VendHotDog[playerid] == true) VendHotDog[playerid] = false;
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai ottenuto il permesso di lavoro come {33AA33}Pizzaboy{FFFFFF}. Dirigiti al checkpoint.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ottiene il permesso di lavoro come {FFFFFF}Pizzaboy{00BFFF}.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerCheckpoint(playerid, 2097.9609, -1815.6866, 13.3828, 5.0);
- Pizzaboy[playerid] = true;
- if(VendHotDog[playerid] == true) VendHotDog[playerid] = false;
- if(LavoratoreConsegna[playerid] == true) LavoratoreConsegna[playerid] = false;
- }
- if(listitem == 3)
- {
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Hai ottenuto il permesso di lavoro come {33AA33}Venditore di HotDog{FFFFFF}. Dirigiti al checkpoint.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName(playerid, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ottiene il permesso di lavoro come {FFFFFF}Venditore di HotDog{00BFFF}.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerCheckpoint(playerid, 1216.8407, -875.6584, 42.4739, 5.0);
- VendHotDog[playerid] = true;
- if(LavoratoreConsegna[playerid] == true) LavoratoreConsegna[playerid] = false;
- if(Pizzaboy[playerid] == true) Pizzaboy[playerid] = false;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- //Seifader
- public OnPlayerScreenFade(playerid, color, speed)
- {
- return 1;
- }
- public OnPlayerScreenColorFade(playerid, color, speed)
- {
- return 1;
- }
- public OnPlayerFadeFlashed(playerid, color, speed)
- {
- return 1;
- }
- /*==============================================================================Timers*/
- //Spawn
- public Spawn(playerid)
- {
- SpawnPlayer(playerid);
- 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");
- SetPlayerCameraLookAt(playerid, 2521.2009, -1475.4996, 23.9941);
- SetPlayerCameraPos(playerid, 2513.6978, -1464.2731, 24.0043);
- SendClientMessage(playerid, ROSA, "*** {FFFFFF}Scegli uno tra i Team nella lista.");
- return 1;
- }
- //Telecamera
- public Telecamera(playerid)
- {
- SetPlayerPos(playerid, 343.2539, -2003.4648, 22.8738);
- SetPlayerCameraPos(playerid, 345.3194, -2002.9467, 23.3376);
- SetPlayerCameraLookAt(playerid, 383.5432, -2040.4696, 23.3376);
- return 1;
- }
- //Aggiorna tempo
- public UpdateTime()
- {
- new ora, minuti;
- gettime(ora, minuti);
- SetWorldTime(ora);
- new t = 0;
- while(t != MAX_PLAYERS)
- {
- if(IsPlayerConnected(t) && GetPlayerState(t) != PLAYER_STATE_NONE)
- {
- SetPlayerTime(t, ora, minuti);
- }
- t++;
- }
- }
- //VoteKick
- public FineVoteKick(id, playerid)
- {
- new nomeid[24];
- GetPlayerName(id, nomeid, 24);
- if(VotiPlayers >= VOTI_NECESSARI)
- {
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è stato kickato dal Server. [Motivo: {FFFFFF}Votekick{00BFFF}]", nomeid);
- SendClientMessageToAll(BLU_CHIARO, stringa);
- VotekickAttivo = false;
- Votato[playerid] = false;
- VotiPlayers = 0;
- }
- else {format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} non è stato kickato dal Server. [Motivo: {FFFFFF}Voti insufficienti{00BFFF}]", nomeid); SendClientMessageToAll(BLU_CHIARO, stringa); }
- }
- //Rapina in Banca
- public FineRapina(playerid)
- {
- RapinaAttiva = false;
- Rapinatore[playerid] = false;
- StopRapina[playerid] = true;
- new bottino = random(2000)+8000;
- GivePlayerMoney(playerid, bottino);
- SetPlayerWantedLevel(playerid, 4);
- new nome[24];
- GetPlayerName(playerid, nome, 24);
- new Float:x, Float: y, Float: z;
- GetPlayerPos(playerid, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} ha rapinato con successo {FFFFFF}%d{00BFFF}$ alla banca.", nome, bottino);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- format(stringa, sizeof(stringa), "* {FFFFFF}Hai rapinato con successo {33AA33}%d {FFFFFF}alla banca. Attendi un'ora prima di rapinarla di nuovo.", bottino);
- SendClientMessage(playerid, COLORE_GROOVE, stringa);
- SetTimerEx("FineStopRapina", 3600000, false, "d", playerid);
- }
- //Rapina in Banca
- public FineStopRapina(playerid)
- {
- StopRapina[playerid] = false;
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}Ora puoi effettuare un'altra rapina.");
- }
- //Esci di prigione
- public EsciPrigione(id)
- {
- SetPlayerWantedLevel(id, 0);
- Jailato[id] = false;
- new nomeid[24];
- GetPlayerName(id, nomeid, 24);
- if(GetPlayerTeam(id) == Groove)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(id, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerPos(id, 2496.1279, -1683.8066, 13.3645);
- GivePlayerWeapon(id, 5, 1);
- GivePlayerWeapon(id, 28, 400);
- GivePlayerWeapon(id, 25, 500);
- }
- if(GetPlayerTeam(id) == Ballas)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(id, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerPos(id, 2000.0258, -1121.1666, 26.7448);
- GivePlayerWeapon(id, 1, 1);
- GivePlayerWeapon(id, 32, 450);
- GivePlayerWeapon(id, 22, 400);
- }
- if(GetPlayerTeam(id) == Vagos)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(id, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerPos(id, 2323.1489, -1192.1659, 27.9693);
- GivePlayerWeapon(id, 6, 1);
- GivePlayerWeapon(id, 26, 400);
- GivePlayerWeapon(id, 28, 450);
- }
- if(GetPlayerTeam(id) == Atzecas)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(id, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerPos(id, 1931.7733, -2110.7942, 13.6953);
- GivePlayerWeapon(id, 7, 1);
- GivePlayerWeapon(id, 32, 450);
- GivePlayerWeapon(id, 33, 400);
- }
- if(GetPlayerTeam(id) == Triade)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(id, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerPos(id, 327.4093, -1515.8767, 36.0391);
- GivePlayerWeapon(id, 8, 1);
- GivePlayerWeapon(id, 24, 400);
- GivePlayerWeapon(id, 28, 500);
- }
- if(GetPlayerTeam(id) == Bikers)
- {
- new Float:x, Float: y, Float: z;
- GetPlayerPos(id, x, y, z);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} è uscito di prigione.", nomeid);
- SendNearMessage(x, y, z, BLU_CHIARO, stringa);
- SetPlayerPos(id, 973.5109, -1829.7964, 13.3227);
- GivePlayerWeapon(id, 4, 1);
- GivePlayerWeapon(id, 30, 350);
- GivePlayerWeapon(id, 25, 500);
- }
- }
- //Fine Drogato
- public FineDrogato(playerid)
- {
- if(Drogato[playerid] == true)
- {
- Drogato[playerid] = false;
- SetPlayerWeather(playerid, 4);
- SendClientMessage(playerid, COLORE_GROOVE, "* {FFFFFF}L'effetto della droga è finito.");
- }
- }
- //PayDay
- public PayDay()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(GetPlayerTeam(i) == Medici || GetPlayerTeam(i) == Polizia)
- {
- GivePlayerMoney(i, SOLDI_PAYDAY);
- format(stringa, sizeof(stringa), "~y~Hai ricevuto il tuo payday di %d$", SOLDI_PAYDAY);
- GameTextForPlayer(i, stringa, 3000, 4);
- }
- }
- }
- //StopTramortito
- public StopTramortito(id)
- {
- SendClientMessage(id, COLORE_GROOVE, "* {FFFFFF}Ti sei rialzato.");
- new Float:x, Float: y, Float: z;
- GetPlayerPos(id, x, y, z);
- new nome[24];
- GetPlayerName(id, nome, 24);
- format(stringa, sizeof(stringa), "** {FFFFFF}%s{00BFFF} si rialza.", nome);
- SendNearMessage(x, y, z, BLU_CHIARO,stringa);
- ClearAnimations(id);
- Tramortito[id] = false;
- }
- /*==============================================================================Funzioni*/
- //Strtok
- strtok(const stringhe[], &index)
- {
- new length = strlen(stringhe);
- while((index < length) && (stringhe[index] <= ' ')) index++;
- new
- offset = index,
- result[20];
- while((index < length) && (stringhe[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = stringhe[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- //Strrest
- stock strrest(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[128];
- while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- //Salva Account
- SalvaAccount(playerid)
- {
- new nome[24];
- GetPlayerName(playerid, nome, 24);
- format(pFile, sizeof(pFile), "Utenti/%s.ini", nome);
- dini_IntSet(pFile, "Soldi", GetPlayerMoney(playerid));
- dini_IntSet(pFile, "Kills", PlayerInfo[playerid][pKills]);
- dini_IntSet(pFile, "Deaths", PlayerInfo[playerid][pDeaths]);
- dini_IntSet(pFile, "Bannato", PlayerInfo[playerid][Bannato]);
- dini_IntSet(pFile, "Ricercato", GetPlayerWantedLevel(playerid));
- Loggato[playerid] = false;
- return 1;
- }
- //Messaggio Vicino
- stock SendNearMessage(Float:x, Float:y, Float:z, color, const message[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
- {
- SendClientMessage(i, color, message);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement