Raised This Month: $ Target: $400
 0% 

Aiming vector


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
USvER
Junior Member
Join Date: Nov 2006
Location: Ukraine, Kyiv
Old 12-18-2007 , 05:42   Aiming vector
Reply With Quote #1

I want to save and change aiming vector but something is obviously wrong...
An inversion goes at Y and -Y is lost...

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

/////////////////////////////////////////////////////////////////////////////////////
//////////////////////GLOBALS////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////

#define MAX_FRAMES 500
new demo_recording 0
new demo_playing 0
new Float:demo_data[MAX_FRAMES][3]
new 
demo_curentframe 0

/////////////////////////////////////////////////////////////////////////////////////
////////////////////////MAIN/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////

public plugin_init(){
    
register_plugin("Megaplugin""0.1b""[UA] USvER")

    
register_concmd("demo_record""demo_record"ADMIN_KICK"")
    
register_concmd("demo_play""demo_play"ADMIN_KICK"")

    
register_forward(FM_StartFrame,"demo_frame"0)
}

/////////////////////////////////////////////////////////////////////////////////////

public demo_record(idlevelcid){
    if (!
demo_playing)demo_recording 1
    
return PLUGIN_HANDLED
}

/////////////////////////////////////////////////////////////////////////////////////

public demo_play(idlevelcid){
    if (!
demo_recording)demo_playing 1
    
return PLUGIN_HANDLED
}

/////////////////////////////////////////////////////////////////////////////////////

public demo_frame(){
    new 
id get_user_index("USvER")
    if(
demo_recording){
        
pev(idpev_angles,demo_data[demo_curentframe])
        ++
demo_curentframe
        
if(demo_curentframe == MAX_FRAMES){
            
demo_curentframe 0
            demo_recording 
0
        
}
    }

    if(
demo_playing){
        
set_pev(idpev_anglesdemo_data[demo_curentframe])
        
set_pev(idpev_fixangle1)
        ++
demo_curentframe


        
if(demo_curentframe == MAX_FRAMES){
            
demo_curentframe 0
            demo_playing 
0
        
}
    }

    return 
FMRES_OVERRIDE

Please explain to me these variables
pev_v_engle
pev_engles
pev_origin
pev_velocity

tnx
USvER is offline
Send a message via ICQ to USvER
Zenith77
Veteran Member
Join Date: Aug 2005
Old 12-18-2007 , 18:13   Re: Aiming vector
Reply With Quote #2

The pev section in an entity is where it stores a lot of it's personal info.

pev_v_angle - viewing angles of the entity (degrees)
pev_angles - IIRC, the way they are facing (degrees)
pev_origin - its current origin in the world
pev_velocity - the speed and direction of the entity. Contains a vector (x, y, z) in a 3 dimensional array.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
USvER
Junior Member
Join Date: Nov 2006
Location: Ukraine, Kyiv
Old 12-19-2007 , 02:22   Re: Aiming vector
Reply With Quote #3

tnx

Quote:
Originally Posted by Zenith77 View Post
pev_angles - IIRC, the way they are facing (degrees)
I still do not understand what this pev keeps.
Because when I save and load pev_v_angles it does not help.

Somebody plz help why my plugin does not work.
USvER is offline
Send a message via ICQ to USvER
USvER
Junior Member
Join Date: Nov 2006
Location: Ukraine, Kyiv
Old 12-19-2007 , 16:18   Re: Aiming vector
Reply With Quote #4

OOOOOOOOMMMMMMMMMMMMMMGGGGGGGGGGGGGGGGGGGGGGG GGGGGG!!!!

For saving and load of aiming vector it is needed to save pev_v_angle and restore it to pev_angles

I search for it 3 days...
USvER is offline
Send a message via ICQ to USvER
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 11:02.


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