Raised This Month: $ Target: $400
 0% 

Help|svc_bad


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 09-24-2011 , 07:48   Re: Help|svc_bad
Reply With Quote #3

Quote:
Originally Posted by jim_yang View Post
Code:
#include <amxmodx>

new gSprite

public plugin_init()
{
    register_clcmd("say /beam","beam_effect")
}

public plugin_precache()
{
    gSprite = precache_model("sprites/laserbeam.spr")
}

public beam_effect(id)
{
    new origin[3]
    new aimorigin[3]
    get_user_origin(id, origin)
    get_user_origin(id, aimorigin, 3)
    
    message_begin(MSG_ALL, SVC_TEMPENTITY)
    write_byte(TE_BEAMPOINTS)
    write_coord(origin[0])
    write_coord(origin[1])
    write_coord(origin[2])
    write_coord(aimorigin[0])
    write_coord(aimorigin[1])
    write_coord(aimorigin[2])
    write_short(gSprite)    
    write_byte(0)    
    write_byte(0)    
    write_byte(10)    
    write_byte(15)    
    write_byte(0)    
    write_byte(0)
    write_byte(0)
    write_byte(255)
    write_byte(255)
    write_byte(0)
    message_end()
}
Ok it fixed this but there is another problem now :
PHP Code:
#include <amxmodx>
#include <fakemeta_util>
new gSprite

public plugin_init()
{
    
register_clcmd("say /beam","beam_effect")
}

public 
plugin_precache()
{
    
gSprite precache_model("sprites/laserbeam.spr")
}

public 
beam_effect(id)
{
    new 
origin[3]
    new 
Float:aimorigin[3]
    
get_user_origin(idorigin,3)
    
fm_get_aim_origin(idaimorigin)
    
    
message_begin(MSG_ALLSVC_TEMPENTITY)
    
write_byte(TE_BEAMPOINTS)
    
write_coord(origin[0])
    
write_coord(origin[1])
    
write_coord(origin[2])
    
write_coord(aimorigin[0])
    
write_coord(aimorigin[1])
    
write_coord(aimorigin[2])
    
write_short(gSprite)    
    
write_byte(1)    
    
write_byte(5)    
    
write_byte(100)    
    
write_byte(20)    
    
write_byte(0)    
    
write_byte(0)
    
write_byte(0)
    
write_byte(255)
    
write_byte(200)
    
write_byte(200)
    
message_end()

This is the code
here is a picture

look where is my crosshair and where is the beam,
how do i make it go straight from where i am to where i aim.
Dr7sTyLe is offline
 



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 19:43.


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