View Single Post
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