Код:
//___________________________________INCLUDES POR JHOWROB_______________________
#include a_samp
#include <zcmd>
//___________________________________DUVIDO TIRA MEU NOME :D____________________
//___________________________________DEFINE OBJETOS_____________________________
#define Slot_Pa 2
#define Slot_Maconha 1
//___________________________________JHOWROB____________________________________
#define JHOWROBBBB::%0(%1) forward %0(%1);\
public %0(%1)
#define JhowRob 9999
//____________________________________CORES_____________________________________
#define COR_BRANCA 0xFFFFFFAA
//___________________________________NEWS_______________________________________
new sendername[MAX_PLAYER_NAME];
new maconhajhow[MAX_PLAYERS],
RegarDroga[MAX_PLAYERS],
Plantou[MAX_PLAYERS],
MaconhaMadura[MAX_PLAYERS],
Regadordemaconha[MAX_PLAYERS],
PlantaOBJETO[MAX_PLAYERS],
Float:jhowrobobjetoplanta[3]
;
enum minfo
{
Text3D:TT,
Dono[MAX_PLAYER_NAME],
emprego,
bool:PodeUsar
}
new MaconhaInfo[minfo];
public OnPlayerConnect(playerid)
{
//SETA O PLAY COM O EMPREGO
//FIM
AddStaticPickup(1279, 2, 1617.9478,-1555.7501,13.5781, 0); //PICKUP DROGA
AddStaticPickup(1279, 2, 1809.3533,-1807.5638,3.9844, 0); //PICKUP PEGAR O EMPREGO
Create3DTextLabel("{87CEFA}MERCARDO NEGRO!\n{FFD700}Semente: Maconha.\n/comprarsemente\n{FFD700}Regador: /comprarregador", 0x008080FF, 1617.9478,-1555.7501,13.5781, 15.0, 0, 0);//MENSAGEM DO MERCARDO NEGRO:D
Create3DTextLabel("{87CEFA}EMPREGO!\n{FFD700}Vendendo de Maconha.\n/pegaremprego", 0x008080FF, 1809.3533,-1807.5638,3.9844, 15.0, 0, 0);//PEGAREMPREGO
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
CMD:pegaremprego(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1809.3533,-1807.5638,3.9844))
{
SendClientMessage(playerid,COR_BRANCA,"Vocк Pegou o emprego de vendendo de MACONHA");
MaconhaInfo[emprego] = 1;
return true;
}
return 1;
}
//COMPRAR SEMENTE POR JHOWROB
CMD:comprarsemente(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1617.9478,-1555.7501,13.5781))
{
if(MaconhaInfo[emprego] == 0) return SendClientMessage(playerid,COR_BRANCA,"Vocк nгo tem emprego de vendendo de maconha");
if(maconhajhow[playerid] == 1) return SendClientMessage(playerid,-1,"Vocк ja tem uma {FF0000}MACONHA");
SendClientMessage(playerid,COR_BRANCA,"Vocк Comprou Maconha no MERCADO NEGRO \nGastou 200R$");
SendClientMessage(playerid,COR_BRANCA,"Digite /plantarmaconha para plantar a sua");
maconhajhow[playerid] = 1;
GivePlayerMoney(playerid,-200);
return true;
}
return 1;
}
//PLANTAR A ARVORE
CMD:plantarmaconha(playerid)
{
if(GetPlayerInterior(playerid) > 0 || IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COR_BRANCA, "Vocк nгo pode plantar maconha agora!");
if(MaconhaInfo[emprego] == 0) return SendClientMessage(playerid,COR_BRANCA,"Vocк nгo tem emprego de vendendo de maconha");
if(maconhajhow[playerid] == 0) return SendClientMessage(playerid,COR_BRANCA,"Vocк nгo tem nenhuma semente de maconha vб ao mercardo negro e compre uma{FF0000} /comprarsemente");
if(Plantou[playerid]==1) return SendClientMessage(playerid,0xFF750B65,"Vocк ja Plantou uma semente.");
if(GetPlayerSpeedEx(playerid) > 1)
return SendClientMessage(playerid, COR_BRANCA, "Vocк precisa estar parado para plantar a semente");
if(IsPlayerInRC(playerid))
return SendClientMessage(playerid, COR_BRANCA, " Vocк nгo pode plantar maconha em areas neutras!");
SendClientMessage(playerid,COR_BRANCA,"Use: {FF0000}/regar");
SendClientMessage(playerid,COR_BRANCA,"Ela passarб por 4 fases atй chegar a fase adulta.");
ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",2.0,1,0,0,0,0);
SetTimerEx("AnimatioN", 500, false, "i", playerid);
SetPlayerAttachedObject(playerid,Slot_Pa,337,6,0.097999,0.076999,0.011000,172.699859,-4.799996,89.199981,1.000000,0.629000,0.678000);
SetTimerEx("plantando", 3000, false, "i", playerid);
Plantou[playerid]=1;
new string[128];
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), "* %s estб plantando uma semente de maconha!", sendername);
return true;
}
CMD:regar(playerid)
{
if(maconhajhow[playerid]==0) return SendClientMessage(playerid,-1,"Vocк nгo tem uma plantaзгo de maconha para regar, adquira uma no MERCADO NEGRO {FF0000}/comprarsemente");
if(Regadordemaconha[playerid]==0) return SendClientMessage(playerid,-1,"Voce nгo tem um regador vб ao MERCADO NEGRO e digite /comprarregador para adquirir");
if(RegarDroga[playerid]==1) return SendClientMessage(playerid,-1,"Vocк ja regou a semente de maconha.");
ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",2.0,1,0,0,0,0);
SetTimerEx("AnimatioN", 500, false, "i", playerid);
SetTimerEx("regandoa", 3000, false, "i", playerid);
SendClientMessage(playerid,-1,"Vocк regou sua Plantaзгo");
RegarDroga[playerid] =1;
return true;
}
CMD:comprarregador(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1617.9478,-1555.7501,13.5781))
{
SendClientMessage(playerid,-1,"Vocк comprou um regador isso lhe custou 20 r$");
Regadordemaconha[playerid]=1;
GivePlayerMoney(playerid,-20);
return true;
}
return 1;
}
CMD:ajudamaconha(playerid)
{
//NВO REMOVE OS CREDITOS FILHA DA MAE PASSEI 2 DIAS TRAVANDO FAZENDO ISSO Kkkk
new
jhowrobb[1000]
;
format(jhowrobb, sizeof(jhowrobb), "{FFFFFF}Jogador, Nome: %s o Sistema foi feito por Joгo Parnaiba(JHOWROB) Aproveite bom jogo :D\n Comandos\n/comprarregador, /comprarsemente /plantarmaconha /colhermaconha\n/sistema de queimar maconha foi Ativo ", sendername);
ShowPlayerDialog(playerid, JhowRob, DIALOG_STYLE_MSGBOX, " {FFFFFF}[ AJUDA MACONHA ] ", jhowrobb, "Fechar", "");
return 1;
}
//TEST
CMD:queimarmaconha(playerid)
{
if(Plantou[playerid]==1) return SendClientMessage(playerid,0xFF750B65,"Maconha ainda nгo estar MADURA");
if(IsPlayerInRangeOfPoint(playerid, 3.0, jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]))
{
ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",2.0,1,0,0,0,0);
SetTimerEx("AnimatioN", 100, false, "i", playerid);
SetTimerEx("MaconhaQueimar", 17000, false, "i", playerid);
new string[128];
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), "* Jogador %s estб queimando uma plantaзгo de maconha!", sendername);
return true;
}
return 1;
}
//STOCK QUEIMAR 2
JHOWROBBBB::MaconhaQueimar(playerid)
{
SetTimerEx("MaconhaQueimar2", 17000, false, "i", playerid);
ClearAnimations(playerid);
SendClientMessage(playerid, COR_BRANCA, "Saia de perto, a plantaзгo irб queimar...");
return true;
}
JHOWROBBBB::MaconhaQueimar2(playerid)
{
new gstring[128];
format(gstring, sizeof gstring, "O Jogador: %s queimou uma plantaзгo de maconha.",sendername);
SendClientMessageToAll(COR_BRANCA, gstring);
DestroyObject(PlantaOBJETO[playerid]);
Delete3DTextLabel(MaconhaInfo[TT]);
CreateExplosion(jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2], 10, 1.0);
ClearAnimations(playerid);
Plantou[playerid] = 0;
maconhajhow[playerid] = 0;
MaconhaMadura[playerid]= 0;
return true;
}
//STOCK COLHER
JHOWROBBBB::MaconhaColher(playerid, slt)
{
GetPlayerPos(playerid,jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]);
maconhajhow[playerid]=0;
MaconhaMadura[playerid]=0;
DestroyObject(PlantaOBJETO[playerid]);
GivePlayerMoney(playerid,150);
ClearAnimations(playerid);
RemovePlayerAttachedObject(playerid, Slot_Pa);
Delete3DTextLabel(MaconhaInfo[TT]);
SetPlayerAttachedObject(playerid,Slot_Maconha,2901,1,0.028999,-0.207999,-0.054999,2.300004,176.100006,-1.300000,0.489999,0.528999,0.575000);
return true;
}
CMD:colher(playerid)
{
if(maconhajhow[playerid]==0) return SendClientMessage(playerid,-1,"Vocк nгo tem uma plantaзгo de maconha para colher, adquira uma no MERCADO NEGRO {FF0000}/comprarsemente");
if(strcmp(MaconhaInfo[Dono], sendername[playerid], true) == 0)
{
if(Plantou[playerid]==1) return SendClientMessage(playerid,0xFF750B65,"Vocк estar Plantando ou Colhendo uma semente.");
if(IsPlayerInRangeOfPoint(playerid, 3.0, jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]))
{
SetPlayerAttachedObject(playerid,Slot_Pa,337,6,0.097999,0.076999,0.011000,172.699859,-4.799996,89.199981,1.000000,0.629000,0.678000);
ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",2.0,1,0,0,0,0);
SetTimerEx("AnimatioN", 500, false, "i", playerid);
SetTimerEx("MaconhaColher", 17000, false, "id", playerid);
}
else return SendClientMessage(playerid, -1, "Vocк nгo й o dono dessa plantaзгo de maconha");
}
return 1;
}
stock IsPlayerInRC(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if((x >= 1380.2469 && y >= -1902.1251 && x <= 1683.3595 && y <= -1737.7413) ||//Respawn Civil
IsPlayerInRangeOfPoint(playerid, 120.0, 1352.1953,-1748.6051,13.3667) || //24/7 ext
IsPlayerInRangeOfPoint(playerid, 100.0, -29.5413,-89.5442,1003.5469) ||//24/7 int
IsPlayerInRangeOfPoint(playerid, 120.0, 1352.1953,-1748.6051,13.3667) ||//Pref ext
IsPlayerInRangeOfPoint(playerid, 100.0, 370.3531,173.3661,1008.3828))//pref int
{
return 1;
}
return 0;
}
forward plantando(playerid);public plantando(playerid)
{
GetPlayerPos(playerid,jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]);
PlantaOBJETO[playerid] = CreateObject(2247,jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2],0,0,0,0);
SendClientMessage(playerid,-1,"Sua semente de maconha foi plantada!");
SendClientMessage(playerid,-1,"A cada 5 minutos ela ira crescer");
SetTimerEx("Crescendo", 30000, false, "i", playerid);
RemovePlayerAttachedObject(playerid, Slot_Pa);
ClearAnimations(playerid);
//TEST NOME NA PLATANЗГO
new string[200];
// format(string, sizeof string, "•Plantaзгo de maconha•\nDono: %s\nPlantaзгo Nє: %d\nCrescida: %d/%d\nGramas: %dg", sendername); PROXIMO UPDATE TO COM A VISATA CANSADA :D JHOWROB
format(string, sizeof string, "•Plantaзгo de maconha•\nDono: %s\n", sendername);
MaconhaInfo[TT] = Create3DTextLabel(string, 0x1FF61F99, jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2], 10.0, 0);
return true;
}
forward regandoa(playerid);public regandoa(playerid)
{
GetPlayerPos(playerid,jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]);
SendClientMessage(playerid,-1,"Regando a Plantaзгo");
ClearAnimations(playerid);
return true;
}
//stock
JHOWROBBBB::AnimatioN(playerid)
{
ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",2.0,1,0,0,0,0);
return true;
}
stock GetPlayerSpeedEx(playerid)
{
static Float: posS[ 3 ] ;
GetPlayerVelocity(playerid , posS [ 0 ] , posS [ 1 ] , posS [ 2 ] ) ;
return floatround(floatmul(floatsqroot(floatadd(floatpower(posS[ 0 ] , 2 ) ,floatpower(posS [ 1 ] , 2 ))), 170.0));
}
forward Crescendo(playerid);
public Crescendo(playerid)
{
if(RegarDroga[playerid] == 0) {
SendClientMessage(playerid,-1,"Vocк nгo regou sua planta de maconha e ela {FF0000}morreu ");
DestroyObject(PlantaOBJETO[playerid]);
Delete3DTextLabel(MaconhaInfo[TT]);
Plantou[playerid] = 0;
RegarDroga[playerid]= 0;
return 1;
}
else {
if(RegarDroga[playerid] == 1) {
GetPlayerPos(PlantaOBJETO[playerid],jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]);
SendClientMessage(playerid,COR_BRANCA,"Sua Planta cresceu");
DestroyObject(PlantaOBJETO[playerid]);
PlantaOBJETO[playerid] = CreateObject(861,jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2],0,0,0,0);
RegarDroga[playerid] = 0 ;
SendClientMessage(playerid,COR_BRANCA,"{FF0000}/regar.");
SetTimerEx("Crescendo2", 30000, false, "i", playerid);
}
}
return true;
}
forward Crescendo2(playerid);
public Crescendo2(playerid)
{
if(RegarDroga[playerid] == 0) {
Plantou[playerid] = 0;
SendClientMessage(playerid,-1,"Vocк nгo regou sua planta de maconha e ela {FF0000}morreu ");
DestroyObject(PlantaOBJETO[playerid]);
Delete3DTextLabel(MaconhaInfo[TT]);
RegarDroga[playerid] = 0;
return 1;
}
else {
if(RegarDroga[playerid] == 1) {
GetPlayerPos(PlantaOBJETO[playerid],jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]);
SendClientMessage(playerid,COR_BRANCA,"Sua Planta cresceu");
DestroyObject(PlantaOBJETO[playerid]);
PlantaOBJETO[playerid] = CreateObject(862,jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2],0,0,0,0);
RegarDroga[playerid] = 0 ;
SendClientMessage(playerid,COR_BRANCA,"/regar.");
SetTimerEx("Crescendo3", 30000, false, "i", playerid);
}
}
return true;
}
forward Crescendo3(playerid);
public Crescendo3(playerid)
{
if(RegarDroga[playerid] == 0) {
SendClientMessage(playerid,COR_BRANCA,"Vocк nгo regou sua planta de maconha e ela {FF0000}morreu ");
DestroyObject(PlantaOBJETO[playerid]);
Delete3DTextLabel(MaconhaInfo[TT]);
Plantou[playerid] = 0;
RegarDroga[playerid]= 0;
return 1;
}
else {
if(RegarDroga[playerid] == 1) {
GetPlayerPos(PlantaOBJETO[playerid],jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2]);
SendClientMessage(playerid,COR_BRANCA,"Sua planta de maconha cresceu {FF0000} madura!");
SendClientMessage(playerid,COR_BRANCA,"USE: {FF0000}/colher");
DestroyObject(PlantaOBJETO[playerid]);
Plantou[playerid] = 0;
MaconhaMadura[playerid]=1;
PlantaOBJETO[playerid] = CreateObject(806,jhowrobobjetoplanta[0],jhowrobobjetoplanta[1],jhowrobobjetoplanta[2],0,0,0,0);
}
}
return true;
}
//TEST