LSPD Vehicle textdraw Help
#1

Does anybody know how to make a textdraw for the LSPD Vehicles, for example, 1-LINCOLN-3, or 1-L-3? on the back of it. im aware of the vehicle ids ect and i have already placed the LSPD Vehicles in the garage. i want it to look like something from LSRP.
Reply
#2

You can't do it by textdraws lol, you need to use attach3dtextlabeltovehicle
Reply
#3

Yes, im aware of that now so like this right

public OnGameModeInit ( )
{
vehicle_id = CreateVehicle( 510, 0.0. 0.0, 15.0, 5, 0, 120 );
vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
//Creating the Vehicle
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle( vehicle3Dtext[ vehicle_id ] , vehicle_id, 0.0, 0.0, 2.0);
}
public OnGameModeExit ( )
{
Delete3DTextLabel( vehicle3Dtext[ vehicle_id ] );
return true;
}



but where can i get the offsets of the vehicle
Reply
#4

I'm in school right now, i'll write a command for you later.
Reply
#5

okay thank you very much, il comment if i do it figure it out myself
Reply
#6

At the top of your script:
Код HTML:
new vehiclecallsign[MAX_VEHICLES];
Command: ( you have to edit it to be used by your script )
Код HTML:
CMD:callsign(playerid, params[])
{
    new vehicleid;
    vehicleid = GetPlayerVehicleID(playerid);
	new string[32];
	if(!IsPlayerInAnyVehicle(playerid)) return SendErrorMessage(playerid, "You're not in a vehicle.");
	if (GetFactionType(playerid) != FACTION_POLICE)
		return SendErrorMessage(playerid, "You must be a police officer.");
	if (!IsACruiser(GetPlayerVehicleID(playerid)))
	    return SendErrorMessage(playerid, "You must be inside a police cruiser.");
	if(vehiclecallsign[GetPlayerVehicleID(playerid)] == 1)
	{
 		Delete3DTextLabel(vehicle3Dtext[vehicleid]);
	    vehiclecallsign[vehicleid] = 0;
	    SendClientMessage(playerid, COLOR_RED, "Callsign removed.");
	    return 1;
	}
	if(sscanf(params, "s[32]",string)) return SendErrorMessage(playerid, "You must enter a callsign.");
	if(vehiclecallsign[GetPlayerVehicleID(playerid)] == 0)
	{
		vehicle3Dtext[vehicleid] = Create3DTextLabel(string, COLOR_WHITE, 0.0, 0.0, 0.0, 10.0, 0, 1);
		Attach3DTextLabelToVehicle(vehicle3Dtext[vehicleid], vehicleid, 0.0, -2.8, 0.0);
		vehiclecallsign[vehicleid] = 1;
	}
	return 1;
}
Reply
#7

Dam! thank you very much, +rep for you sir
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)