Post: Scr_PlayFX [1.10]
04-12-2014, 06:46 PM #1
Shark
Retired.
(adsbygoogle = window.adsbygoogle || []).push({}); Hey, this has been released on xbox for a while now but figured I would release it on PS3, big thanks to Xx jAmes t xX Smile!

If you are unsure what Scr_PlayFX does or what its used for then it can be used for things like this
(yes this is mw2 but you can make it rain money in ghosts aswell :3 using playfx :P)


You must login or register to view this content.

C# Code
    
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;
}


How To Call It
    
Origin = Position you want it to spawn at (float[])
effectIndex = Index number of fx you want to spawn
playFx(Origin, effectIndex);


How To Call G_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"));


Raining Money Code
    
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); }


Effect List (Strings + Numbers)
You must login or register to view this content. (Pastebin)

Credits: Xx james t xX, Choco, B1TW1S3 and anyone I missed.

The following 19 users say thank you to Shark for this useful post:

Arrow_Modz, BuC-ShoTz, CodJumper:, coreconfusion, gοd, iMoDz-Baptiste, milky4444, John, Notorious, RatchetBooty, Taylors Bish, ThePaaqoHD, Turk_Warrior, worrorfight, Fatality, xHostModer
04-12-2014, 07:14 PM #2
coreconfusion
I defeated!
holy shit, thats awesome lol
04-12-2014, 08:28 PM #3
A Friend
League Champion
Jailbreak only? I have my usb ready what do i do next? lel

The following user thanked A Friend for this useful post:

Shark
04-13-2014, 02:45 AM #4
Shark
Retired.
Originally posted by A
Jailbreak only? I have my usb ready what do i do next? lel


lmfao, not sure if serious :lol:
04-13-2014, 03:22 AM #5
Hash847
Purple God
I did not notice you had finished this even know you were screensharing :ha!:
04-13-2014, 06:46 AM #6
Mango_Knife
In my man cave
Originally posted by sharkbait263 View Post
Hey, this has been released on xbox for a while now but figured I would release it on PS3, big thanks to Xx jAmes t xX Smile!

If you are unsure what Scr_PlayFX does or what its used for then it can be used for things like this
(yes this is mw2 but you can make it rain money in ghosts aswell :3 using playfx :P)


You must login or register to view this content.

C# Code
    
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;
}


How To Call It
    
Origin = Position you want it to spawn at (float[])
effectIndex = Index number of fx you want to spawn
playFx(Origin, effectIndex);


How To Call G_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"));


Raining Money Code
    
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); }


Effect List (Strings + Numbers)
You must login or register to view this content. (Pastebin)

Credits: Xx james t xX, Choco, B1TW1S3 and anyone I missed.


I See you decided to release it :yes:
04-13-2014, 10:04 PM #7
( ͡º ͜ʖ ͡º)
04-14-2014, 12:20 AM #8
RatchetBooty
Former Staff
This is actually pretty awesome, and unique. I haven't seen something like this in a while. Keep it up Shark :yes:
04-15-2014, 05:40 AM #9
Nice...port from se7ensins, I guess :P
Also, just so you know...he didn't reverse that from Scr_PlayFX. He got it from Scr_PlayFxonTag.

Here is Scr_PlayFX

    
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 Smile
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 Smile
}
}


If you wanted it in C without inline assembly

    
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;
}
Last edited by Bitwise ; 04-15-2014 at 02:09 PM.

The following 3 users say thank you to Bitwise for this useful post:

ErasedDev, Shark, VezahMoDz
04-15-2014, 04:31 PM #10
Also, I literally just re-mapped this out. It was working before, but I mapped it out wrong.

    
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.

Gray NextGenUpdate Logo