SA-MP Forums Archive
[Ajuda] Como definir o ID dos carros quando adiciono - 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] Como definir o ID dos carros quando adiciono (/showthread.php?tid=498781)



Como definir o ID dos carros quando adiciono - flafi1998 - 05.03.2014

Quando adiciono carros os carros misturam- se todos, por exemplo so da gang groove street tento entrar no carro e diz que o carro й dos policiais, estгo todos assim. Queria saber se posso definir o ID dos carros por mim mesmo para isto nгo acontecer e como faze-lo?


Re: Como definir o ID dos carros quando adiciono - flafi1998 - 05.03.2014

Como se resolve o problema dos carros bugados, ex: entro num carro da policia e diz que й dos aztecas, alguйm pode ajudar


Re: Como definir o ID dos carros quando adiciono - Schocc - 05.03.2014

REMOVED


Re: Como definir o ID dos carros quando adiciono - flafi1998 - 05.03.2014

codigo dos veiculos:
PHP код:
AddStaticVehicleEx(417,939.7998000,-2632.0000000,15.1000000,0.0000000,255,255,15); //Leviathan
AddStaticVehicleEx(548,973.5000000,-2631.4000000,15.0000000,0.0000000,245,245,15); //Cargobob
AddStaticVehicleEx(425,934.4000000,-2696.7000000,20.6000000,270.0000000,43,62,15); //Hunter
AddStaticVehicleEx(425,969.7002000,-2652.5000000,15.8000000,0.0000000,43,62,15); //Hunter
AddStaticVehicleEx(451,911.0996000,-2640.3000000,17.3000000,0.0000000,240,62,15); //Turismo
AddStaticVehicleEx(451,907.7002000,-2640.3990000,17.3000000,0.0000000,117,-1,15); //Turismo
AddStaticVehicleEx(451,904.4004000,-2640.3990000,16.9000000,0.0000000,12,12,15); //Turismo
AddStaticVehicleEx(451,901.2002000,-2640.5000000,16.8000000,0.0000000,238,236,15); //Turismo
AddStaticVehicleEx(451,898.0000000,-2640.5000000,17.2000000,0.0000000,84,79,15); //Turismo
AddStaticVehicleEx(601,894.5000000,-2640.3990000,14.3000000,0.0000000,245,245,15); //S.W.A.T. Van
AddStaticVehicleEx(601,890.2002000,-2640.3990000,14.8000000,0.0000000,245,245,15); //S.W.A.T. Van
AddStaticVehicleEx(601,886.2998000,-2640.5000000,15.0000000,0.0000000,245,245,15); //S.W.A.T. Van
AddStaticVehicleEx(425,1116.4000000,-2017.5000000,75.3000000,0.0000000,43,62,15); //Hunter
AddStaticVehicleEx(520,1116.3000000,-2056.1000000,75.3000000,0.0000000,-1,-1,15); //Hydra
AddStaticVehicleEx(434,879.7002000,-2640.3990000,15.7000000,0.0000000,38,55,15); //Hotknife
AddStaticVehicleEx(476,-1433.8032000,-507.8747000,14.9001000,208.0810000,19,69,15); //Rustler
AddStaticVehicleEx(447,1570.1000000,-1710.6000000,36.8000000,90.0000000,32,32,15); //Seasparrow
AddStaticVehicleEx(434,882.2002000,-2640.5000000,16.4000000,0.0000000,134,3,15); //Hotknife
AddStaticVehicleEx(429,1559.6000000,-1697.3000000,28.1000000,180.0000000,113,-1,15); //Banshee
AddStaticVehicleEx(468,1563.5000000,-1703.0000000,28.2000000,0.0000000,196,181,15); //Sanchez
AddStaticVehicleEx(451,1555.7000000,-1697.3000000,28.2000000,178.0000000,203,-1,15); //Turismo
AddStaticVehicleEx(434,914.7000000,-2641.3000000,17.4000000,0.0000000,76,-1,15); //Hotknife
AddStaticVehicleEx(502,875.8000000,-2640.0000000,15.1000000,0.0000000,4,25,15); //Hotring Racer A
AddStaticVehicleEx(502,872.3000000,-2639.9000000,15.1000000,0.0000000,93,1,15); //Hotring Racer A
AddStaticVehicleEx(502,869.2000000,-2639.9000000,14.3000000,0.0000000,216,209,15); //Hotring Racer A
AddStaticVehicleEx(556,885.6000000,-2528.3000000,17.4000000,180.0000000,239,253,15); //Monster A
AddStaticVehicleEx(556,889.7000000,-2527.8000000,17.3000000,182.0000000,245,245,15); //Monster A
AddStaticVehicleEx(568,903.7000000,-2528.6000000,16.3000000,182.0000000,139,-1,15); //Bandito
AddStaticVehicleEx(568,894.1000000,-2527.7000000,17.3000000,182.0000000,42,119,15); //Bandito
AddStaticVehicleEx(432,898.4000000,-2528.7000000,16.9000000,182.0000000,95,10,15); //Rhino
AddStaticVehicleEx(553,958.5000000,-2822.6000000,17.5000000,92.0000000,140,146,15); //Nevada
AddStaticVehicleEx(577,949.5000000,-2775.6000000,17.9000000,94.0000000,189,190,15); //AT-400
AddStaticVehicleEx(592,843.7000000,-2692.7000000,20.6000000,178.0000000,249,7,15); //Andromada 



Re: Como definir o ID dos carros quando adiciono - PT - 05.03.2014

refaзa o sistema de carros.

esse tipo ja e muito antigo, normal dar problemas.


Re: Como definir o ID dos carros quando adiciono - brunox - 05.03.2014

Como o schocc jб disse estuda variaveis no entanto vou dar um exemplo!

pawn Код:
new SWAT[MAX_VEHICLES];
forward IsSWATVehicle(vehicleid);

public OnGameModeInit()
{
    SWAT[0] = AddStaticVehicleEx(601,894.5000000,-2640.3990000,14.3000000,0.0000000,245,245,15); // cria o carro da swat
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        new vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        if(IsSWATVehicle(vehicleid)) // Usa a funзгo criada para verificar se й da swat ou nгo
        {
            SendClientMessage(playerid, -1, "Vecк entrou num veiculo da SWAT!")
        }
    }
    return 1;
}

public  IsSWATVehicle(vehicleid) //Funзгo para verificar se o carro й da swat
{
    for(new i = 0; i < sizeof(SWAT); i++)
    {
        if(vehicleid == SWAT[i]) return 1;
    }
    return 0;
}