SA-MP Forums Archive
[Ajuda] SetVehicleParamsEx - 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] SetVehicleParamsEx (/showthread.php?tid=549066)



SetVehicleParamsEx - DeadNudock - 04.12.2014

Alguйm pode me ajudar? tipo, eu queria consertar este bug, mais nгo consigo, alguйm?

Aqui nгo mostra a placa.
pawn Код:
public InfoVeiculo()
{
    for(new vehicleid = 0; vehicleid < MAX_VEHICLES; vehicleid++)
    {
        new string3[10];
        format(string3, sizeof(string3),"ABC-%04d", vehicleid);
        SetVehicleNumberPlateEx(vehicleid, string3);
        SetVehicleToRespawn(vehicleid);
    }
    return true;
}

new numplate[MAX_VEHICLES][9];
forward SetVehicleNumberPlateEx(vehicleid, const numberplate[]);
public SetVehicleNumberPlateEx(vehicleid, const numberplate[])
{
    format(numplate[vehicleid], sizeof(numplate), "%s", numberplate);
    format(Carro[vehicleid][cChave], sizeof(numplate), "%s", numberplate);
    SetVehicleNumberPlate(vehicleid, numplate[vehicleid]);
}

Aqui nгo desliga os veнculos do sv.. alguйm?
pawn Код:
for(new Veiculo = 1; Veiculo < MAX_VEHICLES; Veiculo++)
    {
        GetVehicleParamsEx(Veiculo, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(Veiculo, false, lights, false, doors, bonnet, boot, objective);
        engine = 0;
    }



Re: SetVehicleParamsEx - n0minal - 04.12.2014

Код:
Fix placas:

public InfoVeiculo()
{
    for(new vehicleid; vehicleid < MAX_VEHICLES; vehicleid++)
    {
        new string3[10];
        format(string3, sizeof(string3),"ABC-%04d", vehicleid);
        SetVehicleNumberPlate(vehicleid, string3);
        SetVehicleToRespawn(vehicleid);
    }
    return true;
}


Fix loop:

for(new Veiculo; Veiculo < MAX_VEHICLES; Veiculo++)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(Veiculo, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(Veiculo, 0, lights, 0, doors, bonnet, boot, objective);
}