Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "Makin' My Way Downtown" effect #3370

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions ChaosMod/Effects/db/Vehs/VehsSpawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,33 @@ REGISTER_EFFECT(OnStartWizardBroom, nullptr, nullptr, EffectInfo
.EffectGroupType = EEffectGroupType::SpawnGeneric
}
);
// clang-format on

static void OnStartPianoCar()
{
static const Hash carHash = 0x1BB290BC;
static const Hash pianoHash = 0xC0217799;
REQUEST_MODEL(carHash);
REQUEST_MODEL(pianoHash);

Ped player = PLAYER_PED_ID();
Vector3 playerPos = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0, 2, 0);

Vehicle veh = CreatePoolVehicle(carHash, playerPos.x, playerPos.y, playerPos.z, GET_ENTITY_HEADING(player));
SET_VEHICLE_ENGINE_ON(veh, true, true, false);
SET_VEHICLE_MOD_KIT(veh, 0);
SET_ENTITY_ALPHA(veh, 0, false);
SET_ENTITY_VISIBLE(veh, false, false);

Object piano = CreatePoolProp(pianoHash, playerPos.x, playerPos.y, playerPos.z, true);
ATTACH_ENTITY_TO_ENTITY(piano, veh, 0, 0, 1.3f, -0.7f, 0, 0, 0, true, false, false, false, 0, true);
}

// clang-format off
REGISTER_EFFECT(OnStartPianoCar, nullptr, nullptr, EffectInfo
{
.Name = "Makin' My Way Downtown",
.Id = "vehs_spawn_piano",
.EffectGroupType = EEffectGroupType::SpawnGeneric
}
);
1 change: 1 addition & 0 deletions ConfigApp/Effects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ public enum EffectTimedType
{ "peds_not_menendez", new EffectInfo("Not Menendez!", EffectCategory.Peds, true) },
{ "misc_go_to_jail", new EffectInfo("Bad Boys", EffectCategory.Misc) },
{ "misc_muffled_audio", new EffectInfo("Muffled Audio", EffectCategory.Misc, true) },
{ "vehs_spawn_piano", new EffectInfo("Makin' My Way Downtown", EffectCategory.Vehicle) },
};
}
}