SA-MP Forums Archive
How can I make every licence plate say one thing? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can I make every licence plate say one thing? (/showthread.php?tid=462979)



How can I make every licence plate say one thing? - ExtendedCarbon - 09.09.2013

I want to set all the number plates to a piece of defined text.
I know I can use max_vehicles in some part. But I need further help thanks


Re: How can I make every licence plate say one thing? - Luis- - 09.09.2013

pawn Код:
for(new j = 0; j != MAX_VEHICLES; j++) {
    SetVehicleNumberPlate(j, "Change");
    return 1;
}
Try this buddy.


Re: How can I make every licence plate say one thing? - Jstylezzz - 09.09.2013

something like this I guess
pawn Код:
new changedplates[MAX_VEHICLES];
public OnVehicleSpawn(vehicleid)
{
    if(changedplates[vehicleid] != 1)
    {
        SetVehicleNumberPlate(vehicleid,"YOUR_TEXT");
        SetVehicleToRespawn(vehicleid);
        changedplates[vehicleid] = 1;
    }
}
Or use Luis' code


Re: How can I make every licence plate say one thing? - ExtendedCarbon - 09.09.2013

Quote:
Originally Posted by Luis-
Посмотреть сообщение
pawn Код:
for(new j = 0; j != MAX_VEHICLES; j++) {
    SetVehicleNumberPlate(j, "Change");
    return 1;
}
Try this buddy.
Would I put this onplayerupdate?


Re: How can I make every licence plate say one thing? - Jstylezzz - 09.09.2013

Put it after you have created all the vehicles. If you create them in OnGameModeInit, then put it after all the createvehicle/addstaticvehicle code.