Raised This Month: $12 Target: $400
 3% 

[INFO] Fakemeta & Ham detailed function descriptions and examples


Post New Thread Reply   
 
Thread Tools Display Modes
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 12-11-2009 , 06:38   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #151

Quote:
Originally Posted by Arkshine View Post
What are you talking about...
PHP Code:
public grenade_throw(id,ent,wid

    static 
trFloat:End[3
     
    
engfunc(EngFunc_TraceToss,ent,0,tr
    
get_tr2(tr,TR_vecEndPos,End
    
//We have the result of the entity
     
    
client_print(0,print_chat,"%f %f %f",End[0],End[1],End[2])  // You print that result to all players (the result does not depend on the client)

01101101 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-11-2009 , 06:40   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #152

You miss the point that this param has nothing to do with "to show to all players or just him".

skipent = The entity to skip in trace
__________________
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-11-2009 , 08:11   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #153

Quote:
Originally Posted by Starsailor View Post
i tested this function with this code

Only my origin changes a few units.

this is right?
Try to execute this function when you're jumping.

Quote:
Originally Posted by 01101101 View Post
The bad thing is that the only way of doing a curve is with many lines lol (I think, maybe there is a message for a curve but I've never seen it)
If you need to draw the parabola, you must do it at think and not with this functions.

I've tested this function in this way:

- Long jump
- Execute this function as fast as possbile to draw a line.
- I get a lot of lines from every point in the parabola to the same end
__________________

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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-11-2009 , 08:19   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #154

Quote:
Try to execute this function when you're jumping.
Why do you say that ? I mean the skipent exists to avoid this problem to ignore the entity where the trace starts. It's the same as TraceLine if you start a trace from your origin it will collide on you.
__________________
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-11-2009 , 09:20   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #155

Quote:
Originally Posted by Arkshine View Post
Why do you say that ? I mean the skipent exists to avoid this problem to ignore the entity where the trace starts. It's the same as TraceLine if you start a trace from your origin it will collide on you.
The function works when you're moving off-ground.

If you're standing up on worldspawn, you'll get the same origin as the start point.

If you're jumping, you'll get the point where you will touch again worldspawn.

One funny thing.
If you jump and you're going to touch sky (or ceiling) this trace will be that point and not where you will be back at floor.

So, this function returns the point where you will be stopped (at the fly) by something.
__________________

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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-11-2009 , 09:31   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #156

Quote:
If you're standing up on worldspawn, you'll get the same origin as the start point.
Just tested again, it works fine for me whatever I'm moving, jumping or not.
__________________

Last edited by Arkshine; 12-11-2009 at 09:33.
Arkshine is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 12-11-2009 , 10:07   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #157

Quote:
Originally Posted by joropito View Post
If you need to draw the parabola, you must do it at think and not with this functions.
Yes, but with think it draws the line while it moves in the air.
With this function you could draw the parabola before it is actually thrown.
This wouldn't be hard since unlikely source random nades motion, cs is like static, the end position will be always the same, the curve ratio, and many other factors.
01101101 is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 12-11-2009 , 12:34   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #158

Quote:
Originally Posted by joropito View Post
Try to execute this function when you're jumping.
Yes, Now It is working for me

Tested With this code

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

static BeamSprite

public plugin_init()
{
    
RegisterHam(Ham_Player_Jump,"player","jump")
}

public 
plugin_precache()
{
    
BeamSprite precache_model("sprites/zbeam1.spr");
}

public 
jump(id)
{
    static 
tr,Float:End[3],Float:Origin[3]
    
    
pev(id,pev_origin,Origin)
    
engfunc(EngFunc_TraceToss,id,IGNORE_MONSTERS,tr)
    
get_tr2(tr,TR_vecEndPos,End)
        
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_BEAMPOINTS)
    
engfunc(EngFunc_WriteCoordOrigin[0])
    
engfunc(EngFunc_WriteCoordOrigin[1])
    
engfunc(EngFunc_WriteCoordOrigin[2])
    
engfunc(EngFunc_WriteCoordEnd[0])
    
engfunc(EngFunc_WriteCoordEnd[1])
    
engfunc(EngFunc_WriteCoordEnd[2])
    
write_short(BeamSprite)
    
write_byte(1)
    
write_byte(5)
    
write_byte(60)
    
write_byte(20)
    
write_byte(0)
    
write_byte(255)
    
write_byte(0)
    
write_byte(0)
    
write_byte(200)
    
write_byte(200)
    
message_end()
    

Result:

__________________
Find my plugins here..

Ex - Spanish Moderator.

Last edited by Starsailor; 12-11-2009 at 12:36.
Starsailor is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 12-11-2009 , 13:00   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #159

Quote:
Originally Posted by Starsailor View Post
Yes, Now It is working for me

Tested With this code

Why was the jump function called 7 times?
01101101 is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-11-2009 , 13:08   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #160

Quote:
Originally Posted by 01101101 View Post
Why was the jump function called 7 times?
maybe he was holding the key

Starsailor, which map is it?
__________________

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


Thread Tools
Display Modes

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 07:28.


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