SA-MP Forums Archive
[Ajuda] Carregar se estiver com o trailer - 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] Carregar se estiver com o trailer (/showthread.php?tid=437179)



Carregar se estiver com o trailer - Cromado - 14.05.2013

pessoal alguem ai me ajuda a /carregar so se estiver com o trailer? eu tentei de varios geito usei search e nada alguem ai ajuda a carregar se estiver com o trailer de id 584 eo caminhao 514

pawn Код:
if (strcmp(cmd, "/carregarp", 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 == 514)

        {
            if (PlayerToPoint(60.0, playerid, 269.9238,1351.9838,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)
                {
                    SendClientMessage(playerid, COLOR_GREEN, "* Seu caminhгo foi carregado!");
                    SendClientMessage(playerid, COLOR_GREEN, "* Para descarregar va atй um posto,");
                    Carregamento[playerid] = 0;
                    return 1;
                }

                else
                {
                SendClientMessage(playerid, Vermelho, "* Vocк nгo estб com um trailer de petroleo");
                if (modelo == 584)
                return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "** Vocк nгo estб na бrea de carga");
                return 1;
            }

        }


    }



Re: Carregar se estiver com o trailer - Delete_ - 14.05.2013

pawn Код:
if (strcmp(cmd, "/carregarp", 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 == 514)
        {
            if(IsTrailerAttachedToVehicle(VehicleID))
            {
                if (PlayerToPoint(60.0, playerid, 269.9238,1351.9838,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)
                    {
                        SendClientMessage(playerid, COLOR_GREEN, "* Seu caminhгo foi carregado!");
                        SendClientMessage(playerid, COLOR_GREEN, "* Para descarregar va atй um posto,");
                        Carregamento[playerid] = 0;
                        return 1;
                    }

                    else
                    {
                        SendClientMessage(playerid, Vermelho, "* Vocк nгo estб com um trailer de petroleo");
                        if (modelo == 584)
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "** Vocк nгo estб na бrea de carga");
                    return 1;
                }
            }
        }
    }
    return 1;
}



Re: Carregar se estiver com o trailer - Cromado - 14.05.2013

Vlw lek muitas reputaзгo pra tu