Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////
- // //
- // Favor não retirar os créditos! //
- // //
- // FILTERSCRIPT: Sistema de Colher Cocaina //
- // DATA: 9/08/2013 //
- // HORA: 19:00 //
- // VERSÃO: 1.0 //
- // CRIADOR: Caio_Freeze //
- // //
- // Favor não retirar os créditos! //
- // //
- ////////////////////////////////////////////////////////
- #include <a_samp>
- #include <zcmd>
- #define COLOR_RED 0xFF0000FF
- enum PlayerData
- {
- FolhadeCoca,
- Cocaina
- }
- new PlayerInfo[MAX_PLAYERS][PlayerData];
- new TempoFabricar;
- new TempoColher;
- new bool:ColhendoFolha[MAX_PLAYERS];
- new bool:FabricandoCoca[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- CreateObject(3409, -1630.69995, -2250.80005, 30.3, 0, 4, 92);
- CreateObject(3409, -1635.69995, -2251.30005, 30.3, 0, 4, 92);
- CreateObject(1594, -1633.5, -2235.69995, 31, 0, 0, 0);
- CreateObject(1494, -1638.09998, -2240, 30.5, 0, 0, 90);
- CreateObject(3261, -1637, -2224.8999, 29.6, 0, 0, 86);
- CreateObject(3261, -1634, -2225.1001, 29.5, 0, 0, 85.995);
- CreateObject(3261, -1631, -2225.2998, 29.4, 0, 0, 86);
- CreateObject(822, -1688.38965, -2222.04395, 39.53904, 0, 0, 0);
- CreateObject(859, -1581.81738, -2227.34863, 25.90131, 0, 0, 0);
- CreateObject(17324, -1644.5, -2273.1001, 34.4, 0, 358, 266);
- CreateObject(1279, -1628.90002, -2235.80005, 30.9, 0, 292, 0);
- CreateObject(1279, -1629, -2234.6001, 30.9, 0, 291.995, 0);
- CreateObject(1279, -1629, -2235.19922, 30.9, 0, 291.995, 0);
- CreateObject(1279, -1628.89941, -2232.59961, 30.9, 0, 291.995, 0);
- CreateObject(1279, -1628.80005, -2233.69995, 30.9, 0, 295.995, 0);
- CreateObject(1279, -1628.89941, -2233.19922, 30.9, 0, 295.994, 0);
- CreateObject(1575, -1633.5, -2235.5, 31.4, 0, 0, 354);
- CreateObject(1744, -1628.19995, -2245.69995, 32.4, 0, 0, 274);
- CreateObject(1744, -1628.19995, -2246.30005, 31.6, 0, 0, 273.999);
- CreateObject(1744, -1628.19995, -2246.30005, 30.8, 0, 0, 273.999);
- CreateObject(1744, -1628.30005, -2244.1001, 30.8, 0, 0, 273.999);
- CreateObject(1744, -1628.30005, -2243.8999, 31.5, 0, 0, 273.999);
- CreateObject(1744, -1628.40002, -2241.8999, 32.9, 0, 0, 273.999);
- CreateObject(1744, -1628.19995, -2245.6001, 33, 0, 0, 273.999);
- CreateObject(1744, -1628.40002, -2241.8999, 32.2, 0, 0, 273.999);
- CreateObject(1744, -1628.40002, -2241.80005, 31.5, 0, 0, 273.999);
- CreateObject(1744, -1628.40002, -2241.80005, 30.8, 0, 0, 273.999);
- CreateObject(1744, -1630.19995, -2247.80005, 31.5, 0, 0, 181.998);
- CreateObject(1744, -1630.19995, -2247.80005, 30.8, 0, 0, 181.994);
- CreateObject(1744, -1632.40002, -2247.8999, 30.8, 0, 0, 181.994);
- CreateObject(1744, -1632.40002, -2247.8999, 31.5, 0, 0, 181.994);
- CreateObject(1744, -1632, -2247.8999, 32.6, 0, 0, 181.994);
- CreateObject(1744, -1632, -2247.8999, 32, 0, 0, 181.994);
- CreateObject(1578, -1628.40002, -2242.80005, 32.1, 0, 286, 350);
- CreateObject(1578, -1628.39941, -2242.69922, 32.8, 0, 285.996, 349.997);
- CreateObject(1578, -1628.40002, -2242.1001, 32, 0, 285.996, 349.997);
- CreateObject(1578, -1628.40002, -2242.1001, 32.8, 0, 285.996, 349.997);
- CreateObject(1578, -1628.40002, -2242.80005, 31.4, 0, 285.996, 349.997);
- CreateObject(1578, -1628.40002, -2242.3999, 31.4, 0, 285.996, 349.997);
- CreateObject(1578, -1628.40002, -2242, 31.4, 0, 285.996, 349.997);
- CreateObject(1578, -1628.40002, -2241.6001, 31.4, 0, 285.996, 349.997);
- CreateObject(1578, -1628.40002, -2241.69995, 32, 0, 285.996, 349.997);
- CreateObject(1578, -1628.5, -2243.8999, 31.3, 0, 285.996, 349.997);
- CreateObject(745, -1654.5, -2265.1001, 33.3, 0, 0, 0);
- CreateObject(745, -1649.59998, -2265.1001, 32.6, 0, 0, 0);
- CreateObject(745, -1644.59998, -2265.80005, 32.5, 0, 0, 0);
- CreateObject(745, -1640.80005, -2265.69995, 32.6, 0, 0, 0);
- CreateObject(745, -1637.19995, -2266.5, 33, 0, 0, 0);
- CreateObject(745, -1632.30005, -2267.3999, 33.4, 0, 0, 0);
- Create3DTextLabel("Use /Colher para colher\n folhas de Erythroxylon",-1,-1633.425781,-2250.841796,31.350025,40,0,0);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(TempoColher);
- KillTimer(TempoFabricar);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- KillTimer(TempoColher);
- KillTimer(TempoFabricar);
- return 1;
- }
- forward Colheu(playerid);
- public Colheu(playerid)
- {
- ClearAnimations(playerid);
- ColhendoFolha[playerid] = false;
- PlayerInfo[playerid][FolhadeCoca] = 1;
- TogglePlayerControllable(playerid,1);
- SendClientMessage(playerid, 0xFFFF00FF, "Você terminou de colher a folha de Erythroxylon");
- SendClientMessage(playerid, 0xFFFF00FF, "Entre na casa e use /fabricarcocaina");
- return 1;
- }
- forward Fabricou(playerid);
- public Fabricou(playerid)
- {
- FabricandoCoca[playerid] = false;
- PlayerInfo[playerid][Cocaina] += 25;
- TogglePlayerControllable(playerid,1);
- SendClientMessage(playerid, -1, "Boa, você fabricou 25g de cocaina agora vá ganhar seu dinheiro!");
- return 1;
- }
- //=================================[ Comandos ]===============================//
- CMD:colher(playerid, params[])
- {
- if(PlayerEstaColhendo(playerid))
- {
- if(ColhendoFolha[playerid] == true)
- {
- SendClientMessage(playerid, COLOR_RED, "Você já está colhendo.");
- return true;
- }
- TogglePlayerControllable(playerid,0);
- ColhendoFolha[playerid] = true;
- ApplyAnimation(playerid, "BOMBER","BOM_Plant",4.0,1,0,0,1,0);
- SendClientMessage(playerid,-1,"Espere 30 segundos para colher a folha de Erythroxylon.");
- TempoColher = SetTimerEx("Colheu", 30000, 0, "i", playerid);
- }
- else return SendClientMessage(playerid, COLOR_RED, "Você não está no local de colher Erythroxylon.");
- return true;
- }
- CMD:ircolher(playerid, params[])
- {
- SetPlayerPos(playerid,-1654.0542,-2240.1521,31.2225);
- return 1;
- }
- CMD:fabricarcocaina(playerid, params[])
- {
- if(PlayerEstaFabricando(playerid))
- {
- if(FabricandoCoca[playerid] == true)
- {
- SendClientMessage(playerid, COLOR_RED, "Você já está fabricando cocaina.");
- return true;
- }
- if(PlayerInfo[playerid][FolhadeCoca] == 1)
- {
- FabricandoCoca[playerid] = true;
- PlayerInfo[playerid][FolhadeCoca] = 0;
- TogglePlayerControllable(playerid,0);
- SendClientMessage(playerid,-1,"Espere 1 min e meio para fabricar a cocaina.");
- TempoFabricar = SetTimerEx("Fabricou", 60500, 0, "i", playerid);
- }
- else return SendClientMessage(playerid, 0xFFFFFFAA, "Voce nao tem a folha de Erythroxylon.");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Você não está no local de fabricar cocaina.");
- return 1;
- }
- CMD:bolso(playerid, params[])
- {
- new string[128];
- SendClientMessage(playerid, -1,"================================");
- format(string, 128, "Cocaina [%dg] Erythroxylon [%d]", PlayerInfo[playerid][Cocaina], PlayerInfo[playerid][FolhadeCoca]);
- SendClientMessage(playerid,0xFF8000FF, string);
- SendClientMessage(playerid, -1,"================================");
- return 1;
- }
- //=============================[ Fim dos Comandos ]===========================//
- stock PlayerEstaFabricando(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1632.7889,-2236.5220,31.4766)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1632.7889,-2236.5220,31.4766)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1634.2389,-2234.9385,31.4766)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1634.2129,-2236.5269,31.4766)) return 1;
- else return 0;
- }
- stock PlayerEstaColhendo(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1635.7333,-2251.0403,31.3931)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1635.7020,-2249.7278,31.2539)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1635.6799,-2252.1187,31.5068)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1637.2008,-2252.4280,31.5541)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1637.0664,-2251.1914,31.4219)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1637.3744,-2249.8081,31.2784)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1634.3784,-2249.8218,31.2512)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1634.1462,-2250.9580,31.3692)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1633.8936,-2252.0212,31.4793)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1632.2897,-2252.2939,31.4928)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1632.0349,-2250.9780,31.3511)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1632.3875,-2249.4614,31.1878)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1630.7635,-2249.5032,31.1634)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1630.7695,-2250.6357,31.2933)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1630.5670,-2252.1421,31.4622)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1628.9529,-2250.7830,31.2775)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1629.2793,-2249.4817,31.1343)) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1629.3588,-2251.8591,31.4081)) return 1;
- else return 0;
- }
- ////////////////////////////////////////////////////////
- // //
- // Favor não retirar os créditos! //
- // //
- // FILTERSCRIPT: Sistema de Colher Cocaina //
- // DATA: 9/08/2013 //
- // HORA: 19:00 //
- // VERSÃO: 1.0 //
- // CRIADOR: Caio_Freeze //
- // //
- // Favor não retirar os créditos! //
- // //
- ////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement