Raised This Month: $32 Target: $400
 8% 

[INFO] Fakemeta & Ham detailed function descriptions and examples


Post New Thread Reply   
 
Thread Tools Display Modes
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-15-2009 , 12:58   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #91

Fakemeta function :
Code:
EngFunc_SetModel

Description :
Properly sets a new model on an entity.


Usage :
Code:
engfunc(EngFunc_SetModel, iEnt, sModel);

Parameters
iEnt = Entity index
sModel = Model file name to set on entity (ex: "models/player/vip/vip.mdl")
Engine Replacement :
http://www.amxmodx.org/funcwiki.php?go=func&id=354
Code:
entity_set_model( entity, Model[] );
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 10-15-2009 at 13:08.
joropito is offline
Send a message via MSN to joropito
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-15-2009 , 13:03   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #92

Fakemeta function :
Code:
EngFunc_SetSize

Description :
Sets the bounds of an entity.


Usage :
Code:
engfunc(EngFunc_SetSize, iEnt, Float:fMins[3], Float:fMaxs[3]);

Parameters
iEnt = Entity index
fMins[3] = Mins boundings values (x,y,z)
fMaxs[3] = Maxs boundings values (x,y,z)
Engine Replacement :
http://www.amxmodx.org/funcwiki.php?go=func&id=328
Code:
entity_set_size( index, Float:mins[3], Float:maxs[3] );
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 10-15-2009 at 13:08.
joropito is offline
Send a message via MSN to joropito
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-15-2009 , 13:07   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #93

Fakemeta function :
Code:
EngFunc_SetOrigin

Description :
Properly sets a new origin on an entity.


Usage :
Code:
engfunc(EngFunc_SetOrigin, iEnt, Float:Origin[3]);

Parameters
iEnt = Entity index
Origin[3] = New origin for the entity (x,y,z)
Engine Replacement :
http://www.amxmodx.org/funcwiki.php?go=func&id=353
Code:
entity_set_origin( index, Float:NewOrigin[3] );
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 10-15-2009 , 13:23   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #94

Fakemeta function:
PHP Code:
EngFunc_TraceModel 
Description:
This function traces between 2 origins a model and gives us properties about it.
It acts just like a TraceLine but it ignores all the entities except the one we want to hit!

The constants that we can use in hull:
PHP Code:
#define HULL_POINT                      0  // This means that we are moving a point from the start to the end
#define HULL_HUMAN                      1  //  That means that we move a cube of a player from start to end
#define HULL_LARGE                      2  // That means that we move a bigger cube that one of the player from start to end (used in HL for big monsters!)
#define HULL_HEAD                       3  // This means that we move from start to end the hull of a ducked player 
Usage:
PHP Code:
// start - start origin
// end - end origin
// hull - the hull that is moved check above to see them
// ent_to_hit - the entity that you want to hit (this is a must!)
// ptr - the trace handle pointer, acts the same as the one in trace line!
engfunc(EngFunc_TraceModel, const Float:start[3], const Float:end[3], hullent_to_hitptr
Extra info:
Do not use this unless you are familliar with TraceLine!
TraceModel usage simple example.
EngFunc_TraceLine Explanation
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 10-16-2009 at 06:05.
ot_207 is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-15-2009 , 13:54   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #95

Quote:
Originally Posted by ot_207 View Post
PHP Code:
EngFunc_TraceModel 
Does this function hits only to bones of the entity? or it can hit to model area or to bounding box?
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-15-2009 , 14:20   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #96

bounding box
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-15-2009 , 15:10   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #97

Fakemeta function :
Code:
EngFunc_MoveToOrigin

Description :
Moves an entity a defined distance toward a coordinate.

If the distance between Entity and Destination is less than the required distance, the entity will pass over that point.
Usage :
Code:
engfunc(EngFunc_MoveToOrigin, iEnt, Float:Destination[3], Float:Distance, iMoveType);

Parameters
iEnt = Entity index
Destination[3] = A Coordinate toward which the entity moves
Distance = The distance to move the entity
iMoveType = This is the MOVE_* option used for monsters and players to change the behaviour of the movement
Code:
#define MOVE_NORMAL		0	// normal move in the direction monster is facing
#define MOVE_STRAFE		1	// moves in direction specified, no matter which way monster is facing
#define MOVE_STUCK_DIST		32	// if a monster can't step this far, it is stuck.
#define MOVE_START_TURN_DIST	64	// when this far away from moveGoal, start turning to face next goal
Caveats :
  • iEnt must be on ground
  • If there's an object closer than Distance that iEnt could collide then the movement is not done
  • If there's a ramp, it works like an object and the movement is not done
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 10-15-2009 at 15:50.
joropito is offline
Send a message via MSN to joropito
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-15-2009 , 15:21   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #98

Quote:
Originally Posted by joropito View Post
About MOVETYPE there's no clew of what it does this option within the function.
Almost every option gives the same result, but if you use MOVETYPE_NONE, you could get random movements.

...

(tested with players only)
That may be why. Test with an entity you created.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-15-2009 , 15:27   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #99

Movetype are that :

Code:
#define MOVE_NORMAL           0  // normal move in the direction monster is facing
#define MOVE_STRAFE           1  // moves in direction specified, no matter which way monster is facing

#define MOVE_STUCK_DIST       32 // if a monster can't step this far, it is stuck.
#define MOVE_START_TURN_DIST  64 // when this far away from moveGoal, start turning to face next goal
It's used mainly for monster but should work on player.
__________________

Last edited by Arkshine; 10-15-2009 at 15:30.
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-15-2009 , 15:52   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #100

Quote:
Originally Posted by Arkshine View Post
It's used mainly for monster but should work on player.
Yeah!
Updated.

When I was using MOVE_NORMAL, I saw random movements but with this information it makes sense.

Thanks
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
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 18:02.


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