Possible to make a random tail number then...?
#1

Hey, is it possible to make a random tail number selection in the server then it saved like that forever? till I decide to delete or change it?
If so, how would I do that?
Reply
#2

What is a "tail" number?
Reply
#3

Planes have tail numbers for example RXV-678 requesting to taxi on B1.
This is the atc to RXV-678 you may taxi on B1.
Reply
#4

ou need to get xyz cords and make them like holding objects or I'm wrong.... (Not professional)
Reply
#5

If you want to attach a label to a plane, then use Create3DTextLabel and Attach3DTextLabelToVehicle.
Reply
#6

Quote:
Originally Posted by Krx17
Посмотреть сообщение
If you want to attach a label to a plane, then use Create3DTextLabel and Attach3DTextLabelToVehicle.
random tail number selection in the server.

so something like
pawn Код:
randomtailnumber
{
{bg23}
or what ever the function was
}
return 0;
Reply
#7

Erm. No.

pawn Код:
//Something like this.
public OnGameModeInit()
{
    new mycar = CreateVehicle(...);
    new tailnumber = Create3DTextLabel(...);
    Attach3DTextLabelToVehicle(tailnumber, mycar, 0, -5, 5);
}
Reply
#8

so if i have 100 planes, ill need too add 100 of those?
I think it possible to make something random between
3 letters
A-Z A-Z A-Z - 1-9 1-9 1-9
so it gonna be some thing

UZI-915
and if server restarts the plane number will still be UZI-915
or even easier without 3d model.
add. what it called. Just text?

Welcome pilot, your tail number is %.
and if the pilot forgot he can do
/tailnumber
Reply
#9

You can just run a loop.
pawn Код:
for(new i = 0; i < 100; i++)
{
    new mycar = CreateVehicle(...);
    new string[30];
    format(string, 30, "PFG%d", random(30));
    new tailnumber = Create3DTextLabel(string, ...);
    Attach3DTextLabelToVehicle(tailnumber, mycar, 0, -5, 5);
}
Reply
#10

Quote:
Originally Posted by Krx17
Посмотреть сообщение
You can just run a loop.
pawn Код:
for(new i = 0; i < 100; i++)
{
    new mycar = CreateVehicle(...);
    new string[30];
    format(string, 30, "PFG%d", random(30));
    new tailnumber = Create3DTextLabel(string, ...);
    Attach3DTextLabelToVehicle(tailnumber, mycar, 0, -5, 5);
}
Alright but I don't have only planes I have vehicles too lol
so ill need to use my if(IsVehicleAirBorne( GetVehicleModel( GetPlayerVehicleID( playerid ) ) ) )
function
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)