Raised This Month: $ Target: $400
 0% 

move player to side by aim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-25-2007 , 13:12   move player to side by aim
Reply With Quote #1

you know this:
VelocityByAim(id , 300 , fAim); //speed

with this i can set the player's velocity towards where their looking, but i what do i need to change/have so the players velocity is toward the left by aim instead of in front?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 07-26-2007 , 12:13   Re: move player to side by aim
Reply With Quote #2

Try this:
Code:
stock fm_left_velocity(index, multiplier, Float:velocity[3]) {         new Float:vec[3]         pev(index, pev_v_angle, vec)         engfunc(EngFunc_MakeVectors, vec)         global_get(glb_v_right, vec)         velocity[0] = -vec[0] * multiplier         velocity[1] = -vec[1] * multiplier         velocity[2] = -vec[2] * multiplier         return 1 }
VEN is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-26-2007 , 14:10   Re: move player to side by aim
Reply With Quote #3

i dont under stand that and why does it return a 1?

can you give me an example? move the person at the speed of 300 to the left
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 07-26-2007 , 14:46   Re: move player to side by aim
Reply With Quote #4

Thats what I was asking why do you have a return right there? theres no need for it.

There should be PLUGIN_HANDLED
X-Script is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 07-27-2007 , 12:03   Re: move player to side by aim
Reply With Quote #5

Quote:
why does it return a 1?
Return and/or return result doesn't actually matter here. fm_left_velocity() is a modified fm_velocity_by_aim() which is a direct port of velocity_by_aim() which does have return 1.

Quote:
can you give me an example? move the person at the speed of 300 to the left
Code:
new Float:vec[3] fm_left_velocity(id, 300, vec) set_pev(id, pev_velocity, vec)

Quote:
There should be PLUGIN_HANDLED
No.
VEN is offline
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 07-27-2007 , 12:15   Re: move player to side by aim
Reply With Quote #6

Ah I see okay, when I saw that return in there I didn't know what the hell was going on.
X-Script is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-27-2007 , 14:30   Re: move player to side by aim
Reply With Quote #7

is there a fm_right_velocity(id, 300, vec)?

ill try this
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-27-2007 , 14:31   Re: move player to side by aim
Reply With Quote #8

um.... this fm_left_velocity acctually move the player to the right instead of left!
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-27-2007 , 17:57   Re: move player to side by aim
Reply With Quote #9

ok i got it, put the speed to a negitive
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 07-29-2007 , 07:34   Re: move player to side by aim
Reply With Quote #10

Quote:
um.... this fm_left_velocity acctually move the player to the right instead of left!
Not really (tested it).
VEN is offline
Reply



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 21:27.


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