Samp CreateVehicle rotation
#1

How might I fix vehicle rotation as it appears to spawn backwards my rotation currently is 0

Код:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Busses spawn locations by coolmark1995");
	print("--------------------------------------\n");
	
    CreateVehicle(431, -94.95, -1118.03,    1.37, 0, -1, -1, 0);

	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
#endif
Reply
#2

Код:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Busses spawn locations by coolmark1995");
	print("--------------------------------------\n");
	
    new carid;
    carid = CreateVehicle(431, -94.95, -1118.03,    1.37, 0, -1, -1, 0);
    SetVehicleZAngle(carid, ANGLE HERE);

	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
#endif
Reply
#3

CreateVehicle(431, -94.95,-1118.03,1.37, ANGLE GOES HERE, -1, -1, -1);
Reply
#4

Thanks I also have another question I know createvehicle causes vehicle to spawn but how might I go about attaching text to bus on spawn? I am just wondering Now I know the following code should work but I am a bit confused as I want the text to be there permanently. any ideas? I am wondering if the following is correct or not.

Vehicle 1:
Код:
vehicle_id = CreateVehicle( 431, -126.66, -1210.45,    2.69, 5, 0, 120 );
    vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Bus 45 Los Santos", 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);
Vehicle 2:
Код:
vehicle_id = CreateVehicle( 431, 1402.71, 1028.00,   10.81, 5, 0, 120 );
    vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Bus 25 San Fierro", 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);
Vehicle 3:
Код:
vehicle_id = CreateVehicle( 431, -98.67, -1168.64,    2.57, 5, 0, 120 );
    vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Bus 31 Las Venturas", 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);
Compile Errors:

Код:
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(15) : warning 217: loose indentation
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(15) : error 017: undefined symbol "vehicle_id"
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(15) : warning 202: number of arguments does not match definition
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(16) : warning 217: loose indentation
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(16) : error 017: undefined symbol "vehicle3Dtext"
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(16) : error 017: undefined symbol "vehicle_id"
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(16) : error 029: invalid expression, assumed zero
C:\Users\markh\Downloads\gta san andreas\filterscripts\road.pwn(16) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#5

try this

PHP код:
//At top of script
new vehicle_id[3];
//Then at where you are creating vehicles
//1st vehicle
vehicle_id[0] = CreateVehicle(431, -126.66, -1210.45,    2.6950120 );
vehicle3Dtext[vehicle_id[0]] = Create3DTextLabel("Bus 45 Los Santos"0xFF0000AA0.00.00.050.00);
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[0]], vehicle_id[0], 0.00.02.0);
//2nd vehicle
vehicle_id[1] = CreateVehicle(4311402.711028.00,   10.8150120 );
vehicle3Dtext[vehicle_id[1]] = Create3DTextLabel("Bus 25 San Fierro"0xFF0000AA0.00.00.050.00);
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[1]], vehicle_id[1], 0.00.02.0);
//3rd vehicle
vehicle_id[2] = CreateVehicle(431, -98.67, -1168.64,    2.5750120 );
vehicle3Dtext[vehicle_id[2]] = Create3DTextLabel("Bus 31 Las Venturas"0xFF0000AA0.00.00.050.00);
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[2]], vehicle_id[2], 0.00.02.0); 
Reply
#6

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
try this

PHP код:
//At top of script
new vehicle_id[3];
//Then at where you are creating vehicles
//1st vehicle
vehicle_id[0] = CreateVehicle(431, -126.66, -1210.45,    2.6950120 );
vehicle3Dtext[vehicle_id[0]] = Create3DTextLabel("Bus 45 Los Santos"0xFF0000AA0.00.00.050.00);
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[0]], vehicle_id[0], 0.00.02.0);
//2nd vehicle
vehicle_id[1] = CreateVehicle(4311402.711028.00,   10.8150120 );
vehicle3Dtext[vehicle_id[1]] = Create3DTextLabel("Bus 25 San Fierro"0xFF0000AA0.00.00.050.00);
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[1]], vehicle_id[1], 0.00.02.0);
//3rd vehicle
vehicle_id[2] = CreateVehicle(431, -98.67, -1168.64,    2.5750120 );
vehicle3Dtext[vehicle_id[2]] = Create3DTextLabel("Bus 31 Las Venturas"0xFF0000AA0.00.00.050.00);
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicle_id[2]], vehicle_id[2], 0.00.02.0); 
n/a s
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)