public static int G_TempEntity(float[] Origin, int Event)
{
return RPC.RPCFOG.Call(0x28F30C, Origin, Event);
}
public static int G_EffectIndex(string Effect)
{
return RPC.Call(0x2E65B0, Effect);
}
public static int playFx(float[] Origin, int effectIndex)
{
int Entity = G_TempEntity(Origin, 0x5B);
if (Entity == 0)
return 0;
Lib.WriteInt32((uint)Entity + 0x9C, effectIndex);
Lib.WriteSingle((uint)Entity + 0x3C, 270.0f);
Lib.WriteInt64((uint)Entity + 0x40, 0);
Lib.WriteInt32((uint)Entity + 0xD4, 0);
Lib.WriteInt32((uint)Entity + 0xF8, 0);
return Entity;
}
Origin = Position you want it to spawn at (float[])
effectIndex = Index number of fx you want to spawn
playFx(Origin, effectIndex);
FxNameHere = A Name of an effect (list provided below)
G_EffectIndex("FxNameHere");
This will return a number which will be used for the effect index,
example playFx(Origin, G_EffectIndex("fx/explosions/powerlines_a"));
62 = effectIndex number for money
PlayerPosition = players position of who you want the money to fly out of it
while (true)//Loops it
{ playFx(PlayerPosition, 62); }
public static int G_TempEntity(float[] Origin, int Event)
{
return RPC.RPCFOG.Call(0x28F30C, Origin, Event);
}
public static int G_EffectIndex(string Effect)
{
return RPC.Call(0x2E65B0, Effect);
}
public static int playFx(float[] Origin, int effectIndex)
{
int Entity = G_TempEntity(Origin, 0x5B);
if (Entity == 0)
return 0;
Lib.WriteInt32((uint)Entity + 0x9C, effectIndex);
Lib.WriteSingle((uint)Entity + 0x3C, 270.0f);
Lib.WriteInt64((uint)Entity + 0x40, 0);
Lib.WriteInt32((uint)Entity + 0xD4, 0);
Lib.WriteInt32((uint)Entity + 0xF8, 0);
return Entity;
}
Origin = Position you want it to spawn at (float[])
effectIndex = Index number of fx you want to spawn
playFx(Origin, effectIndex);
FxNameHere = A Name of an effect (list provided below)
G_EffectIndex("FxNameHere");
This will return a number which will be used for the effect index,
example playFx(Origin, G_EffectIndex("fx/explosions/powerlines_a"));
62 = effectIndex number for money
PlayerPosition = players position of who you want the money to fly out of it
while (true)//Loops it
{ playFx(PlayerPosition, 62); }
void playEffects(Mod::bit*thing, char*effectName)//playEffects(client.bit.playerId, "fx/threads/heli_dust");
{
__asm
{
li r11, 0
lwz r5, 4(r3) # r5 now holds the pointer to the variable cFx
lfs f31, 8(r3) # f31 now holds the X origin of the player
fmr f1, f31 # Loading first param of G_TEMP with the players x origin
mr r31, r3 # Not losing the data from r3
li r3, 0x5B # Event
bl bl sub_8242B430 # G_Temp call
mr r5, r3 # Making cFx now hold the returned value (gentity pointer)
mr r3, r4 # Setting first param with the effect name (second param)
bl sub_8215C6B0 # G_EffectIndex
stw r3, 0x9C(r5) # Storing the effect index
std r11, 0x40(r4) # This is a vec2, but since a float is 4 bytes we would have to write it twice, using a double is 8bytes...meanng we only have to write it once 
lis r11, ((0x8201A19C)@h)
lfs f13, ((0x8201A19C)@l)(r11) #Converting the string into a floating point, returning 270
stfs f31, 0x35(r5) # And finally, setting it 
}
}
void playerEffect(char*effectName, float*origin)
{
int cFx = G_Temp(origin,0x5B);
*(int*)(cFx + 0x9C) = G_EffectIndex(effectName);
*(__int64*)(cFx + 0x40) = 0x00;
*(float*)(cFx + 0x3C) = 270.f;
}
void doEarthquake(float scale, int duration, float*source/*vec3*/, float radius)
{
//Before I start, duration is actually converted from a floating point into a word in the actual function, since there's no point in doing that here, I have it as an int (powerpc word = 32bits, int = 32bits)
int eq = G_Temp(source, 0x65);
data().WriteFloat(eq + 0x54, scale);
data().WriteInt32(eq + 0x5C, duration);
data().WriteFloat(eq + 0x58, radius);
}
Copyright © 2025, NextGenUpdate.
All Rights Reserved.