SCRIPTING HELP (+REP)
#1

I need help about Vehicle Plates

Code for Plates:
Код HTML:
	{
	new string[30];
	format(string, sizeof(string),"BG - %d", Vehicles);
	SetVehicleNumberPlate(Vehicles, string);
	SetVehicleToRespawn(Vehicles);
	}
Код HTML:
Enum for Vehicles
{
	avModel,
    Float:avPozX,
    Float:avPozY,
    Float:avPozZ,
    Float:avPozA,
    avBoja1,
    avBoja2,
    avVlasnik[60],
    avImaVlasnika,
	avID,
	avZakljucan,
	avCijena
}
So i need to import avID to plate code, please help <3

EDIT: I mean vehicle id to replace %d
Reply
#2

Do you mean to show "BG - VehicleID"
or "BG - avID" ?
Reply
#3

BG - avID
Reply
#4

PHP код:
format(stringsizeof(string),"BG - %d"Vehicles[avID]); 
I don't know exactly how do you use your vehicle enums, but try this.
Reply
#5

Quote:
Originally Posted by maksicnm
Посмотреть сообщение
I need help about Vehicle Plates

Code for Plates:
Код HTML:
	{
	new string[30];
	format(string, sizeof(string),"BG - %d", Vehicles);
	SetVehicleNumberPlate(Vehicles, string);
	SetVehicleToRespawn(Vehicles);
	}
Код HTML:
Enum for Vehicles
{
	avModel,
    Float:avPozX,
    Float:avPozY,
    Float:avPozZ,
    Float:avPozA,
    avBoja1,
    avBoja2,
    avVlasnik[60],
    avImaVlasnika,
	avID,
	avZakljucan,
	avCijena
}
So i need to import avID to plate code, please help <3

EDIT: I mean vehicle id to replace %d
Try this.
Код:
for(new v = 1; v < MAX_VEHICELS; v++) //MAX_VEHILCES or your pool enum. EX: new VehEnum[50][EnumVeh]; Then replace MAX_VEHICLES with 50
{
	new string[30];
	format(string, sizeof(string),"BG - %d", VehEnum[v][avID]);
	SetVehicleNumberPlate(v, string);
	SetVehicleToRespawn(v);
}
Also i recommand to do that, when u load your vehicles form ur database.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)