25.03.2019, 20:03
Imagino que esteja faltando um return 1.
PHP код:
if(strcmp("/plantarmaconha", cmdtext, true, 10) == 0)
{
if(PlayerLeo[playerid][Profissao] != FAZENDEIRO) {
SendClientMessage(playerid, COR_ERRO, "| ERRO | Vocк nгo й um fazendeiro");
return 1;
}
if(PlayerLeo[playerid][Sementes] <= 2) {
SendClientMessage(playerid, COR_ERRO, "| ERRO | Vocк nгo tem sementes o suficiente para plantar maconha (2 Sementes necessбrias)");
return 1;
}
if(Plantando[playerid] == 1) {
SendClientMessage(playerid, COR_ERRO, "| ERRO | Jб comeзou a plantar espere atй crescer para plantar novamente.");
return 1;
}
for(new i = 0; i < sizeof(PosicaoPlantacao); i ++)
{
if(IsPlayerInRangeOfPoint(playerid, 1, PosicaoPlantacao[i][posX], PosicaoPlantacao[i][posY], PosicaoPlantacao[i][posZ]))
{
new string[128];
SendClientMessage(playerid, -1, "| INFO | Vocк comeзou a plantar maconha, espere atй crescer e colha.");
ApplyAnimation(playerid,"BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 32000, 1);
ApplyAnimation(playerid,"BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 32000, 1);
PlayerLeo[playerid][Sementes] -= 2;
Plantando[playerid] = 1;
Colher[playerid] = 1;
Colhido[playerid] = 0;
SetTimerEx("Plantar1", 30000, false, "i", playerid);
return 1;
}
}
return 1;
}