AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   VelocityByAim [SOLVED] (https://forums.alliedmods.net/showthread.php?t=47623)

The Specialist 11-22-2006 12:59

VelocityByAim [SOLVED]
 
how do you use VelocityByAim ? what is the 3rd paramter, i dont understand it :cry:

dutchmeat 11-22-2006 13:11

Re: VelocityByAim
 
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.

P34nut 11-22-2006 13:22

Re: VelocityByAim
 
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

dutchmeat 11-22-2006 13:39

Re: VelocityByAim
 
oops, sorry then :)

The Specialist 11-22-2006 22:30

Re: VelocityByAim
 
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 ?

P34nut 11-23-2006 10:44

Re: VelocityByAim [SOLVED]
 
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

The Specialist 11-23-2006 11:49

Re: VelocityByAim [SOLVED]
 
ah , i see. The amxmodx.org/doc wasnt very explanatory. It only said return value. but didnt say what value it returned , thanks !

VEN 11-23-2006 14:10

Re: VelocityByAim [SOLVED]
 
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...


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

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