Raised This Month: $ Target: $400
 0% 

VelocityByAim [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Specialist
BANNED
Join Date: Nov 2006
Old 11-22-2006 , 12:59   VelocityByAim [SOLVED]
Reply With Quote #1

how do you use VelocityByAim ? what is the 3rd paramter, i dont understand it

Last edited by The Specialist; 11-23-2006 at 00:57.
The Specialist is offline
Send a message via AIM to The Specialist
dutchmeat
Senior Member
Join Date: Sep 2006
Old 11-22-2006 , 13:11   Re: VelocityByAim
Reply With Quote #2

This is an example of how you could use it:
Code:
new Float:vel[3] velocity_by_aim(id,2000,vel) console_print(id,"velocity: %d",vel)
id = the player id
2000 = the aiming range
vel = the variable that we store the velocity.
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 11-22-2006 , 13:22   Re: VelocityByAim
Reply With Quote #3

your wrong dutchmeat
the second parameter is the multiplier
the third paramter is the return vector
http://www.amxmodx.org/funcwiki.php?go=func&id=361
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 11-22-2006 , 13:39   Re: VelocityByAim
Reply With Quote #4

oops, sorry then
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-22-2006 , 22:30   Re: VelocityByAim
Reply With Quote #5

can you explaine what the last paramter is ? so if vel = 100 and i do 1000 as the pultiplier , it will be 10,000 ? and i need to get the entity index of a weapon being dropped how can i do this ?
The Specialist is offline
Send a message via AIM to The Specialist
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 11-23-2006 , 10:44   Re: VelocityByAim [SOLVED]
Reply With Quote #6

Code:
public function(id) {
   new Float:fRetVector[3]
   velocity_by_aim(id, 1000, fRetVector)
   // Firts parameter: Playerid
   // Second parameter: Multiplier
   // Third parameter: Return vector... The velocity is saved in there

   set_pev(id, pev_velocity, fRetVector)
}
Hope this will explain it a bit better
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-23-2006 , 11:49   Re: VelocityByAim [SOLVED]
Reply With Quote #7

ah , i see. The amxmodx.org/doc wasnt very explanatory. It only said return value. but didnt say what value it returned , thanks !
The Specialist is offline
Send a message via AIM to The Specialist
VEN
Veteran Member
Join Date: Jan 2005
Old 11-23-2006 , 14:10   Re: VelocityByAim [SOLVED]
Reply With Quote #8

Quote:
/* Gives you a velocity in the direction a player is looking, iVelocity is the multiplier. */
native velocity_by_aim(iIndex, iVelocity, Float:vRetValue[3]);
Quote:
Gives you a velocity
Quote:
Float:vRetValue[3]
logic...
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 06:54.


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