13.05.2014, 14:57
If you don't want to create them on runtime, just use an array, pick your favorite country and do as they do:
http://en.wikipedia.org/wiki/Aircraft_registration#List_of_countries.2Fregions_ and_their_registration_prefixes_and_patterns
Really, I don't know how you are stuck here, just be creative!
Edit:
VehAcronym then returns a string like "SHA" or "NEV" maybe. But pass the string rather by reference, so you'll have error codes as well.
http://en.wikipedia.org/wiki/Aircraft_registration#List_of_countries.2Fregions_ and_their_registration_prefixes_and_patterns
pawn Код:
static const TailNumbers[MAX_AIRCRAFTS][7] = {"D-AAAA", "D-AAAB", "D-BAAA", "D-BAAB"};
Edit:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_DRIVER && oldstate != PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (GetVehicleType(vehicle) == VTYPE_AIRCRAFT) // or something of that sort
{
new message[128];
format(message, sizeof(message), "You have just entered the aircraft with the tailnumber: %s-%d",
VehAcronym(GetVehicleModel(vehicleid)), vehicleid); // in that sort of kind
SendClientMessage(playerid, COLOR_YELLOW, message);
}
}
return 1;
}