Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Filterscript generated using Zamaroht's TextDraw Editor Version 1.0.
- Designed for SA-MP 0.3a.
- Time and Date: 2012-9-13 @ 10:54:58
- Instructions:
- 1- Compile this file using the compiler provided with the sa-mp server package.
- 2- Copy the .amx file to the filterscripts directory.
- 3- Add the filterscripts in the server.cfg file (more info here:
- http://wiki.sa-mp.com/wiki/Server.cfg)
- 4- Run the server!
- Disclaimer:
- You have full rights over this file. You can distribute it, modify it, and
- change it as much as you want, without having to give any special credits.
- */
- #include <a_samp>
- #include <zcmd>
- #include <streamer>
- #include <DOF2>
- #define DIALOGID1 1
- #define DIALOGID2 2
- #define DIALOGID3 3
- #define DIALOGID4 4
- #define DIALOGID5 5
- new Text:Textdraw0,
- Text:Textdraw1,
- PlayerText:Textdraw2[MAX_PLAYERS],
- PlayerText:Textdraw3[MAX_PLAYERS],
- PlayerText:Textdraw4[MAX_PLAYERS],
- PlayerText:Textdraw5[MAX_PLAYERS],
- Maconha[MAX_PLAYERS],
- Cocaina[MAX_PLAYERS],
- Crack[MAX_PLAYERS],
- Drogass[MAX_PLAYERS],
- pname[50],
- Erv[8]
- ;
- forward Drogas(playerid);
- public OnFilterScriptInit()
- {
- Textdraw0 = TextDrawCreate(529.000000, 309.000000, ".");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 1);
- TextDrawLetterSize(Textdraw0, 0.000000, 9.000000);
- TextDrawColor(Textdraw0, -1);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawSetProportional(Textdraw0, 1);
- TextDrawSetShadow(Textdraw0, 1);
- TextDrawUseBox(Textdraw0, 1);
- TextDrawBoxColor(Textdraw0, 2949220);
- TextDrawTextSize(Textdraw0, 630.000000, 0.000000);
- Textdraw1 = TextDrawCreate(540.000000, 310.000000, "~>~Drogas~<~");
- TextDrawBackgroundColor(Textdraw1, 255);
- TextDrawFont(Textdraw1, 1);
- TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
- TextDrawColor(Textdraw1, -1);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawSetProportional(Textdraw1, 1);
- TextDrawSetShadow(Textdraw1, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- Textdraw2[playerid] = CreatePlayerTextDraw(playerid,530.000000, 330.000000, "_");
- PlayerTextDrawBackgroundColor(playerid,Textdraw2[playerid], 255);
- PlayerTextDrawFont(playerid,Textdraw2[playerid], 1);
- PlayerTextDrawLetterSize(playerid,Textdraw2[playerid], 0.500000, 1.000000);
- PlayerTextDrawColor(playerid,Textdraw2[playerid], -1);
- PlayerTextDrawSetOutline(playerid,Textdraw2[playerid], 0);
- PlayerTextDrawSetProportional(playerid,Textdraw2[playerid], 1);
- PlayerTextDrawSetShadow(playerid,Textdraw2[playerid], 1);
- PlayerTextDrawShow(playerid, Textdraw2[playerid]);
- Textdraw3[playerid] = CreatePlayerTextDraw(playerid,530.000000, 344.000000, "_");
- PlayerTextDrawBackgroundColor(playerid,Textdraw3[playerid], 255);
- PlayerTextDrawFont(playerid,Textdraw3[playerid], 1);
- PlayerTextDrawLetterSize(playerid,Textdraw3[playerid], 0.500000, 1.000000);
- PlayerTextDrawColor(playerid,Textdraw3[playerid], -1);
- PlayerTextDrawSetOutline(playerid,Textdraw3[playerid], 0);
- PlayerTextDrawSetProportional(playerid,Textdraw3[playerid], 1);
- PlayerTextDrawSetShadow(playerid,Textdraw3[playerid], 1);
- PlayerTextDrawShow(playerid, Textdraw3[playerid]);
- Textdraw4[playerid] = CreatePlayerTextDraw(playerid,530.000000, 360.000000, "_");
- PlayerTextDrawBackgroundColor(playerid,Textdraw4[playerid], 255);
- PlayerTextDrawFont(playerid,Textdraw4[playerid], 1);
- PlayerTextDrawLetterSize(playerid,Textdraw4[playerid], 0.500000, 1.000000);
- PlayerTextDrawColor(playerid,Textdraw4[playerid], -1);
- PlayerTextDrawSetOutline(playerid,Textdraw4[playerid], 0);
- PlayerTextDrawSetProportional(playerid,Textdraw4[playerid], 1);
- PlayerTextDrawSetShadow(playerid,Textdraw4[playerid], 1);
- PlayerTextDrawShow(playerid, Textdraw4[playerid]);
- Drogas(playerid);
- Textdraw5[playerid] = CreatePlayerTextDraw(playerid,529.000000, 379.000000, "_");
- PlayerTextDrawBackgroundColor(playerid,Textdraw5[playerid], 255);
- PlayerTextDrawFont(playerid,Textdraw5[playerid], 1);
- PlayerTextDrawLetterSize(playerid,Textdraw5[playerid], 0.429999, 0.800000);
- PlayerTextDrawColor(playerid,Textdraw5[playerid], -1);
- PlayerTextDrawSetOutline(playerid,Textdraw5[playerid], 0);
- PlayerTextDrawSetProportional(playerid,Textdraw5[playerid], 1);
- PlayerTextDrawSetShadow(playerid,Textdraw5[playerid], 1);
- PlayerTextDrawShow(playerid, Textdraw5[playerid]);
- Drogas(playerid);
- return 1;
- }
- public Drogas(playerid)
- {
- new Viciado[100],string[100];
- if(Drogass[playerid] == 0) Viciado = "Suave";
- if(Drogass[playerid] == 1) Viciado = "Razuavel";
- if(Drogass[playerid] == 2) Viciado = "zonzo";
- if(Drogass[playerid] == 3) Viciado = "Doido";
- if(Drogass[playerid] == 4) Viciado = "Noia";
- if(Drogass[playerid] >= 5) Viciado = "Alucinado";
- format(string,sizeof(string),"~r~ Maconha: ~w~%d",Maconha[playerid]);
- PlayerTextDrawSetString(playerid, Textdraw2[playerid],string);
- format(string,sizeof(string), "~r~ Crack:~w~%d",Crack[playerid]);
- PlayerTextDrawSetString(playerid, Textdraw4[playerid], string);
- format(string,sizeof(string), "~r~ Cocaina:~w~%d",Cocaina[playerid]);
- PlayerTextDrawSetString(playerid, Textdraw3[playerid], string);
- format(string,sizeof(string), "~r~Vicio: ~w~%s",Viciado);
- PlayerTextDrawSetString(playerid, Textdraw5[playerid], string);
- return 1;
- }
- CMD:drogas(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOGID1,DIALOG_STYLE_LIST, "DROGAS","Comprar Drogas\nUsar Drogas\nPlantar Erva","","");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOGID1){
- if(response){
- switch(listitem){
- case 0:{ShowPlayerDialog(playerid, 2,DIALOG_STYLE_LIST, "Selecione A Droga","Cocaina\nMaconha\nCrack","Comprar","Cancelar");}
- case 1:{ShowPlayerDialog(playerid, 3,DIALOG_STYLE_LIST, "Selecione Sua Intorpecente","Cocaina\nMaconha\nCrack","Usar","Cancelar");}
- case 2:{
- SetPlayerPos(playerid, -376.5437,110.3776,14.9388);
- SendClientMessage(playerid, 0xFFCCFF, "Use:/Plantar || /Colher");
- }
- }
- }
- }
- if(dialogid == 2){
- if(response){
- switch(listitem){
- case 0:{
- new string[100];
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]: O Traficante %s Comprou uma Farinha Da Boa",pname);
- SendClientMessage(playerid, 0xFFFFCC, string);
- Cocaina[playerid]++;
- Drogas(playerid);
- }
- case 1:{
- new string[100];
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]: O Traficante %s Comprou uma Maconha Da Boa",pname);
- SendClientMessage(playerid, 0xFFFFCC, string);
- Maconha[playerid]++;
- Drogas(playerid);
- }
- case 2:{
- new string[100];
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]: O Traficante %s Comprou uma Pedra De Crack",pname);
- SendClientMessage(playerid, 0xFFFFCC, string);
- Crack[playerid]++;
- Drogas(playerid);
- }
- }
- }
- }
- if(dialogid == 3){
- if(response){
- switch(listitem){
- case 0:{
- new string[100];
- if(Cocaina[playerid] == 0) return SendClientMessage(playerid, -1, "Erro: Voce Não Tem Cocaina Para Cheira!");
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]: O Usuario %s Acabou De Usa Chera Cocaina Cuidado ",pname);
- SendClientMessage(playerid, 0xFFFFCC, string);
- Drogass[playerid]++;
- Cocaina[playerid]--;
- Drogas(playerid);
- }
- case 1:{
- new string[100];
- if(Maconha[playerid] == 0) return SendClientMessage(playerid, -1, "Erro: Voce Não Tem Maconha Para Fica Doidão");
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]: O Usuario %s Acabou De Fuma um Beck do Baum",pname);
- SendClientMessage(playerid, 0xFFFFCC, string);
- ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
- Drogass[playerid]++;
- Maconha[playerid]--;
- Drogas(playerid);
- }
- case 2:{
- new string[100];
- if(Crack[playerid] == 0) return SendClientMessage(playerid, -1, "Erro: Voce Não Tem Pedra De Crack Pra Usa");
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]: O Usuario %s Acabou De Usa um Crack Como e Bom Ser Vida Loka ",pname);
- SendClientMessage(playerid, 0xFFFFCC, string);
- ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- Drogass[playerid]++;
- Crack[playerid]--;
- Drogas(playerid);
- }
- }
- }
- }
- return 1;
- }
- CMD:plantar(playerid)
- {
- new string[100];
- Erv[0] = CreateDynamicObject(3409,-341.09130859,138.72921753,7.04942703,352.00000000,0.00000000,344.00000000); //object(grassplant) (1)
- Erv[1] = CreateDynamicObject(3409,-333.84725952,136.82508850,6.31399918,351.99645996,0.00000000,343.99841309); //object(grassplant) (2)
- Erv[2] = CreateDynamicObject(3409,-327.50488281,134.96852112,5.69084930,351.99645996,0.00000000,343.99841309); //object(grassplant) (3)
- Erv[3] = CreateDynamicObject(3409,-320.55874634,132.23471069,5.09584999,351.99645996,0.00000000,343.99841309); //object(grassplant) (4)
- Erv[4] = CreateDynamicObject(3409,-342.51849365,133.89282227,7.84910393,351.99645996,0.00000000,343.99841309); //object(grassplant) (5)
- Erv[5] = CreateDynamicObject(3409,-335.21917725,131.63703918,7.14680481,351.99645996,0.00000000,343.99841309); //object(grassplant) (6)
- Erv[6] = CreateDynamicObject(3409,-328.84869385,129.94403076,6.49943542,351.99645996,0.00000000,343.99841309); //object(grassplant) (7)
- Erv[7] = CreateDynamicObject(3409,-321.58294678,127.32243347,5.84734344,351.99645996,0.00000000,343.99841309); //object(grassplant) (8)
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]:Trafico Pesado %s Fez uma Orta De Maconha",pname);
- SendClientMessageToAll(0xFFFFAA, string);
- SendClientMessage(playerid, 0xFFCCAA, "Voce Plantou Muita Maconha Da Boa hum Como E Bom Ser vida Loka");
- return 1;
- }
- CMD:colher(playerid)
- {
- new string[100];
- DestroyDynamicObject(Erv[0]); //object(grassplant) (1)
- DestroyDynamicObject(Erv[1]); //object(grassplant) (1)
- DestroyDynamicObject(Erv[2]); //object(grassplant) (1)
- DestroyDynamicObject(Erv[3]); //object(grassplant) (1)
- DestroyDynamicObject(Erv[4]); //object(grassplant) (1)
- DestroyDynamicObject(Erv[5]); //object(grassplant) (1)
- DestroyDynamicObject(Erv[6]); //object(grassplant) (1)
- DestroyDynamicObject(Erv[7]); //object(grassplant) (1)
- GetPlayerName(playerid, pname,25);
- format(string,sizeof(string), "[DROGAS]:Trafico Pesado %s Fez a Colheta Da Orta De Maconha",pname);
- SendClientMessage(playerid, 0xFFCCAA, "Voce Colheu Todas As Ervas");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment