[Ajuda] Comando de profissao
#1

To precisando de uma ajuda. Eu tenho o comando para a profissao Petroleiro que e /carregarp ele ta tudo ok mas eu quero que alem de ele ter que tar dentro do carro tem que estar com a carreta.

Ta ae o codigo.

pawn Код:
if (strcmp(cmd, "/carregarp", true) == 0)
{
    new VehicleID;
    VehicleID = GetPlayerVehicleID(playerid);
    new modelo;
    modelo = GetVehicleModel(VehicleID);
    if (modelo == 514) {
            if (PlayerToPoint(30.0, playerid, 213.689453, 1409.774169, 10.585937))
            {
                if (Carregamento[playerid] == 0)
                {
                    SendClientMessage(playerid, PETROLEIRO, "| PETROLEIRA FORT CARSON | Veнculo carregado com sucesso!");
                    SendClientMessage(playerid, PETROLEIRO, "| PETROLEIRA FORT CARSON | Para descarregб-lo, vб atй ao postos espalhados por San Andreas.");
                    SendClientMessage(playerid, PETROLEIRO, "| PETROLEIRA FORT CARSON | Cada Posto tem um valor diferente.");
                    Carregamento[playerid] = 1;
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "| ERRO | Seu caminhгo jб estб carregado!");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "| ERRO | Vocк nгo estб na Бrea de Carregamento");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "| ERRO | Vocк nгo estб em um veнculo ( Tanker )");
            return 1;
        }
    }
Se alguem poder me ajudar eu agradecia.
Reply
#2

pawn Код:
if (strcmp(cmd, "/carregarp", true) == 0)
{
    new VehicleID;
    VehicleID = GetPlayerVehicleID(playerid);
    new modelo;
    modelo = GetVehicleModel(VehicleID);
    if (modelo == 514 || 584) {
            if (PlayerToPoint(30.0, playerid, 213.689453, 1409.774169, 10.585937))
            {
                if (Carregamento[playerid] == 0)
                {
                    SendClientMessage(playerid, PETROLEIRO, "| PETROLEIRA FORT CARSON | Veнculo carregado com sucesso!");
                    SendClientMessage(playerid, PETROLEIRO, "| PETROLEIRA FORT CARSON | Para descarregб-lo, vб atй ao postos espalhados por San Andreas.");
                    SendClientMessage(playerid, PETROLEIRO, "| PETROLEIRA FORT CARSON | Cada Posto tem um valor diferente.");
                    Carregamento[playerid] = 1;
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "| ERRO | Seu caminhгo jб estб carregado!");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "| ERRO | Vocк nгo estб na Бrea de Carregamento");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "| ERRO | Vocк nгo estб em um veнculo ( Tanker )");
            return 1;
        }
    }
Reply
#3

Carreta ? Especifique a carreta..
Reply
#4

Й o trailer que no samp й o id 584
Reply
#5

Standby agora nao preciso de tar no caminhao nem no Trailer que ele carrega na mesma. Ele simplesmente dб o erro que Eu nao estou na бrea de carregamento.

Penso que й enquanto tб

pawn Код:
if (modelo == 514 || 584) {
Porque se estiver assim

pawn Код:
if (modelo == 514) {
Ele diz que eu preciso de estar no caminhao

Alguem pode me ajudar ?
Reply
#6

Desculpem pelo triple post mas serб que alguйm pode me ajudar ja pesquisei e ja tentei varias vezes mas nao consigo.

Help pfv.
Reply
#7

pawn Код:
if(GetVehicleTrailer(GetPlayerVehicleID(playerid)) == 584)return SendClientMessage(playerid, 0xFFFFFFAA, "| ERRO | Vocк nгo possue um Trailer de petroleo");
Reply
#8

Consegui coloquei assim:

pawn Код:
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, Vermelho, "| ERRO | Vocк nгo possui um Trailer!");
Vlw por me ajudar.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)