Raised This Month: $32 Target: $400
 8% 

Need slowmotion Codes for te_spritetrail


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lover_players
Member
Join Date: Jan 2014
Old 06-03-2014 , 12:39   Need slowmotion Codes for te_spritetrail
Reply With Quote #1

Need slowmotion Codes for te_spritetrail i mean when some one buy usp i have added that i spawn sprite but i want them to be in slowmotion mean it float when it spawn but it come slow on floor
lover_players is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-03-2014 , 14:53   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #2

I see 2 ways.

way 1:
Change server gravity to low, lets say from 800 to 100
and then loop all players and set their pev_gravity from 1.0 to 8.0

Temp entities seems to follow server gravity so it should affect te_spritetrail

way 2:
create entities and make them float

Last edited by .Dare Devil.; 06-03-2014 at 14:53.
.Dare Devil. is offline
lover_players
Member
Join Date: Jan 2014
Old 06-03-2014 , 18:30   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #3

but how
lover_players is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 06-04-2014 , 02:04   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #4

Quote:
Originally Posted by .Dare Devil. View Post
I see 2 ways.

way 1:
Change server gravity to low, lets say from 800 to 100
and then loop all players and set their pev_gravity from 1.0 to 8.0

Temp entities seems to follow server gravity so it should affect te_spritetrail

way 2:
create entities and make them float
They follow server gravity, you said it. So the value sent on the SVC_NEWMOVEVARS message should be altered. @Arkshine should know how to do this.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-04-2014 , 02:07   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #5

setting gravity:
PHP Code:
server_cmd("sv_gravity 100"
looping players:
PHP Code:
new players32 ], players_counta;
get_playersplayersplayers_count"a" );
for(
0players_counta++ ) set_pevplayers[a], pev_gravity8.0 

Last edited by .Dare Devil.; 06-04-2014 at 02:39.
.Dare Devil. is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-04-2014 , 02:36   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #6

Quote:
Originally Posted by .Dare Devil. View Post
setting gravity:
[php]
server_cmd("sv_gravity 100")
[php]

looping players:
PHP Code:
new players32 ], players_counta;
get_playersplayersplayers_count"a" );
for(
0players_counta++ ) set_pevplayers[a], pev_gravity8.0 
don't do that, it will mess up everything like thrown weapons

edit::
much better

Last edited by aron9forever; 06-04-2014 at 02:45.
aron9forever is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-04-2014 , 02:39   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #7

Quote:
Originally Posted by aron9forever View Post
don't do that, it will mess up everything like thrown weapons
yes but this is the only way to make te_spritetrail floating in air.


new method (only this thing is needed) [ thanks @meTaLiCroSS ]
( this should only affect temp entities, weapon thrown should be same )
PHP Code:
message_beginMSG_ONESVC_NEWMOVEVARSid );
write_long(100);
write_long(get_cvar_float("sv_stopspeed"))
write_long(get_cvar_float("sv_maxspeed"))
write_long(get_cvar_float("sv_spectatormaxspeed"))
write_long(get_cvar_float("sv_accelerate"))
write_long(get_cvar_float("sv_airaccelerate"))
write_long(get_cvar_float("sv_wateraccelerate"))
write_long(get_cvar_float("sv_friction"))
write_long(get_cvar_float("edgefriction"))
write_long(get_cvar_float("sv_waterfriction"))
write_long(8.0// ent gravity
write_long(get_cvar_float("sv_bounce"))
write_long(get_cvar_float("sv_stepsize"))
write_long(get_cvar_float("sv_maxvelocity"))
write_long(get_cvar_float("sv_zmax"))
write_long(get_cvar_float("sv_wateramp"))
write_byte(get_cvar_num("mp_footsteps"))
write_long(0.0// roll angle
write_long(0.0// roll speed
write_long(get_cvar_float("sv_skycolor_r"))
write_long(get_cvar_float("sv_skycolor_g"))
write_long(get_cvar_float("sv_skycolor_b"))
write_long(get_cvar_float("sv_skyvec_x"))
write_long(get_cvar_float("sv_skyvec_y"))
write_long(get_cvar_float("sv_skyvec_z"))
get_cvar_string("sv_skyname"k32)
write_string(k)
message_end(); 
resetting:
PHP Code:
message_beginMSG_ONESVC_NEWMOVEVARSid );
write_long(get_cvar_float("sv_gravity"));
write_long(get_cvar_float("sv_stopspeed"))
write_long(get_cvar_float("sv_maxspeed"))
write_long(get_cvar_float("sv_spectatormaxspeed"))
write_long(get_cvar_float("sv_accelerate"))
write_long(get_cvar_float("sv_airaccelerate"))
write_long(get_cvar_float("sv_wateraccelerate"))
write_long(get_cvar_float("sv_friction"))
write_long(get_cvar_float("edgefriction"))
write_long(get_cvar_float("sv_waterfriction"))
write_long(1.0// ent gravity
write_long(get_cvar_float("sv_bounce"))
write_long(get_cvar_float("sv_stepsize"))
write_long(get_cvar_float("sv_maxvelocity"))
write_long(get_cvar_float("sv_zmax"))
write_long(get_cvar_float("sv_wateramp"))
write_byte(get_cvar_num("mp_footsteps"))
write_long(0.0// roll angle
write_long(0.0// roll speed
write_long(get_cvar_float("sv_skycolor_r"))
write_long(get_cvar_float("sv_skycolor_g"))
write_long(get_cvar_float("sv_skycolor_b"))
write_long(get_cvar_float("sv_skyvec_x"))
write_long(get_cvar_float("sv_skyvec_y"))
write_long(get_cvar_float("sv_skyvec_z"))
get_cvar_string("sv_skyname"k32)
write_string(k)
message_end(); 

Last edited by .Dare Devil.; 06-04-2014 at 02:46.
.Dare Devil. is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-04-2014 , 03:46   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #8

8.0 means more acceleration than 1.0.
Change it to something lower, like 0.125 (if you want 100 gravity).
__________________
<VeCo> is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-04-2014 , 03:52   Re: Need slowmotion Codes for te_spritetrail
Reply With Quote #9

This is not going to work properly as a check between mp_ cvars and movevars values is done at each frame, and if a change is dectected, a new message is sent. You need to hook when a change is detected and blocking this call, then sending your custiom message. Something like that: https://forums.alliedmods.net/showpo...2&postcount=50.
__________________
Arkshine is offline
Old 06-04-2014, 03:53
Flick3rR
This message has been deleted by Flick3rR.
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode