10.10.2011, 02:20
So welcome to my tutorial
First off we are going to be working under OnGamemodeInit so lets go there
Code:
Ok so now we want to add
Code:
This will Create the variable
ok so now it should look like this
Code:
Ok so now lets create the text label on your car
so lets break that down a little
In the brackets we have the label that will display on the car then after that we have the colour (that's red) then all those complex numbers are the positioning of the label you can play around with them or check the wiki for extra info on that
Now lets attach the label
That just pretty much attaches it to the vehicle
Now Its almost over, lets just create the car and the license plate!
now lets have a look at this, This will create the vehicle while having a license plate on it the '411' is the car ID and in this case it is a infernus then we just have the X Y Z cords Then comes the fun bit, creating the atcuall License plate in this case mine obviously says FlakeZor
Now lets put it all together
Hope you all liked it and you enjoyed it, i left all the variables as default
First off we are going to be working under OnGamemodeInit so lets go there
Code:
pawn Код:
public OnGameModeInit()
{
Code:
pawn Код:
new vehicle_id, Text3D:vehicle3Dtext;
ok so now it should look like this
Code:
pawn Код:
public OnGameModeInit()
{
new vehicle_id, Text3D:vehicle3Dtext;
Ok so now lets create the text label on your car
pawn Код:
vehicle3Dtext = Create3DTextLabel( "Best car in the Game!", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
In the brackets we have the label that will display on the car then after that we have the colour (that's red) then all those complex numbers are the positioning of the label you can play around with them or check the wiki for extra info on that
Now lets attach the label
pawn Код:
Attach3DTextLabelToVehicle( vehicle3Dtext, vehicle_id, 0.0, 0.0, 2.0);
Now Its almost over, lets just create the car and the license plate!
pawn Код:
vehicle_id = SetVehicleNumberPlate(CreateVehicle(411, 786.0544, -513.6415, 16.3859,0.00000000, 144,422, 30), "FlakeZor");
Now lets put it all together
pawn Код:
public OnGameModeInit()
{
new vehicle_id, Text3D:vehicle3Dtext;
vehicle3Dtext = Create3DTextLabel( "Best car in the Game!", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( vehicle3Dtext, vehicle_id, 0.0, 0.0, 2.0);
vehicle_id = SetVehicleNumberPlate(CreateVehicle(411, 786.0544, -513.6415, 16.3859,0.00000000, 144,422, 30), "FlakeZor");
return 1; // and exit :)
}
Hope you all liked it and you enjoyed it, i left all the variables as default