[Ajuda] Carregar ao pegar o trailer
#1

eae galera blz eu to fasendo um Carregamento altomatico que carrega so de vc pegar o trailer e ta dificil meu amigo mando eu usar o
pawn Код:
if(IsTrailerAttachedToVehicle())
tudo mais nгo ta funfando eu queria que quando o caminhao id 514 ingata-se no trailer de petroleo id 584 ele carregaria altomatico fis assim mais ta tudu errado

pawn Код:
if(IsTrailerAttachedToVehicle(584))
{
    printf("[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!",584);
}
dai uns caras mandaro eu usar o Settimer junto com isso mais nгo sei faser isso muito bem alguem ai me ajuda ?
Reply
#2

Ta meio errado umas coisas ai o.O

PHP код:
if(IsTrailerAttachedToVehicle(584))
{
    
SendClientMessage(playerid,-1,"[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!");

Reply
#3

Olб colega,

Se vocк pesquisasse um pouco saberia que nгo se usa "printf" em algo que nгo seja imprimido no console.

Abraзos
Reply
#4

cara eu fis assim

pawn Код:
if (strcmp(cmd, "/carregar", true) == 0)
    {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Petroleiro){
    }
        new VehicleID;
        VehicleID = GetPlayerVehicleID(playerid);
        new modelo;
        modelo = GetVehicleModel(VehicleID);
        if (modelo == 584)
if(IsTrailerAttachedToVehicle(584))
{
    SendClientMessage(playerid,-1,"[ INFO ] Seu caminhгo estб carregado com petroleo leve-o atй um posto!");
}

        {
            if (PlayerToPoint(60.0, playerid, 269.8848,1352.7755,10.5859))
            {
                SetPlayerMapIcon(playerid, 81, -1026.4006, -625.2548, 32.0078, 51, 0); //Posto1
                SetPlayerMapIcon(playerid, 82, 2819.81, 915.62, 11.77, 51, 0); //Posto1
                if (Carregamento[playerid] == 0)
                {
                }

                else
                {
                    SendClientMessage(playerid, Amarelo, "** Seu caminhгo Foi Carregado!");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "** Vocк nгo estб na бrea de carga");
                return 1;
            }

        }


    }
acho que ta erradu ne
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)