Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //COMANDO RAPINA
- //31 CREATEOBJECT
- // 52 DIALOGS
- // SLOT ATTACHED 6
- // SLOT 0 == MANETTE
- // SLOT 1 == TAZER
- // SLOT 2 == CAPPELLO POLIZIA
- // SLOT 3 == ARMATURA
- // SLOT 4 == MASCHERA
- // SLOT 5 == ARMA
- #include <a_samp>
- #include <sscanf2>
- #include <YSI\y_ini>
- #include <YSI\y_hooks>
- #include "../include/gl_common.inc"
- #include <zcmd>
- #include <foreach>
- #include <streamer>
- #define SCM SendClientMessage
- //DIALOGS
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS1 3
- #define DIALOG_SUCCESS2 4
- #define DIALOG_ANNI 5
- #define DIALOG_SESSO 6
- #define DIALOG_GIRO 7
- #define DIALOG_REGOLAMENTO 8
- #define DIALOG_LAVORI 9
- #define DIALOG_REGOL 1998
- #define DIALOG_VENDIH 2017//droga
- #define DIALOG_COMPRAH 2018//droga
- //COLORI
- #define COL_TITLES "{FFEE00}"
- #define COL_BIANCO "{FFFFFF}"
- #define COL_ROSSO "{F81414}"
- #define COL_VERDE "{00FF22}"
- #define COL_AZZU "{D6D8FF}"
- #define COL_BLU "{0000C1}"
- #define COLORE_POLIZIA 0x00D9E6FF
- #define COLORE_MEDICI 0xFF0000FF
- #define BIANCO 0xFFFFFFFF
- #define NERO 0x000000FF
- #define VERDE 0x005700FF
- #define BLU 0x0000FFFF
- #define GIALLO 0xFFEE00FF
- #define GIALLOSCURO 0xFFB900FF
- #define ARANCIONE 0xFF6600FF
- #define GRIGIO 0xAFAFAFAA
- #define ROSSO 0xFF0000FF
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define DVERDE 0x5DFF00FF
- //SISTEMA DROGA
- new d_lavorazione[MAX_PLAYERS] = 0;
- new maschera[MAX_PLAYERS] = 0;
- enum hCompra
- {
- hRichiesta,
- };
- new CompraInfo[MAX_PLAYERS][hCompra];
- enum nInfo
- {
- nPiantaF,
- nPiantaI,
- Float:nX,
- Float:nY,
- Float:nZ,
- nVaso,
- nPiantati,
- nRaccoglibili
- };
- new SemiInfo[MAX_PLAYERS][nInfo];
- enum pInfo
- {
- pPassword,
- pAdmin,
- pHelper,
- pSoldi,
- pSkin,
- pSkins,
- pSesso,
- pAnni,
- pContobanca,
- pContobancario,
- pLock,
- pBan,
- pExp,
- pLivello,
- pPolizia,
- pPortoArmi,
- pMedici,
- Float:pHealth,
- Float:pArmour,
- Float:pLastX,
- Float:pLastY,
- Float:pLastZ,
- Float:pFacingAngle,
- pInt,
- pPatente,
- pLavori,
- pSecondi,
- pMinuti,
- pOre,
- pBomba,
- pWorld,
- pNome,
- Float:Pos[4],
- pBiglietti,
- pBigliettiA,
- pBilancio,
- pC_Bancario,
- BizID,
- pCorda,
- pMaskB,
- pMaskR,
- pMaskV,
- pBorsa,
- pKitMedico,
- pInservizio,
- pGPS,
- pForbici,
- pArresti,
- pMulte,
- pTelefono,
- pFame,
- pSete,
- pPipi,
- pSemini,//droga
- pCanapa,//droga
- pHashish,//droga
- pAccendino,//droga
- pCartine,//droga
- Weapon1,
- Weapon1a,
- Weapon2,
- Weapon2a,
- Weapon3,
- Weapon3a,
- Weapon4,
- Weapon4a,
- Weapon5,
- Weapon5a,
- Weapon6,
- Weapon6a,
- Weapon7,
- Weapon7a,
- Weapon8,
- Weapon8a,
- Weapon9,
- Weapon9a,
- Weapon10,
- Weapon10a,
- Weapon11,
- Weapon11a,
- Weapon12,
- Weapon12a,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- //SISTEMA DROGA
- new Text3D:percentuale[MAX_PLAYERS];
- new Text3D:C_progresso[MAX_PLAYERS];
- new fumando[MAX_PLAYERS] = 0;
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- new playerworld, player2world;
- playerworld = GetPlayerVirtualWorld(playerid);
- player2world = GetPlayerVirtualWorld(i);
- if(playerworld == player2world)
- {
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SCM(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SCM(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SCM(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SCM(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SCM(i, col5, string);
- }
- }
- else
- {
- SCM(i, col1, string);
- }
- }
- }
- }
- return 1;
- }
- stock RemoveUnderScore(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- for(new i = 0; i < MAX_PLAYER_NAME; i++)
- {
- if(name[i] == '_') name[i] = ' ';
- }
- return name;
- }
- public OnGameModeInit()
- {
- //PICKUP SISTEMA DROGA
- CreatePickup(1239, 1, -394.9466,-1438.5430,25.7266, 0);
- Create3DTextLabel("Premi Y per comprare i semini\nPrezzo: x", GIALLO, -394.9466,-1438.5430,25.7266, 3.0, 0, 0);
- //pusher
- CreateDynamicObject(1728, -394.43265, -1433.75049, 24.71736, 0.00000, 0.00000, -9.77999);
- CreateDynamicObject(1728, -398.75510, -1434.79138, 24.71736, 0.00000, 0.00000, 12.84000);
- CreateDynamicObject(931, -394.98648, -1436.74121, 24.13490, 0.00000, 0.00000, 181.55991);
- CreateDynamicObject(931, -394.98651, -1436.74121, 23.67490, 0.00000, 0.00000, 181.55991);
- CreateDynamicObject(931, -397.54623, -1436.76807, 24.13490, 0.00000, 0.00000, 181.55991);
- CreateDynamicObject(931, -397.54620, -1436.76807, 23.67490, 0.00000, 0.00000, 181.55991);
- CreateDynamicObject(1431, -396.10904, -1433.20947, 25.26240, 0.00000, 0.00000, -4.32000);
- CreateDynamicObject(1431, -399.71973, -1434.26807, 25.26240, 0.00000, 0.00000, 72.12004);
- CreateDynamicObject(19473, -395.71860, -1436.83862, 24.32960, 0.00000, 90.00000, 4.08000);
- CreateDynamicObject(19473, -396.11682, -1437.16357, 24.32960, -26.00000, 90.00000, 47.28001);
- CreateDynamicObject(19473, -398.17075, -1437.03284, 23.44340, 0.00000, 0.00000, -17.88000);
- CreateDynamicObject(19473, -395.30679, -1436.38940, 24.32960, -26.00000, 90.00000, 1.68000);
- CreateDynamicObject(19473, -397.07822, -1436.77246, 23.44340, 0.00000, 0.00000, 44.40000);
- CreateDynamicObject(19473, -397.66141, -1436.98438, 23.44340, 0.00000, 0.00000, 0.42000);
- CreateDynamicObject(19473, -397.17563, -1436.33337, 23.44340, 0.00000, 0.00000, 58.92003);
- CreateDynamicObject(19473, -398.09915, -1436.38110, 23.44340, 0.00000, 0.00000, 58.92003);
- printf("CreateDynamicObjects: %d", CountDynamicObjects());
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new tmp[128], cmd[128], idx;
- cmd = strtok(cmdtext, idx);
- if(strcmp(cmd, "/dvendi", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, ROSSO, "Utilizzo: /dvendi [ID/Parte del nome] [Grammi] [Prezzo(da 300$ a 500$]");
- return 1;
- }
- new playa;
- new money;
- new needed;
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) { return 1; }
- needed = strval(tmp);
- if(needed < 1 || needed > 99) { SendClientMessage(playerid, ROSSO, " Grams not lower then 1, or above 99!"); return 1; }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) { return 1; }
- money = strval(tmp);
- if(money < 1 || money > 99999) { SendClientMessage(playerid, ROSSO, " Price not lower then 1, or above 99999!"); return 1; }
- if(needed > PlayerInfo[playerid][pHashish]) { SendClientMessage(playerid, ROSSO, " You dont have that much Drugs with you!"); return 1; }
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if (ProxDetector(8.0, playerid, playa))
- {
- if(playa == playerid)
- {
- SendClientMessage(playerid, ROSSO, " Cant sell to yourself!");
- return 1;
- }
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* You offerd %s to buy %d gram of drugs for $%d .", giveplayer, needed, money);
- SendClientMessage(playerid, GIALLO, string);
- format(string, sizeof(string), "* Drug Dealer %s wants to sell you %d gram for $%d, (type /accept drugs) to buy.", sendername, needed, money);
- SendClientMessage(playa, GIALLO, string);
- DrugOffer[playa] = playerid;
- DrugPrice[playa] = money;
- DrugGram[playa] = needed;
- }
- else
- {
- SendClientMessage(playerid, ROSSO, " That player is not near you!");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, ROSSO, " That player is offline.");
- }
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(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)
- {
- 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)
- {
- //SISTEMA DROGA
- if(newkeys & KEY_YES && IsPlayerInRangeOfPoint(playerid, 1.0, -394.9466,-1438.5430,25.7266)){//semini
- if(PlayerInfo[playerid][pSemini] == 10) return SCM(playerid, ROSSO, "Possiedi già 10 semini nell'inventario!");
- else{
- new string1[128];
- PlayerInfo[playerid][pSemini]++;
- format(string1, sizeof(string1), "Hai un numero di semini pari a %d",PlayerInfo[playerid][pSemini]);
- SCM(playerid, GIALLO, string1);}
- /*if(newkeys & KEY_YES && IsPlayerInRangeOfPoint(playerid, 1.0, -397.4359,-1438.6172,25.7266)){//canapa
- if(PlayerInfo[playerid][pCanapa] == 1) return SCM(playerid, ROSSO, "Possiedi già 1 ettogrammo di Canapa!");
- if(PlayerInfo[playerid][pCanapa] == 0){
- PlayerInfo[playerid][pCanapa] = 1;
- SCM(playerid, GIALLO, "Hai acquistato 1 ettogrammo di Canapa!");
- }*/
- if(newkeys & KEY_FIRE){
- if(fumando[playerid] == 1){
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
- SetPlayerWeather(playerid, 250);
- SetPlayerTime(playerid, 20, 0);
- SetPlayerDrunkLevel(playerid, 2100);}}
- return 1;}
- return 0;
- }
- CMD:lavoracanapa(playerid, params[]){
- new Float:X, Float:Y, Float:Z;
- if(PlayerInfo[playerid][pCanapa] == 0) return SCM(playerid, ROSSO, "Devi prima produrre della Canapa!");
- if(PlayerInfo[playerid][pHashish] == 20) return SCM(playerid, ROSSO, "Possiedi già 20g di Hashish!");
- if(d_lavorazione[playerid] == 1) return SCM(playerid, ROSSO, "Stai già lavorando della canapa, attendi.");
- SCM(playerid, ARANCIONE, "Attendi 1 minuto...");
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);
- PlayerInfo[playerid][pCanapa]--;
- GetPlayerPos(playerid, X, Y, Z);
- C_progresso[playerid] = Create3DTextLabel("0%\n Lavorazione in corso...", GIALLO, X, Y, Z, 4.0, 0, 0);
- d_lavorazione[playerid] = 1;
- SetTimerEx("C_Progresso1", 3000, false, "i", playerid);
- return 1;}
- forward C_Progresso1(playerid);
- public C_Progresso1(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "10%\nLavorazione in corso...");
- SetTimerEx("C_Progresso2", 3000, false, "i", playerid);}
- forward C_Progresso2(playerid);
- public C_Progresso2(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "20%\nLavorazione in corso...");
- SetTimerEx("C_Progresso3", 3000, false, "i", playerid);}
- forward C_Progresso3(playerid);
- public C_Progresso3(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "30%\nLavorazione in corso...");
- SetTimerEx("C_Progresso4", 3000, false, "i", playerid);}
- forward C_Progresso4(playerid);
- public C_Progresso4(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "40%\nLavorazione in corso...");
- SetTimerEx("C_Progresso5", 3000, false, "i", playerid);}
- forward C_Progresso5(playerid);
- public C_Progresso5(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "50%\nLavorazione in corso...");
- SetTimerEx("C_Progresso6", 3000, false, "i", playerid);}
- forward C_Progresso6(playerid);
- public C_Progresso6(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "60%\nLavorazione in corso...");
- SetTimerEx("C_Progresso7", 3000, false, "i", playerid);}
- forward C_Progresso7(playerid);
- public C_Progresso7(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "70%\nLavorazione in corso...");
- SetTimerEx("C_Progresso8", 3000, false, "i", playerid);}
- forward C_Progresso8(playerid);
- public C_Progresso8(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "80%\nLavorazione in corso...");
- SetTimerEx("C_Progresso9", 3000, false, "i", playerid);}
- forward C_Progresso9(playerid);
- public C_Progresso9(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "90%\nLavorazione in corso...");
- SetTimerEx("C_Progresso10", 3000, false, "i", playerid);}
- forward C_Progresso10(playerid);
- public C_Progresso10(playerid){
- Update3DTextLabelText(C_progresso[playerid], GIALLO, "100%\nLavorazione in corso...");
- SetTimerEx("C_Progresso11", 2000, false, "i", playerid);}
- forward C_Progresso11(playerid);
- public C_Progresso11(playerid){
- PlayerInfo[playerid][pHashish]= PlayerInfo[playerid][pHashish] + 20;//20g
- ClearAnimations(playerid);
- SCM(playerid, GIALLO, "Hai prodotto 20g di Hashish!");
- Delete3DTextLabel(C_progresso[playerid]);}
- CMD:pianta(playerid, params[]){
- if(PlayerInfo[playerid][pCanapa] == 6) return SCM(playerid, ROSSO, "Possiedi già 6 ettogrammi di Canapa!");
- if(PlayerInfo[playerid][pSemini] <= 4) return SCM(playerid, ROSSO, "Ti servono prima 5 semini!");
- if(PlayerInfo[playerid][pHashish] == 20) return SCM(playerid, ROSSO, "Possiedi già 20g di Hashish!");
- if(SemiInfo[playerid][nPiantati] == 1) return SCM(playerid, ROSSO, "Sono stati già piantati 5 semini, attendi il completamento!");
- //--------//
- PlayerInfo[playerid][pSemini]= PlayerInfo[playerid][pSemini] - 5;
- SemiInfo[playerid][nPiantati] = 1;
- SetTimerEx("AnimazionePianta", 1000, false, "i", playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);
- return 1;}
- forward AnimazionePianta(playerid);
- public AnimazionePianta(playerid){
- ClearAnimations(playerid);
- GetPlayerPos(playerid, SemiInfo[playerid][nX], SemiInfo[playerid][nY], SemiInfo[playerid][nZ]);
- //SemiInfo[playerid][nPiantaF] = CreateDynamicObject(19473, SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-2.6119, 0.0, 0.0, 0.0, 0);
- SemiInfo[playerid][nVaso] = CreateDynamicObject(2203, SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-0.8196, 0.0, 0.0, 0.0, 0);
- percentuale[playerid] = Create3DTextLabel("0%", GIALLO, SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.600, SemiInfo[playerid][nZ]-0.8196, 4.0, 0, 0);
- SetTimerEx("Pianta1", 50000, false, "i", playerid);}
- //----INIZIO CRESCITA PIANTINA----//
- forward Pianta1(playerid);
- public Pianta1(playerid){
- SemiInfo[playerid][nPiantaI] = CreateDynamicObject(862, SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-2.5719, 0.0, 0.0, 0.0, 0);
- Update3DTextLabelText(percentuale[playerid], GIALLO, "10%");
- SetTimerEx("Pianta2", 50000, false, "i", playerid);}
- forward Pianta2(playerid);
- public Pianta2(playerid){
- MoveDynamicObject(SemiInfo[playerid][nPiantaI], SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-2.3319, 0.005);//1
- Update3DTextLabelText(percentuale[playerid], GIALLO, "20%");
- SetTimerEx("Pianta3", 50000, false, "i", playerid);}
- forward Pianta3(playerid);
- public Pianta3(playerid){
- MoveDynamicObject(SemiInfo[playerid][nPiantaI], SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-2.1, 0.005);//2
- Update3DTextLabelText(percentuale[playerid], GIALLO, "30%");
- SetTimerEx("Pianta4", 50000, false, "i", playerid);}
- forward Pianta4(playerid);
- public Pianta4(playerid){
- MoveDynamicObject(SemiInfo[playerid][nPiantaI], SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-2.0, 0.005);//3
- Update3DTextLabelText(percentuale[playerid], GIALLO, "40%");
- SetTimerEx("Pianta5", 50000, false, "i", playerid);}
- forward Pianta5(playerid);
- public Pianta5(playerid){
- MoveDynamicObject(SemiInfo[playerid][nPiantaI], SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-1.7719, 0.009);//4
- Update3DTextLabelText(percentuale[playerid], GIALLO, "50%");
- SetTimerEx("Pianta6", 50000, false, "i", playerid);}
- //----FINE CRESCITA PIANTINA----//
- //----INIZIO CRESCITA CANAPA----//
- forward Pianta6(playerid);
- public Pianta6(playerid){
- DestroyDynamicObject(SemiInfo[playerid][nPiantaI]);
- SemiInfo[playerid][nPiantaF] = CreateDynamicObject(19473, SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-0.7800, 0.0, 0.0, 0.0, 0);
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFFE9FF00 );
- Update3DTextLabelText(percentuale[playerid], GIALLO, "60%");
- SetTimerEx("Pianta7", 50000, false, "i", playerid);}
- forward Pianta7(playerid);
- public Pianta7(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFFCCFF00);
- Update3DTextLabelText(percentuale[playerid], GIALLO, "70%");
- SetTimerEx("Pianta8", 50000, false, "i", playerid);}
- forward Pianta8(playerid);
- public Pianta8(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFFB6FF00);
- Update3DTextLabelText(percentuale[playerid], GIALLO, "80%");
- //SemiInfo[playerid][nRaccoglibili] = 1;
- SetTimerEx("Pianta9", 50000, false, "i", playerid);}
- forward Pianta9(playerid);
- public Pianta9(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF4CFF00);
- Update3DTextLabelText(percentuale[playerid], GIALLO, "90%");
- SetTimerEx("Pianta10", 50000, false, "i", playerid);}
- forward Pianta10(playerid);
- public Pianta10(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF33AA00);
- Update3DTextLabelText(percentuale[playerid], GIALLO, "100%");
- SetTimerEx("Pianta11", 50000, false, "i", playerid);}
- //----FINE CRESCITA CANAPA-----------------------------------------------------------------------------------------
- //----INIZIO SECC.----//
- forward Pianta11(playerid);
- public Pianta11(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF666600);
- Update3DTextLabelText(percentuale[playerid], ROSSO, "Attenzione, la pianta inizia a seccare! (2 min.)\n 0%");
- SetTimerEx("Pianta12", 20000, false, "i", playerid);}
- forward Pianta12(playerid);
- public Pianta12(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF876500);
- Update3DTextLabelText(percentuale[playerid], DVERDE, "Attenzione, la pianta sta seccando!\n Puoi iniziare a raccogliere!(1 min. 40 sec.)\n 20%");
- SemiInfo[playerid][nRaccoglibili] = 3;//<----------------------
- SetTimerEx("Pianta13", 20000, false, "i", playerid);}
- forward Pianta13(playerid);
- public Pianta13(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF664C00);
- Update3DTextLabelText(percentuale[playerid], DVERDE, "Attenzione, la pianta sta seccando!\n Puoi iniziare a raccogliere!(1 min. 20 sec.)\n 40%)");
- SemiInfo[playerid][nRaccoglibili] = 2;//<----------------------
- SetTimerEx("Pianta14", 20000, false, "i", playerid);}
- forward Pianta14(playerid);
- public Pianta14(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF543900);
- Update3DTextLabelText(percentuale[playerid], DVERDE, "Attenzione, la pianta sta seccando!\n Puoi iniziare a raccogliere!(1 min.)\n 60%");
- SemiInfo[playerid][nRaccoglibili] = 2;//<----------------------
- SetTimerEx("Pianta15", 20000, false, "i", playerid);}
- forward Pianta15(playerid);
- public Pianta15(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF442F02);
- Update3DTextLabelText(percentuale[playerid], DVERDE, "Attenzione, la pianta sta seccando!\n Puoi iniziare a raccogliere!(40 sec.)\n 80%");
- SemiInfo[playerid][nRaccoglibili] = 1;//<----------------------
- SetTimerEx("Pianta16", 20000, false, "i", playerid);}
- forward Pianta16(playerid);
- public Pianta16(playerid){
- SetDynamicObjectMaterial(SemiInfo[playerid][nPiantaF], 0, 19473, "grasshouse", "veg_marijuana", 0xFF382600);
- Update3DTextLabelText(percentuale[playerid], ROSSO, "Attenzione, la pianta è quasi completamente seccata!\n Non puoi più raccogliere.(20 sec.)\n 100%");
- SemiInfo[playerid][nRaccoglibili] = 0;//<----------------------
- SetTimerEx("Pianta17", 20000, false, "i", playerid);}
- //----FINE SECC.----//
- forward Pianta17(playerid);
- public Pianta17(playerid){
- DestroyDynamicObject(SemiInfo[playerid][nPiantaF]);
- SetTimerEx("DistruggiVaso", 2000, false, "i", playerid);
- Delete3DTextLabel(percentuale[playerid]);}
- forward DistruggiVaso(playerid);
- public DistruggiVaso(playerid){
- SemiInfo[playerid][nPiantati] = 0;
- DestroyDynamicObject(SemiInfo[playerid][nVaso]);}
- //3 minuti 180000 + 30 secondi 30000 = 210000 diviso 10 timer = 21000 tick (21 secondi)
- CMD:draccogli(playerid, params[]){
- if(PlayerInfo[playerid][pHashish] == 20) return SCM(playerid, ROSSO, "Possiedi già 20g di Hashish!");
- if(PlayerInfo[playerid][pCanapa] == 6) return SCM(playerid, ROSSO, "Possiedi già 6 ettogrammi di Canapa!");
- if(!IsPlayerInRangeOfPoint(playerid, 1.5, SemiInfo[playerid][nX], SemiInfo[playerid][nY], SemiInfo[playerid][nZ])){
- SCM(playerid, ROSSO, "Devi essere vicino ad una piantina raccoglibile!");}else{
- if(SemiInfo[playerid][nPiantati] == 1){
- if(SemiInfo[playerid][nRaccoglibili] == 0) return SCM(playerid, ROSSO, "Ancora non puoi raccogliere, attendi!");}
- //------------------------------------------//
- if(SemiInfo[playerid][nPiantati] == 1){
- if(SemiInfo[playerid][nRaccoglibili] == 1){
- PlayerInfo[playerid][pCanapa]++;}
- else if(SemiInfo[playerid][nRaccoglibili] == 2){
- PlayerInfo[playerid][pCanapa]++;
- PlayerInfo[playerid][pCanapa]++;}
- else if(SemiInfo[playerid][nRaccoglibili] == 3){
- PlayerInfo[playerid][pCanapa]++;
- PlayerInfo[playerid][pCanapa]++;
- PlayerInfo[playerid][pCanapa]++;}}
- SemiInfo[playerid][nRaccoglibili] = 0;
- SemiInfo[playerid][nPiantati] = 0;
- SetTimerEx("AnimazioneRaccogli", 2500, false, "i", playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);}
- return 1;}
- forward AnimazioneRaccogli(playerid);
- public AnimazioneRaccogli(playerid){
- ClearAnimations(playerid);
- DestroyDynamicObject(SemiInfo[playerid][nPiantaF]);
- Delete3DTextLabel(percentuale[playerid]);
- SetTimerEx("DistruzioneVaso", 2000, false, "i", playerid);}
- forward DistruzioneVaso(playerid);
- public DistruzioneVaso(playerid){
- DestroyDynamicObject(SemiInfo[playerid][nVaso]);}
- CMD:usadroga(playerid, params[]){
- new string[500];
- if(PlayerInfo[playerid][pHashish] == 0) return SCM(playerid, ROSSO, "Devi prima acquistare/produrre hashish!");
- if(PlayerInfo[playerid][pCartine] == 0) return SCM(playerid, ROSSO, "Devi comprare una cartina lunga!");
- if(PlayerInfo[playerid][pAccendino] == 0) return SCM(playerid, ROSSO, "Non possiedi un accendino!");
- if(!IsPlayerInAnyVehicle(playerid)){
- if(maschera[playerid] == 0){
- format(string, sizeof(string), "* %s inizia a sciogliere l'Hashish con un accendino per poi rollarlo nella cartina lunga insieme a del tabacco. *", RemoveUnderScore(playerid));
- ProxDetector(30.0, playerid, string, GIALLO,GIALLO,GIALLO,GIALLO,GIALLO);}
- else if(maschera[playerid] == 1){
- format(string, sizeof(string), "* Uomo Mascherato[ID:%d] inizia a sciogliere l'Hashish con un accendino per poi rollarlo nella cartina lunga. *", playerid);
- ProxDetector(30.0, playerid, string, GIALLO,GIALLO,GIALLO,GIALLO,GIALLO);}}
- if(IsPlayerInAnyVehicle(playerid)){
- if(maschera[playerid] == 0){
- format(string, sizeof(string), "* %s inizia a sciogliere l'Hashish con un accendino per poi rollarlo nella cartina lunga insieme a del tabacco. *", RemoveUnderScore(playerid));
- ProxDetector(30.0, playerid, string, GIALLO,GIALLO,GIALLO,GIALLO,GIALLO);}
- else if(maschera[playerid] == 1){
- format(string, sizeof(string), "* Uomo Mascherato[ID:%d] inizia a sciogliere l'Hashish con un accendino per poi rollarlo nella cartina lunga. *", playerid);
- ProxDetector(30.0, playerid, string, GIALLO,GIALLO,GIALLO,GIALLO,GIALLO);}}
- SCM(playerid, GIALLO, "Attendi 10 secondi...");
- SetTimerEx("Rolla", 10000, false, "i", playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 0, 0);
- PlayerInfo[playerid][pHashish]--;
- PlayerInfo[playerid][pCartine]--;
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
- fumando[playerid] = 1;
- SetTimerEx("FineH", 240000, false, "i", playerid);
- return 1;}
- forward Rolla(playerid);
- public Rolla(playerid){
- ClearAnimations(playerid);}
- forward FineH(playerid);
- public FineH(playerid){
- fumando[playerid] = 0;
- ClearAnimations(playerid);}
- CMD:dvendi(playerid, params[]){
- new id, grammi, prezzo, string1[128];
- if(PlayerInfo[playerid][pHashish] == 0) return SCM(playerid, ROSSO, "ERRORE: non possiedi Hashish!");
- if(sscanf(params, "udd", id, grammi, prezzo)) return SCM(playerid, ROSSO, "Utilizzo: /dvendi [ID] [Grammi] [Prezzo (da 300$ a 500$)]");
- if(id == playerid) return SCM(playerid, ROSSO, "ERRORE: non puoi venderti la droga!");
- if(id == INVALID_PLAYER_ID) return SCM(playerid, ROSSO, "ERRORE: Player/ID invalido!");
- if(grammi > PlayerInfo[playerid][pHashish]) return SCM(playerid, ROSSO, "ERRORE: non possiedi tutti questi grammi!");
- if(prezzo < 300 || prezzo > 500) return SCM(playerid, ROSSO, "ERRORE: il prezzo non è compreso tra 300$ e 500$!");
- format(string1, sizeof(string1), "%s vuole venderti %d g di Hashish a %d $. Fai /daccetta o /drifiuta.", playerid, grammi, prezzo);
- SCM(id, GIALLO, string1);
- SCM(playerid, GIALLO, "In attesa di una risposta...");
- CompraInfo[playerid][hRichiesta] = 1;
- return 1;}
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement