news
current
submit
tutorials
database
-mp
-client
submit
search
forum
main
contact
email
|
Re-enabling the TFC concussion effect
Created by Ms
HalfLife's Code is BLUE
Ms's Code is RED
Ms's Commentary is GREEN
Re-enabling the TFC concussion effect
This is every every easy to do! In fact all the code is there all you need to do is make the message and here’s how!
Open up player.cpp:
Find int gmsgShowVGUI = 0;
Under that add this
int gmsgShowConcuss;
Find gmsgShowVGUI = REG_USER_MSG("ShowVGUI", 1);
Under that add this
GmsgShowVGUI = REG_USER_MSG(“Concuss”,1);
Now for the message. This can be done in many ways.
You can set it up to trigger on one person or persons or for every one!
To test out the effect in player.cpp find void CBasePlayer::PreThink(void)
Under that add this (remember just test one effect at a time because you can’t tell the diff):
Ex. For one person:
MESSAGE_BEGIN( MSG_ONE, gmsgConcuss, NULL, pev /*This is the player that will get this*/ );
WRITE_BYTE( 150 ); // This is the value of the effect
MESSAGE_END();
Btw the above really isn’t good for testing this effect for one play because of where it is all players will get it
Ex. For all players:
MESSAGE_BEGIN( MSG_ALL, gmsgConcuss, NULL );
WRITE_BYTE( 150 );
MESSAGE_END();
To turn off the effect send the message with WRITE_BYTE( 0 );
Also becarful with this. Don’t set it up to high and look at it for to long. I did and I got sick for a little while :)
If you need any help contact me at mixed_mod0.tripod.com/new_site/main.html
|