AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TE_BEAMCYLINDER (https://forums.alliedmods.net/showthread.php?t=85571)

Speed! 02-12-2009 19:42

TE_BEAMCYLINDER
 
Im not understanding at all the usage of this...

#define TE_BEAMCYLINDER 21 // cylinder that expands to max radius over lifetime
// coord coord coord (center position) //right, up to here OK
// coord coord coord (axis and radius) // dont know wich i should change to get what i want :S
// short (sprite index) // NP
// byte (starting frame) // how can i use this? i mean i do no the framte rate..
// byte (frame rate in 0.1's) //every time i saw this, this was set "0"
// byte (life in 0.1's) //life? duh?
// byte (line width in 0.1's) // guess i know what it is, but not sure
// byte (noise amplitude in 0.01's) // noise, ok
// byte,byte,byte (color) // simple :D
// byte (brightness) // simple :D
// byte (scroll speed in 0.1's) // also, always saw this set on 0

Arkshine 02-12-2009 19:53

Re: TE_BEAMCYLINDER
 
Check this plugin : http://forums.alliedmods.net/showthr...light=frosnade

L// 02-12-2009 20:21

Re: TE_BEAMCYLINDER
 
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

anakin_cstrike 02-13-2009 07:46

Re: TE_BEAMCYLINDER
 
Quote:

Originally Posted by L// (Post 760685)
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 :P
Here's an example doing that with less code - a stock
http://forums.alliedmods.net/showthr...ighlight=grave

Speed! 02-13-2009 09:08

Re: TE_BEAMCYLINDER
 
Thanks for answering but i cant find what the hell does exacltly change the size. :S
I want it near 2mts high (suposing an CT is 1.80 LOL) but when i change one value it changes in an annoyng way :S
and well, radius like 2 cts

L// 02-13-2009 23:38

Re: TE_BEAMCYLINDER
 
Quote:

Originally Posted by anakin_cstrike (Post 760834)
Why are you using fakemeta ? oh..i see, copy-paste :P
Here's an example doing that with less code - a stock
http://forums.alliedmods.net/showthr...ighlight=grave

Code:

native engfunc(type,any:...);
... in fakemeta.inc

anakin_cstrike 02-14-2009 07:47

Re: TE_BEAMCYLINDER
 
It doesn't matter if you copied or not. But i think it's kinda rubish to use fakemeta just for precache native.

@ Speed!: what exactly do you not understand? you want to create that cylinder above a player?

Speed! 02-14-2009 09:54

Re: TE_BEAMCYLINDER
 
Quote:

Originally Posted by anakin_cstrike (Post 761379)
It doesn't matter if you copied or not. But i think it's kinda rubish to use fakemeta just for precache native.

@ Speed!: what exactly do you not understand? you want to create that cylinder above a player?

yes, but know i solved it in another way. im using a model :D


All times are GMT -4. The time now is 17:05.

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