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 "Imaginary Weapons" effect #3024

Open
wants to merge 1 commit 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
1 change: 1 addition & 0 deletions ChaosMod/ChaosMod.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<ClCompile Include="Effects\db\Peds\PedsFlipAll.cpp" />
<ClCompile Include="Effects\db\Peds\PedsHandsUp.cpp" />
<ClCompile Include="Effects\db\Peds\PedsHeadless.cpp" />
<ClCompile Include="Effects\db\Peds\PedsInvisibleWeps.cpp" />
<ClCompile Include="Effects\db\Peds\PedsKillerClowns.cpp" />
<ClCompile Include="Effects\db\Peds\PedsJamesBond.cpp" />
<ClCompile Include="Effects\db\Peds\PedsLooseTrigger.cpp" />
Expand Down
31 changes: 31 additions & 0 deletions ChaosMod/Effects/db/Peds/PedsInvisibleWeps.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Effect By OnlyRealNubs
*/

#include "stdafx.h"

static void OnStop()
{
for (Ped ped : GetAllPeds())
{
SET_ENTITY_ALPHA(GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped, 0), 255, false);
}
}

static void OnTick()
{
for (Ped ped : GetAllPeds())
{
SET_ENTITY_ALPHA(GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped, 0), 0, false);
}
}

// clang-format off
REGISTER_EFFECT(nullptr, OnStop, OnTick, EffectInfo
{
.Name = "Imaginary Weapons",
.Id = "peds_invisible_weps",
.IsTimed = true,
.IncompatibleWith = { "misc_ghost_world" }
}
);
1 change: 1 addition & 0 deletions ConfigApp/Effects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ public enum EffectTimedType
{ "screen_colorfulworld", new EffectInfo("Colorful World", EffectCategory.Screen, true) },
{ "screen_arc", new EffectInfo("Arced Screen", EffectCategory.Screen, true, true) },
{ "world_blackhole", new EffectInfo("Black Hole", EffectCategory.Misc, true, true) },
{ "peds_invisible_weps", new EffectInfo("Imaginary Weapons", EffectCategory.Peds, true) },
};
}
}