Rollercoaster

Hi, i have question, is there possible way to make work rollercoaster on pier from gta v online ? i cannot found function on native… its maybe look like train ? (CreateMissionTrain)

This might help:

1 Like

i found it but no this not help me its question topics and there is no informations about that.

In the decompiled GTA scripts it’s just a hidden Sanchez attached to a rollercoaster model. They then move the Sanchez to preset positions to make it look like it’s a rollercoaster train moving.

actually not… they move directly the 4 RC cars objects with the sanchez attached for no reason… the queaternions as the vectorial calculations are made 4 times in a tick by the script one for each car

in am_rollercoaster.c

void func_133()
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	
	iVar0 = 0;
	while (iVar0 < iLocal_719)
	{
		iVar1 = func_138((Global_2535428 - (fLocal_36 * IntToFloat(iVar0))), Local_1413.f_4);
		vVar2 = { func_50((Global_2535428 - (fLocal_36 * IntToFloat(iVar0))), iVar1) };
		ENTITY::SET_ENTITY_COORDS(iLocal_719[iVar0], vVar2, 1, 0, 0, 1);
		func_134(iVar0, iVar1, (Global_2535428 - (fLocal_36 * IntToFloat(iVar0))));
		iVar0++;
	}
}

as you can see there is a while… in the script iLocal_719 is the count of all the RC cars (it means 4) that means the while cycle (why not a for cycle i don’t know) is repeated 4 times one for each rollercoaster car

2 Likes

Thank you now, i know how to do that ! <3

good luck

And is there a working one allready?

its a great ide so people can use the carnival in fivem