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-16-2014, 06:58 PM #11
Turk_Warrior
League Champion
Originally posted by B1TW153 View Post
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);
}



Drack
11-11-2015, 04:48 PM #12
Fx for mw2 i use now G_AddEvent but it dusnt work online!

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo