[Tutorial] How to add text on numberplates all car
#1

Hello Forum

To add a text to the numberplates of all vehicles needed

Paste to OnGameModeInit()

Код:
for(new i=1; i<MAX_VEHICLES; i++)
{
	SetVehicleNumberPlate(i, "SA-MP.COM");
}
Screenshot
Reply
#2

That's not hard, but nice idea
Reply
#3

That easy and very useful for newbie
Reply
#4

thanks
Reply
#5

simple and very helpful.
Reply
#6

wow, lolz, nice one.
I was just thinking about it, and Pop! its there.
Reply
#7

A little suggestion:

Maybe show people how to make random for each car, for example: Samp-1, samp-2 etc.
Reply
#8

Quote:
Originally Posted by Anthonyx3'
Посмотреть сообщение
A little suggestion:

Maybe show people how to make random for each car, for example: Samp-1, samp-2 etc.
pawn Код:
new car1;

car1 = CreateVehicle(422,X,Y,Z,A,-1,-1,5000);

SetVehicleNumberPlate(car1, "SAMP-1");
Reply
#9

pawn Код:
new str[8];
for(new i=1; i<MAX_VEHICLES; i++)
{
    format(str,sizeof(str),"Samp-%d",i);
    SetVehicleNumberPlate(i, str);
}
not random but each car will be by its id...
also you have to put it in the end of the OnGameModeInit
Reply
#10

Tnx is userfull
Reply
#11

for(new i=1; i<2000; i++)
{
new number[128];
format(number,128,"LVR %d%d%d",random(9),random(9),random(9));
SetVehicleNumberPlate(i, number);
}
return 1;
}
Reply
#12

Very simple and useful '-'
On my script i've used the name of owner in the plate ^^
Reply
#13

D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : error 037: invalid string (possibly non-terminated string)
D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : error 017: undefined symbol "Stars"
D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : error 017: undefined symbol "Vale"
D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#14

This is simple, but dont be hating cause people may not think about going about doing it like this :P
Reply
#15

Quote:
Originally Posted by Ehab1911
View Post
D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : error 037: invalid string (possibly non-terminated string)
D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : error 017: undefined symbol "Stars"
D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : error 017: undefined symbol "Vale"
D:\13.17.2010\sdqweqwe\nlife\NLRP\gamemodes\sarp.p wn(14375) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Put that in ", so will be like this:
Code:
SetVehicleNumberPlate(vehicleid,"Stars Vale");
Reply
#16

How about European ones? i hate the american plates they look fake ..like this somhow? http://www.olavsplates.com/faroe_islands.html juyst [ex. Faroe Islands , Germany, Austria,etc....]
Reply
#17

Thanks, but the name still XYZR 0000 , how to fix this ?
Reply
#18

You need to respawn the cars, to change the Number Plate
Reply
#19

help people, I want to do instead of 3dtabel numbers. Here's the code:

Quote:

DespawnOwnableVehicle ( vehid );
TogglePlayerControllable( playerid, true );
SetPlayerCheckpointEx( playerid, CHECKPOINT_VEHICLE,
VehInfo[ playerid ][ slot ][ vPos_x ],
VehInfo[ playerid ][ slot ][ vPos_y ],
VehInfo[ playerid ][ slot ][ vPos_z ],
5.0 );
format ( SVehInfo [ vehid ][ vPlate ], 14, "None" );
PlateText [ vehid ] = INVALID_3D_TEXT;
Update3DTextLabelText ( CS_Text [ vehid ], COLOR_WHITE, " " );
Delete3DTextLabel ( CS_Text [ vehid ] );
CS_Text [ vehid ] = INVALID_3D_TEXT;

Reply
#20

thnx i like small details!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)