Liberty Unleashed

Scripting => Script Help => Topic started by: gamelaster on January 02, 2012, 07:43:55 pm

Title: Player not Putted to vehicle
Post by: gamelaster on January 02, 2012, 07:43:55 pm
Hi, this is my code:
Code: [Select]
local car = CreateVehicle( VEH_INFERNUS, 103.33, -939.2, 25.75, 90 );
player.EnterVehicle( car, DOOR_DRIVER );
car.Alpha = 126;
CreateCheckpoint( Vector(184.21, -952.2, 25.75), 5.0 );

im tested this:
player.Vehicle = car;

If tested this ^^ code, car is dont create...
What is bad?
Title: Re: Player not Putted to vehicle
Post by: VetalYA on January 03, 2012, 11:03:16 am
local car = CreateVehicle( VEH_INFERNUS, 103.33, -939.2, 25.75, 90 );

Try to use VehicleID (90 - 150) (http://liberty-unleashed.co.uk/LUWiki/VehicleIDs) instead  of const veh names.

Title: Re: Player not Putted to vehicle
Post by: gamelaster on January 03, 2012, 11:24:12 am
thx man, also not create Sphere. Code:

Code: [Select]
local car = CreateVehicle( 119, 103.33, -939.2, 25.75, 260 );
car.Alpha = 255;
player.Vehicle = car;
CreateClientSphere( Vector(184.21, -952.2, 25.75), 5.0, player );
Also is deactive putting, Sphere is created..
Title: Re: Player not Putted to vehicle
Post by: VetalYA on January 03, 2012, 11:42:48 am
Sorry, i inattentive today...   ::)

You should use function Vector everywhere, where X,Y,Z coordinates is reqiured
Code: [Select]
Vector(Coordinate_x, Coordinate_y, Coordinate_z );http://squirrel-lang.org/doc/squirrel3.html#d0e1779 (http://squirrel-lang.org/doc/squirrel3.html#d0e1779)


Code: [Select]
local car = CreateVehicle( 119, Vector(103.33, -939.2, 25.75) );
car.Alpha = 255;
player.Vehicle = car;
CreateClientSphere( Vector(184.21, -952.2, 25.75), 5.0, player );
Title: Re: Player not Putted to vehicle
Post by: gamelaster on January 03, 2012, 11:50:11 am
Sorry, i inattentive today...   ::)

You should use function Vector everywhere, where X,Y,Z coordinates is reqiured
Code: [Select]
Vector(Coordinate_x, Coordinate_y, Coordinate_z );[url]http://squirrel-lang.org/doc/squirrel3.html#d0e1779[/url] ([url]http://squirrel-lang.org/doc/squirrel3.html#d0e1779[/url])


Code: [Select]
local car = CreateVehicle( 119, Vector(103.33, -939.2, 25.75) );
car.Alpha = 255;
player.Vehicle = car;
CreateClientSphere( Vector(184.21, -952.2, 25.75), 5.0, player );


Ohhh mean, im must added rotate, also dont function. Sphere is not created ;(
Title: Re: Player not Putted to vehicle
Post by: Thijn on January 03, 2012, 02:56:29 pm
Does player even exist? Give us some more code.