SA-MP Forums Archive
[Ajuda] Comando nгo existe - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando nгo existe (/showthread.php?tid=662485)



Comando nгo existe - k2bi - 02.01.2019

Estou com problemas neste comando.
Ao digitar ele fora do local de entrega ele funciona normal, verifica e tals....
Mas quando eu entro no local de entrega ele diz que o comando nгo existe. Alguem pode me ajudar ?

Quote:

CMD:descarregar (playerid)
{
new file[128], Linerunner, imposto, str[128], taxa;
Linerunner = 403;
format(file, sizeof(file), Contas, PlayerName(playerid));
if(DOF2_GetInt(file, "EmpregoID") != 6) return SendClientMessage(playerid, CMD_ERRO, "Apenas caminhoneiros podem usar este comando.");
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != Linerunner) return SendClientMessage(playerid, CMD_ERRO, "Vocк nгo estб dentro de um {FFFFFF}Linerunner.");
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID( playerid))) return SendClientMessage(playerid, CMD_ERRO, "Nгo hб um trailer anexo em seu caminhгo.");
if(ProdutosVeh[GetPlayerVehicleID(playerid)] <=0) return SendClientMessage(playerid, CMD_ERRO, "Nгo hб produtos no seu caminhгo.");
format(file, sizeof(file), Pasta_Empresas, 30);
if(IsPlayerInRangeOfPoint(playerid, 15, DOF2_GetInt(file, "DX"), DOF2_GetInt(file, "DY"), DOF2_GetInt(file, "DZ")))
{

PlayerInfo[playerid][pProds] = DOF2_GetInt(file, "Pedidos");
PlayerInfo[playerid][pProds] -= ProdutosVeh[GetPlayerVehicleID(playerid)];
DOF2_SetInt(file, "Pedidos", PlayerInfo[playerid][pProds]);
DOF2_SaveFile();
format(str, sizeof(str), Config);
imposto = DOF2_GetInt(str, "Imposto")/100;
taxa = DOF2_GetInt(file, "Pagando")*ProdutosVeh[GetPlayerVehicleID(playerid)]/imposto;
GivePlayerMoneyEx(playerid, taxa);
ProdutosVeh[GetPlayerVehicleID(playerid)] = 0;
if(DOF2_GetInt(file, "Pedidos") <= 0)
{
DOF2_SetInt(file, "Pedidos", 0);
}
SendClientMessage(playerid, -1, "Aguarde! Seu caminhгo estб sendo carregado.");
DOF2_SaveFile();
return 1;

}
format(file, sizeof(file), Pasta_Empresas, 31);
if(IsPlayerInRangeOfPoint(playerid, 15, DOF2_GetInt(file, "DX"), DOF2_GetInt(file, "DY"), DOF2_GetInt(file, "DZ")))
{
PlayerInfo[playerid][pProds] = DOF2_GetInt(file, "Pedidos");
PlayerInfo[playerid][pProds] -= ProdutosVeh[GetPlayerVehicleID(playerid)];
DOF2_SetInt(file, "Pedidos", PlayerInfo[playerid][pProds]);
DOF2_SaveFile();
format(str, sizeof(str), Config);
imposto = DOF2_GetInt(str, "Imposto")/100;
taxa = DOF2_GetInt(file, "Pagando")*ProdutosVeh[GetPlayerVehicleID(playerid)]/imposto;
GivePlayerMoneyEx(playerid, taxa);
ProdutosVeh[GetPlayerVehicleID(playerid)] = 0;
if(DOF2_GetInt(file, "Pedidos") <= 0)
{
DOF2_SetInt(file, "Pedidos", 0);
}
SendClientMessage(playerid, -1, "Aguarde! Seu caminhгo estб sendo carregado.");
DOF2_SaveFile();
return 1;
}

return 1;
}




Re: Comando nгo existe - ipsLuan - 03.01.2019

Use prints (debug) para saber atй onde o comando й executado.