SA-MP Forums Archive
[DUV]Sobre SetVehicleNumberPlate - 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: [DUV]Sobre SetVehicleNumberPlate (/showthread.php?tid=206984)



[DUV]Sobre SetVehicleNumberPlate - PsyShotter - 05.01.2011

Sei que na versгo 0.3c, as placas voltaram. Tambйm sei adicionб-las. Mas tenho uma pequena dъvida... Hб algum cуdigo que gere valores aleatуrios de placas para todos os veнculos criados? para que eu nгo tenha que ficar digitando 1 por 1??


Respuesta: [DUV]Sobre SetVehicleNumberPlate - ipsBruno - 05.01.2011

https://sampwiki.blast.hk/wiki/Random

pawn Код:
stock CreateVehicleNumberPlate(vehicleid)
{
    PlatePoint:
    new
        nPlate = Ramdom(99999),
        sPlate[22]
    ;
    if(Plate < 10000)
        goto PlatePoint;
    format(sPlate,22,"Plate: %d",nPlate);
    SetVehicleNumberPlate(vehicleid,sPlate);
    return SetVehicleToRespawn(vehicleid)
}



Re: [DUV]Sobre SetVehicleNumberPlate - PsyShotter - 05.01.2011

Valeu Drakins, nгo testei ainda, mas logo quando eu terminar os comandos de meu TDM, irei testar ^^