attach object to vehicle
#1

new THECAR[ 1 ];



Код:
THECAR[ 0 ] = AddStaticVehicleEx(560,-2185.8000488,715.5000000,53.7000008,180.0000000,45,58,15); //Voodoo
   
    new object = CreateDynamicObject( 18646,0,0,0,0,0,0,80 ); // <iVO>
	AttachDynamicObjectToVehicle( object, THECAR[ 0 ], -0.859999, 0.049999, 1.140000, 0.000000, 0.000000, 0.000000 ); // <iVO>
But when i go to game, and near this car i don't see any object. I use IVO object to vehicle editor, there all was fine, but when i add this to my gamemode, i don't see anything..
Reply
#2

Add this to the top of your script

Код:
new THECAR;
then

pawn Код:
public OnGameModeInit()
{
    TheCar = AddStaticVehicle(560,-2185.8000488,715.5000000,53.7000008,180.0000000,45,58,15);
    return 1;
}
After you are ready to attach your objecto to your car

pawn Код:
public OnPlayerConnect(playerid)
{
    new object = CreateObject(18646,0,0,0,0,0,0);
    AttachObjectToVehicle(object, TheCar, -0.859999, 0.049999, 1.140000, 0.000000, 0.000000, 0.000000);
    return 1;
}
Reply
#3

Need to create car first, and later attach object? why i can't to do that instantly?
Reply
#4

up thread.
Reply
#5

Up thread.
Reply
#6

Up thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)