Raised This Month: $ Target: $400
 0% 

Solved [ H3LP ] Something like velocity_by_aim ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-20-2017 , 12:14   [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #1

Hello, exists something like velocity_by_aim? I need this because I'm creating a wall climb, but I want move the player with the W, A, D keys, dont only with W.
__________________









Last edited by CrazY.; 04-21-2017 at 09:40.
CrazY. is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-20-2017 , 13:27   Re: [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #2

https://www.amxmodx.org/api/vector/velocity_by_aim ???
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-20-2017 , 14:59   Re: [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #3

I tell something like, dont the velocity by aim. I need speed to the move direction, dont aim position.
__________________








CrazY. is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-20-2017 , 15:16   Re: [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #4

You said exactly that... Check if the player is holding the A/D keys and move him in that direction. You can check and see how a wall climb plugin works.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-20-2017 , 17:07   Re: [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #5

Tryied with entity_set_vector(id, EV_VEC_velocity...), but have some mistakes. Only work correctly with W key...
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-21-2017 , 00:50   Re: [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #6

Left is negative , right is positive
PS : this idea is similar to call of duty advance warfare player boost jump

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Velocity By Side"
#define VERSION "1.0"
#define AUTHOR "Natsheh"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /goRight""clcmd_right")
    
register_clcmd("say /goLeft""clcmd_left")
}

public 
clcmd_right(id)
{
    new 
Float:vVelo[3];
    
fm_velocity_byside(id400vVelo)
    
set_pev(idpev_velocityvVelo)
    
client_print(idprint_chat"* Boost Right.")
}

public 
clcmd_left(id)
{
    new 
Float:vVelo[3];
    
fm_velocity_byside(id, -400vVelo)
    
set_pev(idpev_velocityvVelo)
    
client_print(idprint_chat"* Boost Left.")
}

/* Credits TO VEN */
stock fm_velocity_byside(indexmultiplierFloat:velocity[3])
{
    new 
Float:vec[3]
    
pev(indexpev_v_anglevec)
    
engfunc(EngFunc_MakeVectorsvec)
    
global_get(glb_v_rightvec)
    
    
velocity[0] = vec[0] * multiplier
    velocity
[1] = vec[1] * multiplier
    velocity
[2] = vec[2] * multiplier

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-21-2017 at 08:13.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-21-2017 , 08:35   Re: [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #7

Quote:
Left is negative , right is positive
I know about that.

Quote:
this idea is similar to call of duty advance warfare player boost jump
Ok, I will try extract some code from your example.
__________________








CrazY. is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-21-2017 , 09:10   Re: [ H3LP ] Something like velocity_by_aim ?
Reply With Quote #8

Thanks Natsheh, worked perfectly.

Results in my next aliens vs predator
__________________








CrazY. 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 17:59.


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