AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ham_EyePosition (https://forums.alliedmods.net/showthread.php?t=88849)

joaquimandrade 03-29-2009 16:53

Ham_EyePosition
 
How do i use it?

PHP Code:

new Float:eyes[3];
ExecuteHam(Ham_EyePositionideyes); 

Is crashing my server. If that's the correct usage, can someone reproduce it?

ConnorMcLeod 03-29-2009 17:20

Re: Ham_EyePosition
 
Some ham functions crash, haven't tried this one.

Anyway, you can use : origin + view_ofs if you need float, else use get_user_origin with mode 1.


I'm an idiot, but try this :

PHP Code:

new Float:eyes[3];
eyes ExecuteHam(Ham_EyePositionid); 


joaquimandrade 03-29-2009 17:21

Re: Ham_EyePosition
 
Quote:

Originally Posted by ConnorMcLeod (Post 792666)
Some ham functions crash, haven't tried this one.

Anyway, you can use : origin + view_ofs if you need float, else use get_user_origin with mode 1.

Ok. Thanks.

SchlumPF* 03-29-2009 17:21

Re: Ham_EyePosition
 
PHP Code:

     /**
     * Description:        Returns the eye position of the entity.
     * Forward params:    function(this);
     * Return type:        Vector (byref'd in Execute).
     * Execute params:    ExecuteHam(Ham_EyePosition, this, Float:output[3]);
     */
    
Ham_EyePosition

it seems to be correct

edit: connorr was faster :/ anyway i expirienced some crashs with ham too although i ahd the correct syntax.

joaquimandrade 03-29-2009 17:25

Re: Ham_EyePosition
 
Quote:

Originally Posted by ConnorMcLeod (Post 792666)
Some ham functions crash, haven't tried this one.

Anyway, you can use : origin + view_ofs if you need float, else use get_user_origin with mode 1.


I'm an idiot, but try this :

PHP Code:

new Float:eyes[3];
eyes ExecuteHam(Ham_EyePositionid); 


"eyes = " gives "array must be indexed"


Quote:

Anyway, you can use : origin + view_ofs if you need float
Works nice.


Quote:

Originally Posted by SchlumPF* (Post 792669)
PHP Code:

     /**
     * Description:        Returns the eye position of the entity.
     * Forward params:    function(this);
     * Return type:        Vector (byref'd in Execute).
     * Execute params:    ExecuteHam(Ham_EyePosition, this, Float:output[3]);
     */
    
Ham_EyePosition

it seems to be correct

edit: connorr was faster :/ anyway i expirienced some crashs with ham too although i ahd the correct syntax.

It should be broken.

Arkshine 03-29-2009 17:27

Re: Ham_EyePosition
 
Quote:

virtual Vector EyePosition( ) { return pev->origin + pev->view_ofs; }; // position of eyes
Since you are a god joaquimandrade, you can find why some Ham_* crashs.

ConnorMcLeod 03-29-2009 17:27

Re: Ham_EyePosition
 
Quote:

Originally Posted by arkshine (Post 792675)
Since you are a god joaquimandrade, you can find why some Ham_* crashs.

Would be cool, indeed.

joaquimandrade 03-29-2009 17:28

Re: Ham_EyePosition
 
Quote:

Originally Posted by arkshine (Post 792675)
Since you are a god joaquimandrade, you can find why some Ham_* crashs.

You want me to find in hamsandwich code why Ham_* crashs?

You meant "good joaquimandrade"?

Arkshine 03-29-2009 17:33

Re: Ham_EyePosition
 
No. God. Anyway, if I'm right, Ham_EyePosition and Ham_Weapon_SendWeaponAnim crash. Since you have a lot of knowledge, maybe you can find the problem.

joaquimandrade 03-29-2009 17:35

Re: Ham_EyePosition
 
Quote:

Originally Posted by arkshine (Post 792683)
No. God. Anyway, if I'm right, Ham_EyePosition and Ham_Weapon_SendWeaponAnim crash. Since you have a lot of knowledge, maybe you can find the problem.

Thanks you. That is very kind. I need to read a C++ book before i can analyze that. To read, will be no problem to me but, i still haven't done it.


All times are GMT -4. The time now is 08:49.

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