SA-MP Forums Archive
[PEDIDO] Plate = VehicleID - 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: [PEDIDO] Plate = VehicleID (/showthread.php?tid=300142)



[PEDIDO] Plate = VehicleID - Aquilis - 28.11.2011

Estou tentando fazer com que as placas dos veнculos sejam iguais ao ID dos mesmos. Mas nгo conseguir , alguйm tem?


Re: [PEDIDO] Plate = VehicleID - CaioMors - 29.11.2011

Da Proxima vez.. Use o Search amigo..

pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{    
new string[5];    
format(string, sizeof(string), "%d",GetPlayerVehicleID(playerid));    
SetVehicleNumberPlate(vehicleid, string);    
return 1;
}



Re: [PEDIDO] Plate = VehicleID - Aquilis - 29.11.2011

Desculpe, mas isto estб correto й no OnPlayerEnterVehicle mesmo??


Re: [PEDIDO] Plate = VehicleID - ReDKiiL - 29.11.2011

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    new plate[4];
    format(plate, sizeof(plate),"%d",vehicleid);
    SetVehicleNumberPlate(vehicleid,plate);
    return 1;
}
Ve Se Da Ae Nem Testei



Re: [PEDIDO] Plate = VehicleID - CaioMors - 29.11.2011

Sim, na hora que o Player Entrar no Veiculo aparecera
O ID Do Veiculo. (:
Ow se Preferir use .

pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    new string[50];
    format(string,sizeof(string),"Placa do Veнculo: %d",vehicleid);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
}



Re: [PEDIDO] Plate = VehicleID - ViniBorn - 29.11.2011

pawn Код:
new string[5];

new plate[24];

new string[50];
Nгo precisa disso tudo gente : D


Re: [PEDIDO] Plate = VehicleID - Adrian Fahrenheit Tepes - 29.11.2011

pawn Код:
public OnGameModeInit()
{
    for(new v = o; v < MAX_VEHICLES; v++)
    {
        new plate[10];
        format(plate, sizeof(plate),"%d",v);
        SetVehicleNumberPlate(v,plate);
    }
    return 1;
}
Meu modo й o mais correto. Motivo: com o OnPlayerEnterVehicle, a placa sу serб setada quando o JOGADOR ENTRAR no veнculo. Jб com o OnVehicleSpawn, a placa sу serб setada quando o veнculo for re-spawnado, ou seja, o veнculo teria que ser destruido, ou simplesmente spawnado mesmo.

com o OnGameModeInit, й no momento em que os veнculos sгo criados, e ah! pхe o cуdigo que eu mandei depois dos veнculo adicionados no OnGameModeInit.


Re: [PEDIDO] Plate = VehicleID - ViniBorn - 29.11.2011

pawn Код:
public OnGameModeInit()
{
    for(new v = o; v < MAX_VEHICLES; v++)
    {
        new plate[10];
        format(plate, sizeof(plate),"%d",v);
        SetVehicleNumberPlate(v,plate);
    }
    return 1;
}
A placa continuarб a sendo a padrгo sem isto...

pawn Код:
SetVehicleToRespawn(v);