Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <YSI\y_ini>
- #include <YSI\y_hooks>
- #include "../include/gl_common.inc"
- #include <zcmd>
- #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 Text3D:percentuale[MAX_PLAYERS];
- new Text3D:C_progresso[MAX_PLAYERS];
- new fumando[MAX_PLAYERS] = 0;
- enum nInfo
- {
- nPiantaF,
- nPiantaI,
- Float:nX,
- Float:nY,
- Float:nZ,
- nVaso,
- nPiantati,
- nRaccoglibili
- }
- new SemiInfo[MAX_PLAYERS][nInfo];
- enum pInfo
- {
- pSoldi,
- pSemini,//droga
- pCanapa,//droga
- pHashish,//droga
- pAccendino,//droga
- pCartine,//droga
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- #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
- 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);
- return 1;
- }
- /*CMD:dvendi(playerid, params[]){
- new id;
- SetPVarInt(playerid, "u", id);
- if(sscanf(params, "u", id)){
- new Float:X, FLoat:Y, Float:Z;
- GetPlayerPos(GetPVarInt(playerid, "u"), X, Y, Z);
- if(!IsPlayerInRangeOfPoint(playerid, 4.0, X, Y, Z)) return SCM(playerid, ROSSO, "Devi essere vicino al Player!");
- ShowPlayerDialog(playerid, DIALOG_VENDIH, DIALOG_STYLE_INPUT, ""COL_TITLES"Vendi Droga","Inserisci i parametri seguendo l'ordine:\n[Prezzo (da 300$ a 500$)] [Grammi]\n Esempio: 350 2","Vendi","Annulla");
- if(id == INVALID_PLAYER_ID) return ShowPlayerDialog(playerid, DIALOG_VENDIH, DIALOG_STYLE_INPUT, ""COL_TITLES"Vendi Droga",""COL_ROSSO"ID/NOME player invalido.\n "COL_AZZU"Reinserisci correttamente i parametri seguendo l'ordine:\n [Prezzo (da 300$ a 500$)] [Grammi]","Vendi","Annulla");
- if(id == playerid) return ShowPlayerDialog(playerid, DIALOG_VENDIH, DIALOG_STYLE_INPUT, ""COL_TITLES"Vendi Droga",""COL_ROSSO"Non puoi venderti la droga!\n "COL_AZZU"Reinserisci correttamente i parametri seguendo l'ordine:\n [Prezzo (da 300$ a 500$)] [Grammi]","Vendi","Annulla");
- SetPVarInt(playerid, "id", id);
- }else{ SCM(playerid, ROSSO, "Utilizzo:/dvendi [ID]");}
- return 1;}*/
- 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] = CreateObject(19473, SemiInfo[playerid][nX], SemiInfo[playerid][nY]-0.6000, SemiInfo[playerid][nZ]-2.6119, 0.0, 0.0, 0.0, 0);
- SemiInfo[playerid][nVaso] = CreateObject(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] = CreateObject(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){
- MoveObject(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){
- MoveObject(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){
- MoveObject(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){
- MoveObject(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){
- DestroyObject(SemiInfo[playerid][nPiantaI]);
- SemiInfo[playerid][nPiantaF] = CreateObject(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){
- DestroyObject(SemiInfo[playerid][nPiantaF]);
- SetTimerEx("DistruggiVaso", 2000, false, "i", playerid);
- Delete3DTextLabel(percentuale[playerid]);}
- forward DistruggiVaso(playerid);
- public DistruggiVaso(playerid){
- SemiInfo[playerid][nPiantati] = 0;
- DestroyObject(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);
- DestroyObject(SemiInfo[playerid][nPiantaF]);
- Delete3DTextLabel(percentuale[playerid]);
- SetTimerEx("DistruzioneVaso", 2000, false, "i", playerid);}
- forward DistruzioneVaso(playerid);
- public DistruzioneVaso(playerid){
- DestroyObject(SemiInfo[playerid][nVaso]);}
- CMD:usadroga(playerid, params[]){
- new stringg[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(stringg, 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);}
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- 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);}
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_VENDIH){
- if(response)
- new prezzo, grammi, string[500];
- if(sscanf(inputtext, "dd", prezzo, grammi))
- if(prezzo < 300 || prezzo > 500) return ShowPlayerDialog(playerid, DIALOG_VENDIH, DIALOG_STYLE_INPUT, ""COL_TITLES"Vendi Droga",""COL_ROSSO"Il prezzo deve essere compreso tra i 300$ e i 500$!\n "COL_AZZU"Reinserisci correttamente i parametri seguendo l'ordine:\n [Prezzo] [Grammi]","Vendi","Annulla");
- if(PlayerInfo[playerid][pHashish] < grammi) return ShowPlayerDialog(playerid, DIALOG_VENDIH, DIALOG_STYLE_INPUT, ""COL_TITLES"Vendi Droga",""COL_ROSSO"Non possiedi tutti questi grammi!\n "COL_AZZU"Reinserisci correttamente i parametri seguendo l'ordine:\n [Prezzo] [Grammi]","Vendi","Annulla");
- format(string(sizeof(string), "%s vuole venderti %d g di Hashish a %d $.\n Vuoi acquistare?", playerid, grammi, prezzo));
- ShowPlayerDialog(GetPVarInt(playerid, "id"), DIALOG_COMPRAH, DIALOG_STYLE_MSGBOX, ""COL_TITLES"Compra Droga", string, "Compra", "Rifiuta");
- SCM(playerid, GIALLO, "In attesa di una risposta...");}
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement