Portal SAMP
[Ajuda] Objeto não aparece - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Objeto não aparece (/showthread.php?tid=633)

Páginas: 1 2


Objeto não aparece - LeleziiN - 11/01/2021

Bom estou desenvolvendo um sistema de plantação e colheita para a profissão de Agricultor/Fazendeiro. Bom quando utilizo o comando /plantacao  iniciar um percurso com 4 CPs para plantar, até ai tudo bem. Só não estou conseguindo que depois de 1 minutos apareça os Objetos no local aonde estava os CPs de plantar.

Se alguém poder mim da essa ajuda agradeço muito.

Código:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);

    if (strcmp("/plantacao", cmdtext, true, 4) == 0)
    {
        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você iniciou o trabalho, vá até o primeiro ponto para plantar!");
        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Lembre-se de levar um Combine(Colheitadeira), você precisará dele para colher!");
        return 1;
    }
    return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
    if(TrigoPlantar[playerid] == 0)
    {
        TrigoPlantar[playerid] = 1;
        SetPlayerCheckpoint(playerid, -100.9928,-32.9734,3.1094, 4);
        ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
        SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
        return 1;
    }
    if(TrigoPlantar[playerid] == 1)
    {
        TrigoPlantar[playerid] = 2;
        SetPlayerCheckpoint(playerid,-122.9662,60.2341,3.1172,4);//5
        ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
        SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
        return 1;
    }
    if(TrigoPlantar[playerid] == 2)
    {
        TrigoPlantar[playerid] = 3;
        SetPlayerCheckpoint(playerid,-125.3102,54.6598,3.1172,4);
        ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
        SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
        return 1;
    }
    if(TrigoPlantar[playerid] == 3)
    {
        TrigoPlantar[playerid] = 4;
        SetPlayerCheckpoint(playerid,-127.3887,49.7169,3.1172,4);
        ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
        SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
        return 1;
    }
    if(TrigoPlantar[playerid] == 4)//11
    {
        TrigoPlantar[playerid] = 0;
        SetPlayerCheckpoint(playerid,-129.4673,44.7740,3.1172,4);
        ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você plantou em todos os locais. Aguarde 1 minuto para colher!");
        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Localização apagada com sucesso!");
        DisablePlayerCheckpoint(playerid);
        SetTimerEx("TrigoPlantacao", 100, false, "i", playerid);
    }
    return 1;
}

forward TrigoPlantacao(playerid);
public TrigoPlantacao(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(TrigoPlantar[playerid] == 1)
        {
            PegaPlanta[playerid] = 0;
            Planta1[playerid] = CreateObject(872, -122.9662, 60.2341, 3.1172, 0, 0, 0);
            SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Sua plantação está pronta para ser colhida!");
            SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você precisa de um Combine(Colheitadeira) para colher o trigo!");
            SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você possui um prazo de 3 minutos para colher o trigo!");
        }
        else if(TrigoPlantar[playerid] == 2)
        {
            PegaPlanta[playerid] -= 1;
            Planta2[playerid] = CreateObject(872, -125.3102, 54.6598, 3.1172, 0, 0, 0);
        }
        else if(TrigoPlantar[playerid] == 3)
        {
            PegaPlanta[playerid] -= 1;
            Planta3[playerid] = CreateObject(872, -127.3887, 49.7169, 3.1172, 0, 0, 0);
        }
        else if(TrigoPlantar[playerid] == 4)
        {
            PegaPlanta[playerid] -= 1;
            Planta4[playerid] = CreateObject(872, -129.4673, 44.7740, 3.1172, 0, 0, 0);
            SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você terminou de colher todo o trigo!");
            //TempoPlantar[playerid] = GetTickCount();
        }
        colheita[playerid] = SetTimerEx("ColheTrigo", 1000, 1, "i", playerid);
    }
    return 1;
}



RE: Objeto não aparece - xbruno1000x - 11/01/2021

1° pare de usar StrCmp kkkkkkkkkk

2° Você não colocou para aparecer em 1 minuto, e sim 100 milissegundos(menos de 1 segundo).
Para um minuto utilize 1000*60 (1000 milissegundos = 1 segundo & multiplicando por 60 dá 1 minuto).

3° Tente criar o objeto na OnGameModeInit e movê-lo para a posição quando o player estiver no checkpoint.

4° Sistema está ficando bom, parabéns pelo seu esforço em aprender a fazê-lo.


RE: Objeto não aparece - LeleziiN - 11/01/2021

(11/01/2021 18:07)xbruno1000x Escreveu: 1° pare de usar StrCmp kkkkkkkkkk

2° Você não colocou para aparecer em 1 minuto, e sim 100 milissegundos(menos de 1 segundo).
Para um minuto utilize 1000*60 (1000 milissegundos = 1 segundo & multiplicando por 60 dá 1 minuto).

3° Tente criar o objeto na OnGameModeInit e movê-lo para a posição quando o player estiver no checkpoint.

4° Sistema está ficando bom, parabéns pelo seu esforço em aprender a fazê-lo.

Obrigado mano estou tentando, quando eu finaliza-lo irei  disponibiliza-lo para outros poderem terem a mesma vontade de aprender sobre a linguagem PAWN.


RE: Objeto não aparece - LeleziiN - 11/01/2021

Bom não estou conseguindo fazer que apareça o objeto aonde os CPs do percurso da plantação, se poderem mim da uma exemplo bom agradeço.

Estava desenvolvendo algo tipo esse
https://youtu.be/tH7ds3oaxIY

Uma boa parte eu conseguir fazer mais n consigo fazer a parte do objeto aparecer dps de 1 minuto


RE: Objeto não aparece - LeleziiN - 12/01/2021

Bom pessoal! Eu tentei resolver por conta própria mais não obtive muito sucesso não, por isso venho mais uma vez aqui no fórum pede ajuda de vocês para eu resolver isso.

Aqui está o sistema que estou desenvolvendo(Sistema de Plantação e Colheita)

Código PHP:
#include <a_samp>
#include <cpstream>
#include <dutils>
#include <foreach>
#include <strlib>
#include <iploc>
#include <streamer>
#include <geopos>
#include <zenner>
#include <mSelection>
#include <progress>
#include <dudb>

#define COLOR_RED 0xFF0000FF
#define COR_ORKUT 0xC8E1FFAA
#define COR_MARA1 0xE7FE63FF
#define COR_MARA2 0xEEDC2DFF
#define COR_MARA3 0x33CC66FF
#define COR_ORKUT 0xC8E1FFAA
#define COR_MARA4 0xCCCC99FF
#define COR_MARA5 0x7DC669FF
#define COR_MARA6 0xFFCC66FF
#define COR_MARA7 0xFFCCCCFF
#define OLDCOR_MARA2 0x99CCCCFF
#define COR_PRINCIPAL 0xFFCC66FF
#define COR_PRINCIPALANTIGA 0x96D742AA
#define COR_PRINCIPAL2  0x95BAF0FF
#define COR_PRINCIPAL3  0x2A51E2FF
#define COR_BRANCOXXX   0xFFFFFFAA
#define PM_INCOMING_COLOR     0xFFFF22AA
#define PM_OUTGOING_COLOR     0xFFCC2299
#define CORX1 0xFF5E35FF
#define CORX2 0xFFA275FF
#define CORX3 0xFF5840FF
#define CORX4 0xA0CFCFFF

#define Cor_pizzaboy 0x00FFFFAA

#define Pegarpizza 1
#define TEMPO 15000
#define TEMPO2 15000
#define VERDE 0x80FF00FF
#define grana 1125

enum pInfo
{
    fazendeiro
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
new 
sementes[256];
new 
tempocolheita[MAX_PLAYERS];
new 
plantacao[MAX_PLAYERS];
new 
colheita[MAX_PLAYERS];
new 
TempoPickupX[MAX_PLAYERS] = 0;
new 
TrigoPlantar[MAX_PLAYERS];
new 
iconetrigo;
new 
iconesementes;
new 
PegaPlanta[MAX_PLAYERS];
new 
Planta1[MAX_PLAYERS];
new 
Planta2[MAX_PLAYERS];
new 
Planta3[MAX_PLAYERS];
new 
FenoPlantado1[MAX_PLAYERS];
new 
FenoPlantado2[MAX_PLAYERS];
new 
FenoPlantado3[MAX_PLAYERS];

AntiDeAMX()
{
    new 
a[][] =
    {
        
"Unarmed (Fist)",
        
"Brass K"
    
};
    #pragma unused a
}

#pragma tabsize 0

main()
{
    if(dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
    {
        SendRconCommand("reloadfs admin");
        print("\n---------------------------------~~~~~~~~-");
        print(" Sistema de Fazendeiro feito por [TSVR]LeleziN ");
        print("----------------------------------~~~~~~~~\n");
    }
}

public 
OnGameModeInit()
{
    if(!dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
    {
    
   for(new 050++) printf("| INFO | Você não está autorizado a utilizar esse GameMode!");
    
    sleep(5);
        
SendRconCommand("exit");
        return 
1;
    }

    print(
"\n----------------------------------~~~~~~~~~~~~~~~~~~~~");
    print(
" Não retire os Creditos pfvr - Criador [TSVR]LeleziN ");
    print(
"----------------------------------~~~~~~~~~~~~~~~~~~~~\n");

    
SetGameModeText("Criador:[TSVR]LeleziN");
    
AddPlayerClass(0499.9279,-77.9556,998.7578,6.4781000000);

    AddStaticVehicle(531,-138.2246,-26.4447,3.0819,250.2383,36,2); // cvf
    AddStaticVehicle(531,-139.2512,-29.1861,3.0836,249.3920,51,53); // cvf1
    AddStaticVehicle(531,-140.2695,-31.9092,3.0816,250.3399,36,2); // cvf2
    AddStaticVehicle(531,-141.4217,-34.8857,3.0808,251.3955,51,53); // cvf3
    AddStaticVehicle(531,-142.6157,-37.6843,3.0805,252.7454,36,2); // cvf4
    AddStaticVehicle(532,-142.2160,-21.7359,4.0932,66.3268,0,0); // cvfv
    AddStaticVehicle(532,-145.6867,-30.4260,4.0932,67.3693,0,0); // cvfv1
    AddStaticVehicle(532,-148.9681,-38.8549,4.1092,70.9642,0,0); // cvfv2
    AddStaticVehicle(532,-152.4587,-47.7776,4.0898,71.4296,0,0); // cvfv3
    AddStaticVehicle(532,-155.8328,-56.4386,4.0936,71.4490,0,0); // cvfv4
    iconetrigo CreatePickup(123923, -100.9928, -32.97343.1094, -1);
    iconesementes CreatePickup(123923, -96.6817, -23.79743.1172, -1);
    //Create3DTextLabel("Iniciar Plamtação", 0xFFFFFFFF, -100.9928, -32.9734, 3.1094, 50, 0, 0);
    
return 1;
}

public 
OnGameModeExit()
{
    ZN_Exit();
    return 
1;
}

public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid, -1629.1534,-2239.1914,31.4766);
    
SetPlayerCameraPos(playerid, -1632.6943,-2239.0200,31.4766);
    
SetPlayerCameraLookAt(playerid, -1632.6943,-2239.0200,31.4766);
    return 
1;
}

public 
OnPlayerConnect(playerid)
{
    AntiDeAMX();
    
    
new File[70], pname[MAX_PLAYER_NAME];
    GetPlayerName(playeridpnamesizeof(pname));
    format(Filesizeof(File), "%s.ini"pname);
    if(ZN_FileExists(File))
    {
        PlayerInfo[playerid][fazendeiro] = ZN_GetInt(File"Profissao");
    }
    else
    {
        ZN_CreateFile(File);
        ZN_SetInt(File"Profissao"0);
        ZN_SaveFile();
        OnPlayerConnect(playerid);
    }
       return 1;
}

public 
OnPlayerDisconnect(playerid)
{
    TempoPickupX[playerid] = 0;
    KillTimer(plantacao[playerid]);
    KillTimer(colheita[playerid]);
    
    
new File[70], pname[MAX_PLAYER_NAME];
    GetPlayerName(playeridpnamesizeof(pname));
    format(Filesizeof(File), "%s.ini"pname);
    ZN_SetInt(File"Profissao"PlayerInfo[playerid][fazendeiro]);
    ZN_SaveFile();
    return 
1;
}

public 
OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, -100.9928,-32.9734,3.1094);
    return 
1;
}

public 
OnPlayerPickUpPickup(playeridpickupid)
{
    if(
TempoPickupX[playerid] == 0)
    {
    
    if(pickupid == iconetrigo)
    
    {
    
        TempoPickupX[playerid] = 10;
    
    }
    
    
        
if(pickupid == iconesementes)
    
    {
    
        TempoPickupX[playerid] = 10;
    
    }
    }
    return 
1;
}

public 
OnPlayerCommandText(playeridcmdtext[])
{
    new cmd[256], idx;
    
cmd strtok(cmdtextidx);
    
    if(
strcmp(cmd"/virarf"true) == 0)
    {
         PlayerInfo[playerid][fazendeiro] = 1;
         SendClientMessage(playeridCor_pizzaboy"| INFO | Parabéns, você virou um fazendeiro");
         return 1;
    }
    
    
if(strcmp(cmd"/sairemprego"true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              PlayerInfo[playerid][fazendeiro] = 0;
              SendClientMessage(playeridCor_pizzaboy"| INFO | Parabens, você não é mais um fazendeiro");
         }
         else
         {
              SendClientMessage(playeridCORX1"| ERRO | Você não tem um emprego!");
         }
         return 1;
    }
    
    
if(strcmp(cmd"/plantacao"true) == 0)
    {
     
     if(PlayerInfo[playerid][fazendeiro] == 1)
         {
    
          if(sementes[playerid] != 1)
            
  {
            
       SendClientMessage(playeridCORX1"| ERRO | Você não pegou as sementes!");
            
       return 1;
            
  }
            
  if(sementes[playerid] != 0)
    
          {
                   new Float:XFloat:YFloat:Z;
                
   GetPlayerPos(playerid,X,Y,Z);
                   if(IsPlayerInRangeOfPoint(playerid3.0, -100.9928, -32.97343.1094))
                   {
                        //PlayerInfo[playerid][fazendeiro] = 1;
                
        new pname[MAX_PLAYER_NAME], string[48];
                        GetPlayerName(playeridpnamesizeof(pname));
                        format(stringsizeof(string), "* %s."pname );
                        TrigoPlantar[playerid] = 0;
                        SetPlayerCheckpoint(playerid,-100.9928, -32.97343.1094,3);
                        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você iniciou o trabalho, vá até o primeiro ponto para plantar!");
                        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Lembre-se de levar um Combine(Colheitadeira), você precisará dele para colher!");
                        SetTimerEx("Plantando",TEMPO,1,"i",playerid);
                   }
                   else
                   {
                        SendClientMessage(playeridCORX1,"| ERRO | Você não iniciou uma plantação.");
                    
    return 1;
                
   }
    
          }
         }
         else
         {
    
          SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
        
      return 1;
    
     }
         return 
1;
    }
    
    if(
strcmp(cmd"/pegarsementes"true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              if(IsPlayerInRangeOfPoint(playerid3.0, -96.6817, -23.79743.1172))
              {
                   sementes[playerid] = 1;
                   //SetPlayerCheckpoint(playerid,-96.6817, -23.7974, 3.1172, 3);
                   SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você pegou as sementes agora vá plantar!");
              }
              else
        
     {
            
     SendClientMessage(playeridCORX1,"| ERRO | Você não está no icone de plantação.");
            
     return 1;
             }
         }
         else
         {
    
          SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
        
      return 1;
    
     }
         return 
1;
    }
    
    if(
strcmp(cmd"/sairtrabalho"true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              DisablePlayerCheckpoint(playerid);
              PlayerInfo[playerid][fazendeiro] = 1;
              sementes[playerid] = 0;
    
     }
         else
         {
              SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
         }
         return 1;
    }
    return 
1;
}

forward Plantando(playerid);
public 
Plantando(playerid)
{
    
TogglePlayerControllable(playerid0);
    return 
1;
}

public 
OnPlayerEnterCheckpoint(playerid)
{
    if(
PlayerInfo[playerid][fazendeiro] == 1)
    {
         PlayerInfo[playerid][fazendeiro] = 2;
         TogglePlayerControllable(playerid1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid, -122.9662,60.2341,3.11723);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(
PlayerInfo[playerid][fazendeiro] == 2)
    {
         PlayerInfo[playerid][fazendeiro] = 3;
         TogglePlayerControllable(playerid1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-125.3102,54.6598,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    /*if(PlayerInfo[playerid][fazendeiro] == 3)
    {
         PlayerInfo[playerid][fazendeiro] = 4;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-127.3887,49.7169,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 4)
    {
         PlayerInfo[playerid][fazendeiro] = 5;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-129.4673,44.7740,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 5)
    {
         PlayerInfo[playerid][fazendeiro] = 6;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-131.1393,39.2527,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 6)
    {
         PlayerInfo[playerid][fazendeiro] = 7;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-134.2140,31.8283,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 7)
    {
         PlayerInfo[playerid][fazendeiro] = 8;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-136.6156,25.5480,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 8)
    {
         PlayerInfo[playerid][fazendeiro] = 9;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-138.6541,20.2173,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 9)
    {
         PlayerInfo[playerid][fazendeiro] = 10;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-140.8140,14.5691,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 10)
    {
         PlayerInfo[playerid][fazendeiro] = 11;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-143.3389,7.9665,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 11)
    {
         PlayerInfo[playerid][fazendeiro] = 12;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-145.1427,3.7968,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 12)
    {
         PlayerInfo[playerid][fazendeiro] = 13;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-147.3560,-1.6823,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 13)
    {
         PlayerInfo[playerid][fazendeiro] = 14;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-149.6363,-7.6452,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 14)
    {
         PlayerInfo[playerid][fazendeiro] = 15;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-152.0379,-13.9255,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 15)
    {
         PlayerInfo[playerid][fazendeiro] = 16;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-154.8134,-21.1834,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 16)
    {
         PlayerInfo[playerid][fazendeiro] = 17;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-158.0738,-29.7095,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 17)
    {
         PlayerInfo[playerid][fazendeiro] = 18;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-160.9416,-36.4722,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 18)
    {
         PlayerInfo[playerid][fazendeiro] = 19;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-163.1015,-42.1204,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 19)
    {
         PlayerInfo[playerid][fazendeiro] = 20;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-165.5032,-48.4008,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }*/
    if(PlayerInfo[playerid][fazendeiro] == 3)//20
    
{
         PlayerInfo[playerid][fazendeiro] = 1;
         TogglePlayerControllable(playerid1);
         DisablePlayerCheckpoint(playerid);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-127.3887,49.7169,3.1172,3);
         //SetPlayerCheckpoint(playerid,-168.4018,-55.9808,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você plantou em todos os locais. Aguarde 1 minuto para colher!");
         SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Localização apagada com sucesso!");
         DisablePlayerCheckpoint(playerid);
         SetTimerEx("TrigoColher"TEMPO20"i"playerid);//1
         return 1;
    }
    return 
1;
}

forward TrigoColher(playerid);
public 
TrigoColher(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:XFloat:YFloat:Z;
        //GetObjectPos(playerid, X, Y, Z);
        SendClientMessage(playerid, -1"{1e90ff}| INFO | {FFFFFF}Sua plantação está pronta para ser colhida!");
        SendClientMessage(playerid, -1"{1e90ff}| INFO | {FFFFFF}Você precisa de um Combine(Colheitadeira) para colher o trigo!");
        
SendClientMessage(playerid, -1"{1e90ff}| INFO | {FFFFFF}Você possui um prazo de 3 minutos para colher o trigo!");
        if(TrigoPlantar[playerid] == 1)
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            
PegaPlanta[playerid] = 1;
            
GetObjectPos(Planta1[playerid], XYZ);
            
Planta1[playerid] = CreateObject(806, -122.966260.23413.11720.000000.000000.00000);
        }
        else if(
TrigoPlantar[playerid] == 2)
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            
PegaPlanta[playerid] = 1;
            
GetObjectPos(Planta2[playerid], XYZ);
            
Planta2[playerid] = CreateObject(806, -125.310254.65983.11720.000000.000000.00000);
        }
        
/*else if(TrigoPlantar[playerid] == 3)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -127.3887, 49.7169, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 4)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -129.4673, 44.7740, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 5)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -131.1393, 39.2527, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 6)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -134.2140, 31.8283, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 7)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -136.6156, 25.5480, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 8)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -138.6541, 20.2173, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 9)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -140.8140, 14.5691, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 10)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -143.3389, 7.9665, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 11)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -145.1427, 3.7968, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 12)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -147.3560, -1.6823, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 13)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -149.6363, -7.6452, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 14)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -152.0379, -13.9255, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 15)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -154.8134, -21.1834, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 16)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -158.0738, -29.7095, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 17)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -160.9416, -36.4722, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 18)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -163.1015, -42.1204, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 19)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -165.5032, -48.4008, 3.1172, 0.00000, 0.00000, 0.00000);
        }*/
        
else if(TrigoPlantar[playerid] == 3)//20
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
    
        PegaPlanta[playerid] = 1;
    
        GetObjectPos(Planta3[playerid], XYZ);
    
        Planta3[playerid] = CreateObject(806, -127.388749.71693.11720.000000.000000.00000);
            //CreateObject(806, -168.4018, -55.9808, 3.1172, 0.00000, 0.00000, 0.00000);
            SetTimerEx("ColheTrigo"TEMPO0"i"playerid);
        }
    }
    return 
1;
}

forward ColheTrigo(playerid);
public 
ColheTrigo(playerid)
//stock ColheTrigo(playerid)
{
     new vid GetPlayerVehicleID(playerid);
     new modelo GetVehicleModel(vid);
     if(IsPlayerConnected(playerid))
     {
          if(PlayerToPoint(3.0playerid, -122.966260.23413.1172))
          {
               if(!IsPlayerInVehicle(playeridvid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 1;
               DestroyObject(Planta1[playerid]);
               FenoPlantado1[playerid] = CreateObject(806, -122.966260.23413.11720.000000.000000.00000);
          }
          else if(PlayerToPoint(3.0playerid, -125.310254.65983.1172))
          {
               if(!IsPlayerInVehicle(playeridvid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 2;
               DestroyObject(Planta2[playerid]);
               FenoPlantado2[playerid] = CreateObject(806, -125.310254.65983.11720.000000.000000.00000);
          }
          else if(PlayerToPoint(3.0playerid, -127.388749.71693.1172))
          {
               if(!IsPlayerInVehicle(playeridvid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 3;
               DestroyObject(Planta3[playerid]);
               FenoPlantado3[playerid] = CreateObject(806, -127.388749.71693.11720.000000.000000.00000);
               SendClientMessage(playerid, -1"{1e90ff}| INFO | {FFFFFF}Você terminou de colher todo o trigo!");
          }
          if(tempocolheita[playerid] == 5)
          {
               PegaPlanta[playerid] = 0;
               tempocolheita[playerid] = 0;
        
       KillTimer(colheita[playerid]);
          }
     }
     return 1;
}

stock PlayerToPoint(Float:radiplayeridFloat:xFloat:yFloat:z)
{
    new 
Float:oldposxFloat:oldposyFloat:oldposz;
    new 
Float:tempposxFloat:tempposyFloat:tempposz;
    
GetPlayerPos(playeridoldposxoldposyoldposz);
    
tempposx = (oldposx -x);
    
tempposy = (oldposy -y);
    
tempposz = (oldposz -z);
    if (((
tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi))) return 1;
    return 
0;


Se poderem mim ajuda a deixa dessa forma agradeço muito
https://youtu.be/tH7ds3oaxIY


RE: Objeto não aparece - xbruno1000x - 12/01/2021

Teste do jeito que sugeri. Você cria o objeto na OnGameModeInit e usa MoveObject quando o player cumprir o objetivo.


RE: Objeto não aparece - LeleziiN - 13/01/2021

(12/01/2021 21:10)xbruno1000x Escreveu: Teste do jeito que sugeri. Você cria o objeto na OnGameModeInit e usa MoveObject quando o player cumprir o objetivo.

Mais eu criando os Objetos no OnGameModeInit, como faço para eles aparecem só quando eu termina de fazer o percurso da plantação os CPs?


RE: Objeto não aparece - xbruno1000x - 13/01/2021

(13/01/2021 02:26)LeleziiN Escreveu:
(12/01/2021 21:10)xbruno1000x Escreveu: Teste do jeito que sugeri. Você cria o objeto na OnGameModeInit e usa MoveObject quando o player cumprir o objetivo.

Mais eu criando os Objetos no OnGameModeInit, como faço para eles aparecem só quando eu termina de fazer o percurso da plantação os CPs?

Não está criando na OnGameModeInit, nem usou MoveObject.
Código:
Planta2[playerid] = CreateObject(806, -125.3102, 54.6598, 3.1172, 0.00000, 0.00000, 0.00000);



RE: Objeto não aparece - LeleziiN - 13/01/2021

Bom eu fiz dessa mandeira como vc disse mais ainda continua sem criar o objeto da planta id 806

Código:
#include <a_samp>
#include <cpstream>
#include <dutils>
#include <foreach>
#include <strlib>
#include <iploc>
#include <streamer>
#include <geopos>
#include <zenner>
#include <mSelection>
#include <progress>
#include <dudb>

#pragma unused ret_memcpy

#define COLOR_RED 0xFF0000FF
#define COR_ORKUT 0xC8E1FFAA
#define COR_MARA1 0xE7FE63FF
#define COR_MARA2 0xEEDC2DFF
#define COR_MARA3 0x33CC66FF
#define COR_ORKUT 0xC8E1FFAA
#define COR_MARA4 0xCCCC99FF
#define COR_MARA5 0x7DC669FF
#define COR_MARA6 0xFFCC66FF
#define COR_MARA7 0xFFCCCCFF
#define OLDCOR_MARA2 0x99CCCCFF
#define COR_PRINCIPAL 0xFFCC66FF
#define COR_PRINCIPALANTIGA 0x96D742AA
#define COR_PRINCIPAL2  0x95BAF0FF
#define COR_PRINCIPAL3  0x2A51E2FF
#define COR_BRANCOXXX   0xFFFFFFAA
#define PM_INCOMING_COLOR     0xFFFF22AA
#define PM_OUTGOING_COLOR     0xFFCC2299
#define CORX1 0xFF5E35FF
#define CORX2 0xFFA275FF
#define CORX3 0xFF5840FF
#define CORX4 0xA0CFCFFF

#define Cor_pizzaboy 0x00FFFFAA

#define Pegarpizza 1
#define TEMPO 15000
#define TEMPO2 15000
#define VERDE 0x80FF00FF
#define grana 1125

new ObjetosPlanta_Atual;
new ObjetosPlanta[50];
#define Planta1   806
#define Maximo_Objetos 1

enum pInfo
{
    fazendeiro
}
new PlayerInfo[MAX_PLAYERS][pInfo];
new sementes[256];
new tempocolheita[MAX_PLAYERS];
new plantacao[MAX_PLAYERS];
new colheita[MAX_PLAYERS];
new TempoPickupX[MAX_PLAYERS] = 0;
new TrigoPlantar[MAX_PLAYERS];
new iconetrigo;
new iconesementes;
new PegaPlanta[MAX_PLAYERS];

AntiDeAMX()
{
    new a[][] =
    {
        "Unarmed (Fist)",
        "Brass K"
    };
    #pragma unused a
}

#pragma tabsize 0

main()
{
    if(dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
    {
        SendRconCommand("reloadfs admin");
        print("\n---------------------------------~~~~~~~~-");
        print(" Sistema de Fazendeiro feito por [TSVR]LeleziN ");
        print("----------------------------------~~~~~~~~\n");
    }
}

public OnGameModeInit()
{
    if(!dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
    {
       for(new I = 0; I < 50; I ++) printf("| INFO | Você não está autorizado a utilizar esse GameMode!");
        sleep(5);
        SendRconCommand("exit");
        return 1;
    }

    print("\n----------------------------------~~~~~~~~~~~~~~~~~~~~");
    print(" Não retire os Creditos pfvr - Criador [TSVR]LeleziN ");
    print("----------------------------------~~~~~~~~~~~~~~~~~~~~\n");

    SetGameModeText("Criador:[TSVR]LeleziN");
    AddPlayerClass(0, 499.9279,-77.9556,998.7578,6.4781, 0, 0, 0, 0, 0, 0);

    AddStaticVehicle(531,-138.2246,-26.4447,3.0819,250.2383,36,2); // cvf
    AddStaticVehicle(531,-139.2512,-29.1861,3.0836,249.3920,51,53); // cvf1
    AddStaticVehicle(531,-140.2695,-31.9092,3.0816,250.3399,36,2); // cvf2
    AddStaticVehicle(531,-141.4217,-34.8857,3.0808,251.3955,51,53); // cvf3
    AddStaticVehicle(531,-142.6157,-37.6843,3.0805,252.7454,36,2); // cvf4
    AddStaticVehicle(532,-142.2160,-21.7359,4.0932,66.3268,0,0); // cvfv
    AddStaticVehicle(532,-145.6867,-30.4260,4.0932,67.3693,0,0); // cvfv1
    AddStaticVehicle(532,-148.9681,-38.8549,4.1092,70.9642,0,0); // cvfv2
    AddStaticVehicle(532,-152.4587,-47.7776,4.0898,71.4296,0,0); // cvfv3
    AddStaticVehicle(532,-155.8328,-56.4386,4.0936,71.4490,0,0); // cvfv4
    iconetrigo = CreatePickup(1239, 23, -100.9928, -32.9734, 3.1094, -1);
    iconesementes = CreatePickup(1239, 23, -96.6817, -23.7974, 3.1172, -1);
    //Create3DTextLabel("Iniciar Plamtação", 0xFFFFFFFF, -100.9928, -32.9734, 3.1094, 50, 0, 0);
   
    for(new A = 0; A < Maximo_Objetos; A ++)
    {
         ObjetosPlanta[A] = CreateObject(Planta1, 0.0, 0.0, -9999, 0.0, 0.0, 0.0);
    }
    return 1;
}

public OnGameModeExit()
{
    ZN_Exit();
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, -1629.1534,-2239.1914,31.4766);
    SetPlayerCameraPos(playerid, -1632.6943,-2239.0200,31.4766);
    SetPlayerCameraLookAt(playerid, -1632.6943,-2239.0200,31.4766);
    return 1;
}

public OnPlayerConnect(playerid)
{
    AntiDeAMX();
   
    new File[70], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(File, sizeof(File), "%s.ini", pname);
    if(ZN_FileExists(File))
    {
        PlayerInfo[playerid][fazendeiro] = ZN_GetInt(File, "Profissao");
    }
    else
    {
        ZN_CreateFile(File);
        ZN_SetInt(File, "Profissao", 0);
        ZN_SaveFile();
        OnPlayerConnect(playerid);
    }
       return 1;
}

public OnPlayerDisconnect(playerid)
{
    TempoPickupX[playerid] = 0;
    KillTimer(plantacao[playerid]);
    KillTimer(colheita[playerid]);
   
    new File[70], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(File, sizeof(File), "%s.ini", pname);
    ZN_SetInt(File, "Profissao", PlayerInfo[playerid][fazendeiro]);
    ZN_SaveFile();
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, -100.9928,-32.9734,3.1094);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(TempoPickupX[playerid] == 0)
    {
        if(pickupid == iconetrigo)
        {
            TempoPickupX[playerid] = 10;
        }
       
        if(pickupid == iconesementes)
        {
            TempoPickupX[playerid] = 10;
        }
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);
    
    if(strcmp(cmd, "/virarf", true) == 0)
    {
         PlayerInfo[playerid][fazendeiro] = 1;
         SendClientMessage(playerid, Cor_pizzaboy, "| INFO | Parabéns, você virou um fazendeiro");
         return 1;
    }
   
    if(strcmp(cmd, "/sairemprego", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              PlayerInfo[playerid][fazendeiro] = 0;
              SendClientMessage(playerid, Cor_pizzaboy, "| INFO | Parabens, você não é mais um fazendeiro");
         }
         else
         {
              SendClientMessage(playerid, CORX1, "| ERRO | Você não tem um emprego!");
         }
         return 1;
    }
   
    if(strcmp(cmd, "/plantar", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              if(sementes[playerid] != 1)
              {
                   SendClientMessage(playerid, CORX1, "| ERRO | Você não pegou as sementes!");
                   return 1;
              }
              if(sementes[playerid] != 0)
              {
                   new Float:X, Float:Y, Float:Z;
                   GetPlayerPos(playerid,X,Y,Z);
                   if(IsPlayerInRangeOfPoint(playerid, 3.0, -100.9928, -32.9734, 3.1094))
                   {
                        new pname[MAX_PLAYER_NAME], string[48];
                        GetPlayerName(playerid, pname, sizeof(pname));
                        format(string, sizeof(string), "* %s.", pname );
                        TrigoPlantar[playerid] = 0;
                        SetPlayerCheckpoint(playerid,-100.9928, -32.9734, 3.1094,3);
                        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você iniciou o trabalho, vá até o primeiro ponto para plantar!");
                        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Lembre-se de levar um Combine(Colheitadeira), você precisará dele para colher!");
                        SetTimerEx("Plantando",TEMPO,1,"i",playerid);
                   }
                   else
                   {
                        SendClientMessage(playerid, CORX1,"| ERRO | Você não iniciou uma plantação.");
                        return 1;
                   }
              }
         }
         else
         {
              SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
              return 1;
         }
         return 1;
    }
    
    if(strcmp(cmd, "/pegars", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              if(IsPlayerInRangeOfPoint(playerid, 3.0, -96.6817, -23.7974, 3.1172))
              {
                   sementes[playerid] = 1;
                   //SetPlayerCheckpoint(playerid,-96.6817, -23.7974, 3.1172, 3);
                   SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você pegou as sementes agora vá plantar!");
              }
              else
             {
                 SendClientMessage(playerid, CORX1,"| ERRO | Você não está no icone de plantação.");
                 return 1;
             }
         }
         else
         {
              SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
              return 1;
         }
         return 1;
    }
    
    if(strcmp(cmd, "/sairtrabalho", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              DisablePlayerCheckpoint(playerid);
              PlayerInfo[playerid][fazendeiro] = 1;
              sementes[playerid] = 0;
         }
         else
         {
              SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
         }
         return 1;
    }
    return 1;
}

forward Plantando(playerid);
public Plantando(playerid)
{
    TogglePlayerControllable(playerid, 0);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    if(PlayerInfo[playerid][fazendeiro] == 1)
    {
         PlayerInfo[playerid][fazendeiro] = 2;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid, -122.9662,60.2341,3.1172, 3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         //SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 2)
    {
         PlayerInfo[playerid][fazendeiro] = 3;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-125.3102,54.6598,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    /*if(PlayerInfo[playerid][fazendeiro] == 3)
    {
         PlayerInfo[playerid][fazendeiro] = 4;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-127.3887,49.7169,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 4)
    {
         PlayerInfo[playerid][fazendeiro] = 5;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-129.4673,44.7740,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 5)
    {
         PlayerInfo[playerid][fazendeiro] = 6;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-131.1393,39.2527,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 6)
    {
         PlayerInfo[playerid][fazendeiro] = 7;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-134.2140,31.8283,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 7)
    {
         PlayerInfo[playerid][fazendeiro] = 8;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-136.6156,25.5480,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 8)
    {
         PlayerInfo[playerid][fazendeiro] = 9;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-138.6541,20.2173,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 9)
    {
         PlayerInfo[playerid][fazendeiro] = 10;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-140.8140,14.5691,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 10)
    {
         PlayerInfo[playerid][fazendeiro] = 11;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-143.3389,7.9665,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 11)
    {
         PlayerInfo[playerid][fazendeiro] = 12;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-145.1427,3.7968,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 12)
    {
         PlayerInfo[playerid][fazendeiro] = 13;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-147.3560,-1.6823,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 13)
    {
         PlayerInfo[playerid][fazendeiro] = 14;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-149.6363,-7.6452,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 14)
    {
         PlayerInfo[playerid][fazendeiro] = 15;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-152.0379,-13.9255,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 15)
    {
         PlayerInfo[playerid][fazendeiro] = 16;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-154.8134,-21.1834,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 16)
    {
         PlayerInfo[playerid][fazendeiro] = 17;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-158.0738,-29.7095,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 17)
    {
         PlayerInfo[playerid][fazendeiro] = 18;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-160.9416,-36.4722,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 18)
    {
         PlayerInfo[playerid][fazendeiro] = 19;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-163.1015,-42.1204,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 19)
    {
         PlayerInfo[playerid][fazendeiro] = 20;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-165.5032,-48.4008,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }*/
    if(PlayerInfo[playerid][fazendeiro] == 3)//20
    {
         PlayerInfo[playerid][fazendeiro] = 1;
         TogglePlayerControllable(playerid, 1);
         DisablePlayerCheckpoint(playerid);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-127.3887,49.7169,3.1172,3);
         //SetPlayerCheckpoint(playerid,-168.4018,-55.9808,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você plantou em todos os locais. Aguarde 1 minuto para colher!");
         SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Localização apagada com sucesso!");
         DisablePlayerCheckpoint(playerid);

         new Float:x, Float:y, Float:z;
         GetPlayerPos(playerid, x, y, z);
         ObjetosPlanta[ObjetosPlanta_Atual] =  CreateObject(806, x, y, z, 0.0, 0.0, 96.0);
         ObjetosPlanta_Atual++;
         SetTimerEx("TrigoColher", TEMPO2, 0, "i", playerid);//1
         return 1;
    }
    return 1;
}

forward TrigoColher(playerid);
public TrigoColher(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        //new Float:X, Float:Y, Float:Z;
        SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Sua plantação está pronta para ser colhida!");
        SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você precisa de um Combine(Colheitadeira) para colher o trigo!");
        SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você possui um prazo de 3 minutos para colher o trigo!");
        if(TrigoPlantar[playerid] == 1)
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            PegaPlanta[playerid] = 1;
            //GetObjectPos(Planta1[playerid], X, Y, Z);
            //Planta1[playerid] = CreateObject(806, -122.9662, 60.2341, 3.1172, 0.00000, 0.00000, 0.00000);
            if(ObjetosPlanta_Atual >= (Maximo_Objetos - 1)) ObjetosPlanta_Atual = -1;
            ObjetosPlanta_Atual ++;
            ObjetosPlanta[ObjetosPlanta_Atual] = CreateObject(Planta1, -122.9662, 60.2341, 3.1172, 0.0, 0.0, 0.0);
        }
        else if(TrigoPlantar[playerid] == 2)
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            PegaPlanta[playerid] = 1;
            //GetObjectPos(Planta2[playerid], X, Y, Z);
            //Planta2[playerid] = CreateObject(806, -125.3102, 54.6598, 3.1172, 0.00000, 0.00000, 0.00000);
            if(ObjetosPlanta_Atual >= (Maximo_Objetos - 1)) ObjetosPlanta_Atual = -1;
            ObjetosPlanta_Atual ++;
            ObjetosPlanta[ObjetosPlanta_Atual] = CreateObject(Planta1, -125.3102, 54.6598, 3.1172, 0.0, 0.0, 0.0);
        }
        /*else if(TrigoPlantar[playerid] == 3)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -127.3887, 49.7169, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 4)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -129.4673, 44.7740, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 5)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -131.1393, 39.2527, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 6)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -134.2140, 31.8283, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 7)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -136.6156, 25.5480, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 8)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -138.6541, 20.2173, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 9)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -140.8140, 14.5691, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 10)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -143.3389, 7.9665, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 11)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -145.1427, 3.7968, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 12)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -147.3560, -1.6823, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 13)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -149.6363, -7.6452, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 14)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -152.0379, -13.9255, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 15)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -154.8134, -21.1834, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 16)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -158.0738, -29.7095, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 17)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -160.9416, -36.4722, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 18)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -163.1015, -42.1204, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 19)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -165.5032, -48.4008, 3.1172, 0.00000, 0.00000, 0.00000);
        }*/
        else if(TrigoPlantar[playerid] == 3)//20
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            PegaPlanta[playerid] = 1;
            //GetObjectPos(Planta3[playerid], X, Y, Z);
            //Planta3[playerid] = CreateObject(806, -127.3887, 49.7169, 3.1172, 0.00000, 0.00000, 0.00000);
            if(ObjetosPlanta_Atual >= (Maximo_Objetos - 1)) ObjetosPlanta_Atual = -1;
            ObjetosPlanta_Atual ++;
            ObjetosPlanta[ObjetosPlanta_Atual] = CreateObject(Planta1, -127.3887, 49.7169, 3.1172, 0.0, 0.0, 0.0);
            //CreateObject(806, -168.4018, -55.9808, 3.1172, 0.00000, 0.00000, 0.00000);
            SetTimerEx("ColheTrigo", TEMPO, 0, "i", playerid);
        }
    }
    return 1;
}

forward ColheTrigo(playerid);
public ColheTrigo(playerid)
//stock ColheTrigo(playerid)
{
     new vid = GetPlayerVehicleID(playerid);
     new modelo = GetVehicleModel(vid);
     if(IsPlayerConnected(playerid))
     {
          if(PlayerToPoint(3.0, playerid, -122.9662, 60.2341, 3.1172))
          {
               if(!IsPlayerInVehicle(playerid, vid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 1;
               //DestroyObject(Planta1[playerid]);
               DestroyObject(ObjetosPlanta[ObjetosPlanta_Atual]);
               //FenoPlantado1[playerid] = CreateObject(806, -122.9662, 60.2341, 3.1172, 0.00000, 0.00000, 0.00000);
          }
          else if(PlayerToPoint(3.0, playerid, -125.3102, 54.6598, 3.1172))
          {
               if(!IsPlayerInVehicle(playerid, vid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 2;
               //DestroyObject(Planta2[playerid]);
               DestroyObject(ObjetosPlanta[ObjetosPlanta_Atual]);
               //FenoPlantado2[playerid] = CreateObject(806, -125.3102, 54.6598, 3.1172, 0.00000, 0.00000, 0.00000);
          }
          else if(PlayerToPoint(3.0, playerid, -127.3887, 49.7169, 3.1172))
          {
               if(!IsPlayerInVehicle(playerid, vid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 3;
               //DestroyObject(Planta3[playerid]);
               DestroyObject(ObjetosPlanta[ObjetosPlanta_Atual]);
               //FenoPlantado3[playerid] = CreateObject(806, -127.3887, 49.7169, 3.1172, 0.00000, 0.00000, 0.00000);
               SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você terminou de colher todo o trigo!");
          }
          if(tempocolheita[playerid] == 5)
          {
               PegaPlanta[playerid] = 0;
               tempocolheita[playerid] = 0;
               KillTimer(colheita[playerid]);
          }
     }
     return 1;
}

stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
    return 0;
}



RE: Objeto não aparece - xbruno1000x - 13/01/2021

(13/01/2021 15:18)LeleziiN Escreveu: Bom eu fiz dessa mandeira como vc disse mais ainda continua sem criar o objeto da planta id 806

Código:
#include <a_samp>
#include <cpstream>
#include <dutils>
#include <foreach>
#include <strlib>
#include <iploc>
#include <streamer>
#include <geopos>
#include <zenner>
#include <mSelection>
#include <progress>
#include <dudb>

#pragma unused ret_memcpy

#define COLOR_RED 0xFF0000FF
#define COR_ORKUT 0xC8E1FFAA
#define COR_MARA1 0xE7FE63FF
#define COR_MARA2 0xEEDC2DFF
#define COR_MARA3 0x33CC66FF
#define COR_ORKUT 0xC8E1FFAA
#define COR_MARA4 0xCCCC99FF
#define COR_MARA5 0x7DC669FF
#define COR_MARA6 0xFFCC66FF
#define COR_MARA7 0xFFCCCCFF
#define OLDCOR_MARA2 0x99CCCCFF
#define COR_PRINCIPAL 0xFFCC66FF
#define COR_PRINCIPALANTIGA 0x96D742AA
#define COR_PRINCIPAL2  0x95BAF0FF
#define COR_PRINCIPAL3  0x2A51E2FF
#define COR_BRANCOXXX   0xFFFFFFAA
#define PM_INCOMING_COLOR     0xFFFF22AA
#define PM_OUTGOING_COLOR     0xFFCC2299
#define CORX1 0xFF5E35FF
#define CORX2 0xFFA275FF
#define CORX3 0xFF5840FF
#define CORX4 0xA0CFCFFF

#define Cor_pizzaboy 0x00FFFFAA

#define Pegarpizza 1
#define TEMPO 15000
#define TEMPO2 15000
#define VERDE 0x80FF00FF
#define grana 1125

new ObjetosPlanta_Atual;
new ObjetosPlanta[50];
#define Planta1   806
#define Maximo_Objetos 1

enum pInfo
{
    fazendeiro
}
new PlayerInfo[MAX_PLAYERS][pInfo];
new sementes[256];
new tempocolheita[MAX_PLAYERS];
new plantacao[MAX_PLAYERS];
new colheita[MAX_PLAYERS];
new TempoPickupX[MAX_PLAYERS] = 0;
new TrigoPlantar[MAX_PLAYERS];
new iconetrigo;
new iconesementes;
new PegaPlanta[MAX_PLAYERS];

AntiDeAMX()
{
    new a[][] =
    {
        "Unarmed (Fist)",
        "Brass K"
    };
    #pragma unused a
}

#pragma tabsize 0

main()
{
    if(dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
    {
        SendRconCommand("reloadfs admin");
        print("\n---------------------------------~~~~~~~~-");
        print(" Sistema de Fazendeiro feito por [TSVR]LeleziN ");
        print("----------------------------------~~~~~~~~\n");
    }
}

public OnGameModeInit()
{
    if(!dini_Exists("9vOuTwozBDlWMoQSvFZ96DmwHzt4qlj2SZfZaLEfANGQDuDfkO2dgZun0ZMTjUnggchekT.ini"))
    {
       for(new I = 0; I < 50; I ++) printf("| INFO | Você não está autorizado a utilizar esse GameMode!");
        sleep(5);
        SendRconCommand("exit");
        return 1;
    }

    print("\n----------------------------------~~~~~~~~~~~~~~~~~~~~");
    print(" Não retire os Creditos pfvr - Criador [TSVR]LeleziN ");
    print("----------------------------------~~~~~~~~~~~~~~~~~~~~\n");

    SetGameModeText("Criador:[TSVR]LeleziN");
    AddPlayerClass(0, 499.9279,-77.9556,998.7578,6.4781, 0, 0, 0, 0, 0, 0);

    AddStaticVehicle(531,-138.2246,-26.4447,3.0819,250.2383,36,2); // cvf
    AddStaticVehicle(531,-139.2512,-29.1861,3.0836,249.3920,51,53); // cvf1
    AddStaticVehicle(531,-140.2695,-31.9092,3.0816,250.3399,36,2); // cvf2
    AddStaticVehicle(531,-141.4217,-34.8857,3.0808,251.3955,51,53); // cvf3
    AddStaticVehicle(531,-142.6157,-37.6843,3.0805,252.7454,36,2); // cvf4
    AddStaticVehicle(532,-142.2160,-21.7359,4.0932,66.3268,0,0); // cvfv
    AddStaticVehicle(532,-145.6867,-30.4260,4.0932,67.3693,0,0); // cvfv1
    AddStaticVehicle(532,-148.9681,-38.8549,4.1092,70.9642,0,0); // cvfv2
    AddStaticVehicle(532,-152.4587,-47.7776,4.0898,71.4296,0,0); // cvfv3
    AddStaticVehicle(532,-155.8328,-56.4386,4.0936,71.4490,0,0); // cvfv4
    iconetrigo = CreatePickup(1239, 23, -100.9928, -32.9734, 3.1094, -1);
    iconesementes = CreatePickup(1239, 23, -96.6817, -23.7974, 3.1172, -1);
    //Create3DTextLabel("Iniciar Plamtação", 0xFFFFFFFF, -100.9928, -32.9734, 3.1094, 50, 0, 0);
   
    for(new A = 0; A < Maximo_Objetos; A ++)
    {
         ObjetosPlanta[A] = CreateObject(Planta1, 0.0, 0.0, -9999, 0.0, 0.0, 0.0);
    }
    return 1;
}

public OnGameModeExit()
{
    ZN_Exit();
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, -1629.1534,-2239.1914,31.4766);
    SetPlayerCameraPos(playerid, -1632.6943,-2239.0200,31.4766);
    SetPlayerCameraLookAt(playerid, -1632.6943,-2239.0200,31.4766);
    return 1;
}

public OnPlayerConnect(playerid)
{
    AntiDeAMX();
   
    new File[70], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(File, sizeof(File), "%s.ini", pname);
    if(ZN_FileExists(File))
    {
        PlayerInfo[playerid][fazendeiro] = ZN_GetInt(File, "Profissao");
    }
    else
    {
        ZN_CreateFile(File);
        ZN_SetInt(File, "Profissao", 0);
        ZN_SaveFile();
        OnPlayerConnect(playerid);
    }
       return 1;
}

public OnPlayerDisconnect(playerid)
{
    TempoPickupX[playerid] = 0;
    KillTimer(plantacao[playerid]);
    KillTimer(colheita[playerid]);
   
    new File[70], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(File, sizeof(File), "%s.ini", pname);
    ZN_SetInt(File, "Profissao", PlayerInfo[playerid][fazendeiro]);
    ZN_SaveFile();
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, -100.9928,-32.9734,3.1094);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(TempoPickupX[playerid] == 0)
    {
        if(pickupid == iconetrigo)
        {
            TempoPickupX[playerid] = 10;
        }
       
        if(pickupid == iconesementes)
        {
            TempoPickupX[playerid] = 10;
        }
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);
    
    if(strcmp(cmd, "/virarf", true) == 0)
    {
         PlayerInfo[playerid][fazendeiro] = 1;
         SendClientMessage(playerid, Cor_pizzaboy, "| INFO | Parabéns, você virou um fazendeiro");
         return 1;
    }
   
    if(strcmp(cmd, "/sairemprego", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              PlayerInfo[playerid][fazendeiro] = 0;
              SendClientMessage(playerid, Cor_pizzaboy, "| INFO | Parabens, você não é mais um fazendeiro");
         }
         else
         {
              SendClientMessage(playerid, CORX1, "| ERRO | Você não tem um emprego!");
         }
         return 1;
    }
   
    if(strcmp(cmd, "/plantar", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              if(sementes[playerid] != 1)
              {
                   SendClientMessage(playerid, CORX1, "| ERRO | Você não pegou as sementes!");
                   return 1;
              }
              if(sementes[playerid] != 0)
              {
                   new Float:X, Float:Y, Float:Z;
                   GetPlayerPos(playerid,X,Y,Z);
                   if(IsPlayerInRangeOfPoint(playerid, 3.0, -100.9928, -32.9734, 3.1094))
                   {
                        new pname[MAX_PLAYER_NAME], string[48];
                        GetPlayerName(playerid, pname, sizeof(pname));
                        format(string, sizeof(string), "* %s.", pname );
                        TrigoPlantar[playerid] = 0;
                        SetPlayerCheckpoint(playerid,-100.9928, -32.9734, 3.1094,3);
                        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você iniciou o trabalho, vá até o primeiro ponto para plantar!");
                        SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Lembre-se de levar um Combine(Colheitadeira), você precisará dele para colher!");
                        SetTimerEx("Plantando",TEMPO,1,"i",playerid);
                   }
                   else
                   {
                        SendClientMessage(playerid, CORX1,"| ERRO | Você não iniciou uma plantação.");
                        return 1;
                   }
              }
         }
         else
         {
              SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
              return 1;
         }
         return 1;
    }
    
    if(strcmp(cmd, "/pegars", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              if(IsPlayerInRangeOfPoint(playerid, 3.0, -96.6817, -23.7974, 3.1172))
              {
                   sementes[playerid] = 1;
                   //SetPlayerCheckpoint(playerid,-96.6817, -23.7974, 3.1172, 3);
                   SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você pegou as sementes agora vá plantar!");
              }
              else
             {
                 SendClientMessage(playerid, CORX1,"| ERRO | Você não está no icone de plantação.");
                 return 1;
             }
         }
         else
         {
              SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
              return 1;
         }
         return 1;
    }
    
    if(strcmp(cmd, "/sairtrabalho", true) == 0)
    {
         if(PlayerInfo[playerid][fazendeiro] == 1)
         {
              DisablePlayerCheckpoint(playerid);
              PlayerInfo[playerid][fazendeiro] = 1;
              sementes[playerid] = 0;
         }
         else
         {
              SendClientMessage(playerid,CORX1,"| ERRO | Você não tem permissão!");
         }
         return 1;
    }
    return 1;
}

forward Plantando(playerid);
public Plantando(playerid)
{
    TogglePlayerControllable(playerid, 0);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    if(PlayerInfo[playerid][fazendeiro] == 1)
    {
         PlayerInfo[playerid][fazendeiro] = 2;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid, -122.9662,60.2341,3.1172, 3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         //SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 2)
    {
         PlayerInfo[playerid][fazendeiro] = 3;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-125.3102,54.6598,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    /*if(PlayerInfo[playerid][fazendeiro] == 3)
    {
         PlayerInfo[playerid][fazendeiro] = 4;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-127.3887,49.7169,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 4)
    {
         PlayerInfo[playerid][fazendeiro] = 5;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-129.4673,44.7740,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 5)
    {
         PlayerInfo[playerid][fazendeiro] = 6;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-131.1393,39.2527,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 6)
    {
         PlayerInfo[playerid][fazendeiro] = 7;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-134.2140,31.8283,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 7)
    {
         PlayerInfo[playerid][fazendeiro] = 8;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-136.6156,25.5480,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 8)
    {
         PlayerInfo[playerid][fazendeiro] = 9;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-138.6541,20.2173,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 9)
    {
         PlayerInfo[playerid][fazendeiro] = 10;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-140.8140,14.5691,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 10)
    {
         PlayerInfo[playerid][fazendeiro] = 11;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-143.3389,7.9665,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 11)
    {
         PlayerInfo[playerid][fazendeiro] = 12;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-145.1427,3.7968,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 12)
    {
         PlayerInfo[playerid][fazendeiro] = 13;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-147.3560,-1.6823,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 13)
    {
         PlayerInfo[playerid][fazendeiro] = 14;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-149.6363,-7.6452,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 14)
    {
         PlayerInfo[playerid][fazendeiro] = 15;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-152.0379,-13.9255,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 15)
    {
         PlayerInfo[playerid][fazendeiro] = 16;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-154.8134,-21.1834,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 16)
    {
         PlayerInfo[playerid][fazendeiro] = 17;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-158.0738,-29.7095,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 17)
    {
         PlayerInfo[playerid][fazendeiro] = 18;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-160.9416,-36.4722,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 18)
    {
         PlayerInfo[playerid][fazendeiro] = 19;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-163.1015,-42.1204,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }
    if(PlayerInfo[playerid][fazendeiro] == 19)
    {
         PlayerInfo[playerid][fazendeiro] = 20;
         TogglePlayerControllable(playerid, 1);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-165.5032,-48.4008,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid,-1,"{1e90ff}| INFO | {FFFFFF}Siga para o próximo checkpoint!");
         return 1;
    }*/
    if(PlayerInfo[playerid][fazendeiro] == 3)//20
    {
         PlayerInfo[playerid][fazendeiro] = 1;
         TogglePlayerControllable(playerid, 1);
         DisablePlayerCheckpoint(playerid);
         TrigoPlantar[playerid] = 1;
         SetPlayerCheckpoint(playerid,-127.3887,49.7169,3.1172,3);
         //SetPlayerCheckpoint(playerid,-168.4018,-55.9808,3.1172,3);
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0);
         SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Você plantou em todos os locais. Aguarde 1 minuto para colher!");
         SendClientMessage(playerid, -1,"{1e90ff}| INFO | {FFFFFF}Localização apagada com sucesso!");
         DisablePlayerCheckpoint(playerid);

         new Float:x, Float:y, Float:z;
         GetPlayerPos(playerid, x, y, z);
         ObjetosPlanta[ObjetosPlanta_Atual] =  CreateObject(806, x, y, z, 0.0, 0.0, 96.0);
         ObjetosPlanta_Atual++;
         SetTimerEx("TrigoColher", TEMPO2, 0, "i", playerid);//1
         return 1;
    }
    return 1;
}

forward TrigoColher(playerid);
public TrigoColher(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        //new Float:X, Float:Y, Float:Z;
        SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Sua plantação está pronta para ser colhida!");
        SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você precisa de um Combine(Colheitadeira) para colher o trigo!");
        SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você possui um prazo de 3 minutos para colher o trigo!");
        if(TrigoPlantar[playerid] == 1)
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            PegaPlanta[playerid] = 1;
            //GetObjectPos(Planta1[playerid], X, Y, Z);
            //Planta1[playerid] = CreateObject(806, -122.9662, 60.2341, 3.1172, 0.00000, 0.00000, 0.00000);
            if(ObjetosPlanta_Atual >= (Maximo_Objetos - 1)) ObjetosPlanta_Atual = -1;
            ObjetosPlanta_Atual ++;
            ObjetosPlanta[ObjetosPlanta_Atual] = CreateObject(Planta1, -122.9662, 60.2341, 3.1172, 0.0, 0.0, 0.0);
        }
        else if(TrigoPlantar[playerid] == 2)
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            PegaPlanta[playerid] = 1;
            //GetObjectPos(Planta2[playerid], X, Y, Z);
            //Planta2[playerid] = CreateObject(806, -125.3102, 54.6598, 3.1172, 0.00000, 0.00000, 0.00000);
            if(ObjetosPlanta_Atual >= (Maximo_Objetos - 1)) ObjetosPlanta_Atual = -1;
            ObjetosPlanta_Atual ++;
            ObjetosPlanta[ObjetosPlanta_Atual] = CreateObject(Planta1, -125.3102, 54.6598, 3.1172, 0.0, 0.0, 0.0);
        }
        /*else if(TrigoPlantar[playerid] == 3)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -127.3887, 49.7169, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 4)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -129.4673, 44.7740, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 5)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -131.1393, 39.2527, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 6)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -134.2140, 31.8283, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 7)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -136.6156, 25.5480, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 8)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -138.6541, 20.2173, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 9)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -140.8140, 14.5691, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 10)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -143.3389, 7.9665, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 11)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -145.1427, 3.7968, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 12)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -147.3560, -1.6823, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 13)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -149.6363, -7.6452, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 14)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -152.0379, -13.9255, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 15)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -154.8134, -21.1834, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 16)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -158.0738, -29.7095, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 17)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -160.9416, -36.4722, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 18)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -163.1015, -42.1204, 3.1172, 0.00000, 0.00000, 0.00000);
        }
        else if(TrigoPlantar[playerid] == 19)
        {
            PegaPlanta[playerid] = 1;
            CreateObject(806, -165.5032, -48.4008, 3.1172, 0.00000, 0.00000, 0.00000);
        }*/
        else if(TrigoPlantar[playerid] == 3)//20
        {
            PlayerInfo[playerid][fazendeiro] = 2;
            TrigoPlantar[playerid] = 1;
            PegaPlanta[playerid] = 1;
            //GetObjectPos(Planta3[playerid], X, Y, Z);
            //Planta3[playerid] = CreateObject(806, -127.3887, 49.7169, 3.1172, 0.00000, 0.00000, 0.00000);
            if(ObjetosPlanta_Atual >= (Maximo_Objetos - 1)) ObjetosPlanta_Atual = -1;
            ObjetosPlanta_Atual ++;
            ObjetosPlanta[ObjetosPlanta_Atual] = CreateObject(Planta1, -127.3887, 49.7169, 3.1172, 0.0, 0.0, 0.0);
            //CreateObject(806, -168.4018, -55.9808, 3.1172, 0.00000, 0.00000, 0.00000);
            SetTimerEx("ColheTrigo", TEMPO, 0, "i", playerid);
        }
    }
    return 1;
}

forward ColheTrigo(playerid);
public ColheTrigo(playerid)
//stock ColheTrigo(playerid)
{
     new vid = GetPlayerVehicleID(playerid);
     new modelo = GetVehicleModel(vid);
     if(IsPlayerConnected(playerid))
     {
          if(PlayerToPoint(3.0, playerid, -122.9662, 60.2341, 3.1172))
          {
               if(!IsPlayerInVehicle(playerid, vid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 1;
               //DestroyObject(Planta1[playerid]);
               DestroyObject(ObjetosPlanta[ObjetosPlanta_Atual]);
               //FenoPlantado1[playerid] = CreateObject(806, -122.9662, 60.2341, 3.1172, 0.00000, 0.00000, 0.00000);
          }
          else if(PlayerToPoint(3.0, playerid, -125.3102, 54.6598, 3.1172))
          {
               if(!IsPlayerInVehicle(playerid, vid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 2;
               //DestroyObject(Planta2[playerid]);
               DestroyObject(ObjetosPlanta[ObjetosPlanta_Atual]);
               //FenoPlantado2[playerid] = CreateObject(806, -125.3102, 54.6598, 3.1172, 0.00000, 0.00000, 0.00000);
          }
          else if(PlayerToPoint(3.0, playerid, -127.3887, 49.7169, 3.1172))
          {
               if(!IsPlayerInVehicle(playerid, vid))
               {
                    return 1;
               }
               if(modelo != 532)
               {
                    return 1;
               }
               PegaPlanta[playerid] = 1;
               tempocolheita[playerid] = 3;
               //DestroyObject(Planta3[playerid]);
               DestroyObject(ObjetosPlanta[ObjetosPlanta_Atual]);
               //FenoPlantado3[playerid] = CreateObject(806, -127.3887, 49.7169, 3.1172, 0.00000, 0.00000, 0.00000);
               SendClientMessage(playerid, -1, "{1e90ff}| INFO | {FFFFFF}Você terminou de colher todo o trigo!");
          }
          if(tempocolheita[playerid] == 5)
          {
               PegaPlanta[playerid] = 0;
               tempocolheita[playerid] = 0;
               KillTimer(colheita[playerid]);
          }
     }
     return 1;
}

stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
    return 0;
}
Não achei o MoveObject em lugar algum. Você tem que criar na OnGameModeInit e usar o MoveObject quando o player passar pelo checkpoint.