Raised This Month: $ Target: $400
 0% 

Address of an entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
JusTGo
Veteran Member
Join Date: Mar 2013
Old 12-15-2015 , 06:23   Re: Address of an entity
Reply With Quote #8

look at the soccerjum plugin it does waht you say when you curve the ball


PHP Code:
public CurveBall(id) {
    if(
direction && get_speed(aball) > && curvecount 0) {

        new 
Float:dAmt float((direction CURVE_ANGLE) / ANGLEDIVIDE);
        new 
Float:v[3], Float:v_forward[3];
        
        
entity_get_vector(aballEV_VEC_velocityv);
        
vector_to_angle(vBallSpinDirection);

        
BallSpinDirection[1] = normalizeBallSpinDirection[1] + dAmt );
        
BallSpinDirection[2] = 0.0;
        
        
angle_vector(BallSpinDirection1v_forward);
        
        new 
Float:speed vector_length(v)// * 0.95;
        
v[0] = v_forward[0] * speed
        v
[1] = v_forward[1] * speed
        
        entity_set_vector
(aballEV_VEC_velocityv);

        
curvecount--;
        
set_task(CURVE_TIME"CurveBall"id);
    }

https://forums.alliedmods.net/showthread.php?t=41447
__________________

Last edited by JusTGo; 12-15-2015 at 06:24.
JusTGo is offline
 



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 18:02.


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