Raised This Month: $ Target: $400
 0% 

TE_BEAMCYLINDER


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-13-2009 , 07:46   Re: TE_BEAMCYLINDER
Reply With Quote #4

Quote:
Originally Posted by L// View Post
Example use...

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
 
#define PLUGIN "Test "
#define VERSION "1.0"
#define AUTHOR "L//"
 
new g_explode
 
new const sprite_cylinder[] = { "sprites/shockwave.spr" }
 
public plugin_precache()
{
    g_explode = engfunc(EngFunc_PrecacheModel, sprite_cylinder)
}
 
public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /test", "cylinder")
}
 
public cylinder(id)
{
    new origin[3]
    get_user_origin(id, origin)
 
    create_cylinder(origin, 550, g_explode, 0, 0, 6, 60, 0, 0, 210, 0, 175, 0)
    create_cylinder(origin, 700, g_explode, 0, 0, 6, 60, 0, 0, 235, 0, 150, 0)
    create_cylinder(origin, 850, g_explode, 0, 0, 6, 60, 0, 15, 255, 15, 100, 0)
}
 
stock create_cylinder(origin[3], addrad, sprite, startfrate, framerate, life, width, amplitude, red, green, blue, brightness, speed)
{
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(TE_BEAMCYLINDER)
    write_coord(origin[0])
    write_coord(origin[1])
    write_coord(origin[2])
    write_coord(origin[0])
    write_coord(origin[1])
    write_coord(origin[2] + addrad)
    write_short(sprite)
    write_byte(startfrate)
    write_byte(framerate)
    write_byte(life)
    write_byte(width)
    write_byte(amplitude)
    write_byte(red)
    write_byte(green)
    write_byte(blue)
    write_byte(brightness)
    write_byte(speed)
    message_end()
}
PD: no test
Why are you using fakemeta ? oh..i see, copy-paste
Here's an example doing that with less code - a stock
http://forums.alliedmods.net/showthr...ighlight=grave
__________________


Last edited by anakin_cstrike; 02-13-2009 at 07:48.
anakin_cstrike 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 17:05.


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