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

[SOLVED] [CSS] Push ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 05-03-2012 , 13:20   [SOLVED] [CSS] Push ?
Reply With Quote #1

I'm looking to push a player to a other,

any way to do this ?

don't understand how to do that with TeleportEntity ;(
__________________
Sorry for my bad English, I'm Belgian

Last edited by Razmo51; 05-10-2012 at 15:41.
Razmo51 is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 05-03-2012 , 17:06   Re: [CSS] Push ?
Reply With Quote #2

http://docs.sourcemod.net/api/index....ad=show&id=40&
__________________
retired
shavit is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 05-04-2012 , 12:22   Re: [CSS] Push ?
Reply With Quote #3

Ok, but how to get the velocity to push player to an other player ?

Ex: push playerA to PlayerB
__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline
Alex30555
Member
Join Date: Sep 2011
Location: Paris
Old 05-04-2012 , 13:36   Re: [CSS] Push ?
Reply With Quote #4

Looks in the plugin entcontrol ;)
Alex30555 is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 05-04-2012 , 17:25   Re: [CSS] Push ?
Reply With Quote #5

in a timer repeat, it works 1 time.

PHP Code:
        new Float:vecDir[3], Float:vecPos[3], Float:vecVel[3];
        new 
Float:viewang[3];
                
// get client info
        
GetClientEyeAngles(clientviewang);
        
GetAngleVectors(viewangvecDirNULL_VECTORNULL_VECTOR);
        
GetClientEyePosition(clientvecPos);
               
            
// update object 
        
vecPos[0]+=vecDir[0]*2.0;
        
vecPos[1]+=vecDir[1]*2.0;
        
vecPos[2]+=vecDir[2]*2.0;
        
GetEntPropVector(aimProp_Send"m_vecOrigin"vecDir);
        
SubtractVectors(vecPosvecDirvecVel);
        
ScaleVector(vecVel1.0);
        
TeleportEntity(aimNULL_VECTORNULL_VECTORvecVel); 
help ;(

EDIT: Fixed, an other question: How to push the player and freeze them at the same time ?

SetEntityMoveType dosen't work: the push does'nt work while SetEntityMoveType is on MOVETYPE_NONE
__________________
Sorry for my bad English, I'm Belgian

Last edited by Razmo51; 05-04-2012 at 17:44.
Razmo51 is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 05-06-2012 , 10:01   Re: [CSS] Push ?
Reply With Quote #6

no idea ?
__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 05-06-2012 , 11:42   Re: [CSS] Push ?
Reply With Quote #7

push => moving
freeze => not moving
how the ~ you think it can be combined?
Leonardo is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 05-06-2012 , 12:17   Re: [CSS] Push ?
Reply With Quote #8

Set their speed to 0.0 and see if that works.
__________________

Last edited by thetwistedpanda; 05-06-2012 at 12:17.
thetwistedpanda is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 05-06-2012 , 17:08   Re: [CSS] Push ?
Reply With Quote #9

Quote:
Originally Posted by thetwistedpanda View Post
Set their speed to 0.0 and see if that works.
already tried witch speed to 0.0, it don't work
__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 05-06-2012 , 18:22   Re: [CSS] Push ?
Reply With Quote #10

Then your only other solution is to try OnPlayerRunCmd and remove the movement flags when a user presses them. It's not fool proof due to client prediction, but it'd suffice.
__________________
thetwistedpanda is offline
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 10:25.


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