Raised This Month: $ Target: $400
 0% 

Heatvision -- Alpha 1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BetaX
Member
Join Date: Nov 2005
Old 12-26-2005 , 18:44   Heatvision -- Alpha 1
Reply With Quote #1

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <engine> new g_nMsgScreenFade public plugin_init() {     register_plugin("HEAT VISION", "1.0a", "BetaX")     register_clcmd("say /buy", "handle_buy", -1, "...");     g_nMsgScreenFade = get_user_msgid("ScreenFade") } public handle_buy(id) {     new pMoney = cs_get_user_money(id);     if (pMoney <= 100) {         return PLUGIN_HANDLED;     }         new pNewMoney = pMoney - 100;     cs_set_user_money(id, pNewMoney, 1);     set_task(0.1,"handle_green",0,"",0,"b")     return PLUGIN_HANDLED; } public handle_green(id) {     message_begin(MSG_ONE,g_nMsgScreenFade,{0,0,0},id)     write_short(0.1)    // Duration     write_short(10) // Hold time     write_short(0)  // Fade type     write_byte (200)        // Red     write_byte (0)      // Green     write_byte (0)      // Blue     write_byte (10) // Alpha     message_end()     return PLUGIN_CONTINUE }

I did something bad here. :S

(By the way, I'll add in the credits after I am completely done.

Some of this was blatantly stolen from V3X and AsskickR. <3 Open Source guys...)

Something with handle_green... or red, in this situation. >>

I have no idea what I am doing wrong. I think it is the dest in message_begin...

Also, a second question, where can I find a clean list of these types of events and what they do?

I am in the HL SDK, but they're hard to find.

Thanks again for helping a poor noob like myself!
BetaX is offline
DarlD
Senior Member
Join Date: Aug 2004
Old 12-26-2005 , 19:31  
Reply With Quote #2

I been looking for an event list as well, hard to find
__________________
DarlD is offline
Send a message via MSN to DarlD
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-26-2005 , 21:03  
Reply With Quote #3

Code:
set_task(0.1, "handle_green", id, _, _, "b")

As for the events list, take a look at this ( a bit outdated, I think ): http://ghw-amxx.biz/cs_events.html

I'm hoping to get the AMXX site done soon, too.. ;-\
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
BetaX
Member
Join Date: Nov 2005
Old 12-27-2005 , 15:38  
Reply With Quote #4

Quote:
Originally Posted by v3x
Code:
set_task(0.1, "handle_green", id, _, _, "b")

As for the events list, take a look at this ( a bit outdated, I think ): http://ghw-amxx.biz/cs_events.html

I'm hoping to get the AMXX site done soon, too.. ;-\
...

V3x, I think that list is missing some events.

And also, where is a list of the MSG_* in the message_begin function? And maybe an explanation?

For instance, 'Ultimate Lightning' by Basic-Master has . . .

Code:
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
BetaX is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 12-29-2005 , 13:16  
Reply With Quote #5

SVC_TEMPENTITY is a different type of message, with a lot of stuff you can do with it. Heres a long list of args:
NOTE: The first byte must be it "identifier" so the engine knows what to do. If its not the game will crash.
EX:
Code:
message_begin(MSG_ALL,SVC_TEMPENTITY)  write_byte(27)  // 27 = TE_DLIGHT  ...  message_end()

Code:
//
// temp entity events
//

#define   TE_BEAMPOINTS      0      // beam effect between two points
// coord coord coord (start position)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)

#define   TE_BEAMENTPOINT      1      // beam effect between point and entity
// short (start entity)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)

#define   TE_GUNSHOT         2      // particle effect plus ricochet sound
// coord coord coord (position)

#define   TE_EXPLOSION      3      // additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps
// coord coord coord (position)
// short (sprite index)
// byte (scale in 0.1's)
// byte (framerate)
// byte (flags)
//
// The Explosion effect has some flags to control performance/aesthetic features:
#define TE_EXPLFLAG_NONE      0   // all flags clear makes default Half-Life explosion
#define TE_EXPLFLAG_NOADDITIVE   1   // sprite will be drawn opaque (ensure that the sprite you send is a non-additive sprite)
#define TE_EXPLFLAG_NODLIGHTS   2   // do not render dynamic lights
#define TE_EXPLFLAG_NOSOUND      4   // do not play client explosion sound
#define TE_EXPLFLAG_NOPARTICLES   8   // do not draw particles


#define   TE_TAREXPLOSION      4      // Quake1 "tarbaby" explosion with sound
// coord coord coord (position)

#define   TE_SMOKE         5      // alphablend sprite, move vertically 30 pps
// coord coord coord (position)
// short (sprite index)
// byte (scale in 0.1's)
// byte (framerate)

#define   TE_TRACER         6      // tracer effect from point to point
// coord, coord, coord (start)
// coord, coord, coord (end)

#define   TE_LIGHTNING      7      // TE_BEAMPOINTS with simplified parameters
// coord, coord, coord (start)
// coord, coord, coord (end)
// byte (life in 0.1's)
// byte (width in 0.1's)
// byte (amplitude in 0.01's)
// short (sprite model index)

#define   TE_BEAMENTS         8      
// short (start entity)
// short (end entity)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)

#define   TE_SPARKS         9      // 8 random tracers with gravity, ricochet sprite
// coord coord coord (position)

#define   TE_LAVASPLASH      10      // Quake1 lava splash
// coord coord coord (position)

#define   TE_TELEPORT         11      // Quake1 teleport splash
// coord coord coord (position)

#define TE_EXPLOSION2      12      // Quake1 colormaped (base palette) particle explosion with sound
// coord coord coord (position)
// byte (starting color)
// byte (num colors)

#define TE_BSPDECAL         13      // Decal from the .BSP file
// coord, coord, coord (x,y,z), decal position (center of texture in world)
// short (texture index of precached decal texture name)
// short (entity index)
// [optional - only included if previous short is non-zero (not the world)] short (index of model of above entity)

#define TE_IMPLOSION      14      // tracers moving toward a point
// coord, coord, coord (position)
// byte (radius)
// byte (count)
// byte (life in 0.1's)

#define TE_SPRITETRAIL      15      // line of moving glow sprites with gravity, fadeout, and collisions
// coord, coord, coord (start)
// coord, coord, coord (end)
// short (sprite index)
// byte (count)
// byte (life in 0.1's)
// byte (scale in 0.1's)
// byte (velocity along vector in 10's)
// byte (randomness of velocity in 10's)

#define TE_BEAM            16      // obsolete

#define TE_SPRITE         17      // additive sprite, plays 1 cycle
// coord, coord, coord (position)
// short (sprite index)
// byte (scale in 0.1's)
// byte (brightness)

#define TE_BEAMSPRITE      18      // A beam with a sprite at the end
// coord, coord, coord (start position)
// coord, coord, coord (end position)
// short (beam sprite index)
// short (end sprite index)

#define TE_BEAMTORUS      19      // screen aligned beam ring, expands to max radius over lifetime
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)

#define TE_BEAMDISK         20      // disk that expands to max radius over lifetime
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)

#define TE_BEAMCYLINDER      21      // cylinder that expands to max radius over lifetime
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)

#define TE_BEAMFOLLOW      22      // create a line of decaying beam segments until entity stops moving
// short (entity:attachment to follow)
// short (sprite index)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte,byte,byte (color)
// byte (brightness)

#define TE_GLOWSPRITE      23      
// coord, coord, coord (pos) short (model index) byte (scale / 10)

#define TE_BEAMRING         24      // connect a beam ring to two entities
// short (start entity)
// short (end entity)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)

#define TE_STREAK_SPLASH   25      // oriented shower of tracers
// coord coord coord (start position)
// coord coord coord (direction vector)
// byte (color)
// short (count)
// short (base speed)
// short (ramdon velocity)

#define TE_BEAMHOSE         26      // obsolete

#define TE_DLIGHT         27      // dynamic light, effect world, minor entity effect
// coord, coord, coord (pos)
// byte (radius in 10's)
// byte byte byte (color)
// byte (brightness)
// byte (life in 10's)
// byte (decay rate in 10's)

#define TE_ELIGHT         28      // point entity light, no world effect
// short (entity:attachment to follow)
// coord coord coord (initial position)
// coord (radius)
// byte byte byte (color)
// byte (life in 0.1's)
// coord (decay rate)

#define TE_TEXTMESSAGE      29
// short 1.2.13 x (-1 = center)
// short 1.2.13 y (-1 = center)
// byte Effect 0 = fade in/fade out
         // 1 is flickery credits
         // 2 is write out (training room)

// 4 bytes r,g,b,a color1   (text color)
// 4 bytes r,g,b,a color2   (effect color)
// ushort 8.8 fadein time
// ushort 8.8  fadeout time
// ushort 8.8 hold time
// optional ushort 8.8 fxtime   (time the highlight lags behing the leading text in effect 2)
// string text message      (512 chars max sz string)
#define TE_LINE            30
// coord, coord, coord      startpos
// coord, coord, coord      endpos
// short life in 0.1 s
// 3 bytes r, g, b

#define TE_BOX            31
// coord, coord, coord      boxmins
// coord, coord, coord      boxmaxs
// short life in 0.1 s
// 3 bytes r, g, b

#define TE_KILLBEAM         99      // kill all beams attached to entity
// short (entity)

#define TE_LARGEFUNNEL      100
// coord coord coord (funnel position)
// short (sprite index)
// short (flags)

#define   TE_BLOODSTREAM      101      // particle spray
// coord coord coord (start position)
// coord coord coord (spray vector)
// byte (color)
// byte (speed)

#define   TE_SHOWLINE         102      // line of particles every 5 units, dies in 30 seconds
// coord coord coord (start position)
// coord coord coord (end position)

#define TE_BLOOD         103      // particle spray
// coord coord coord (start position)
// coord coord coord (spray vector)
// byte (color)
// byte (speed)

#define TE_DECAL         104      // Decal applied to a brush entity (not the world)
// coord, coord, coord (x,y,z), decal position (center of texture in world)
// byte (texture index of precached decal texture name)
// short (entity index)

#define TE_FIZZ            105      // create alpha sprites inside of entity, float upwards
// short (entity)
// short (sprite index)
// byte (density)

#define TE_MODEL         106      // create a moving model that bounces and makes a sound when it hits
// coord, coord, coord (position)
// coord, coord, coord (velocity)
// angle (initial yaw)
// short (model index)
// byte (bounce sound type)
// byte (life in 0.1's)

#define TE_EXPLODEMODEL      107      // spherical shower of models, picks from set
// coord, coord, coord (origin)
// coord (velocity)
// short (model index)
// short (count)
// byte (life in 0.1's)

#define TE_BREAKMODEL      108      // box of models or sprites
// coord, coord, coord (position)
// coord, coord, coord (size)
// coord, coord, coord (velocity)
// byte (random velocity in 10's)
// short (sprite or model index)
// byte (count)
// byte (life in 0.1 secs)
// byte (flags)

#define TE_GUNSHOTDECAL      109      // decal and ricochet sound
// coord, coord, coord (position)
// short (entity index???)
// byte (decal???)

#define TE_SPRITE_SPRAY      110      // spay of alpha sprites
// coord, coord, coord (position)
// coord, coord, coord (velocity)
// short (sprite index)
// byte (count)
// byte (speed)
// byte (noise)

#define TE_ARMOR_RICOCHET   111      // quick spark sprite, client ricochet sound.
// coord, coord, coord (position)
// byte (scale in 0.1's)

#define TE_PLAYERDECAL      112      // ???
// byte (playerindex)
// coord, coord, coord (position)
// short (entity???)
// byte (decal number???)
// [optional] short (model index???)

#define TE_BUBBLES         113      // create alpha sprites inside of box, float upwards
// coord, coord, coord (min start position)
// coord, coord, coord (max start position)
// coord (float height)
// short (model index)
// byte (count)
// coord (speed)

#define TE_BUBBLETRAIL      114      // create alpha sprites along a line, float upwards
// coord, coord, coord (min start position)
// coord, coord, coord (max start position)
// coord (float height)
// short (model index)
// byte (count)
// coord (speed)

#define TE_BLOODSPRITE      115      // spray of opaque sprite1's that fall, single sprite2 for 1..2 secs (this is a high-priority tent)
// coord, coord, coord (position)
// short (sprite1 index)
// short (sprite2 index)
// byte (color)
// byte (scale)

#define TE_WORLDDECAL      116      // Decal applied to the world brush
// coord, coord, coord (x,y,z), decal position (center of texture in world)
// byte (texture index of precached decal texture name)

#define TE_WORLDDECALHIGH   117      // Decal (with texture index > 256) applied to world brush
// coord, coord, coord (x,y,z), decal position (center of texture in world)
// byte (texture index of precached decal texture name - 256)

#define TE_DECALHIGH      118      // Same as TE_DECAL, but the texture index was greater than 256
// coord, coord, coord (x,y,z), decal position (center of texture in world)
// byte (texture index of precached decal texture name - 256)
// short (entity index)

#define TE_PROJECTILE      119      // Makes a projectile (like a nail) (this is a high-priority tent)
// coord, coord, coord (position)
// coord, coord, coord (velocity)
// short (modelindex)
// byte (life)
// byte (owner)  projectile won't collide with owner (if owner == 0, projectile will hit any client).

#define TE_SPRAY         120      // Throws a shower of sprites or models
// coord, coord, coord (position)
// coord, coord, coord (direction)
// short (modelindex)
// byte (count)
// byte (speed)
// byte (noise)
// byte (rendermode)

#define TE_PLAYERSPRITES   121      // sprites emit from a player's bounding box (ONLY use for players!)
// byte (playernum)
// short (sprite modelindex)
// byte (count)
// byte (variance) (0 = no variance in size) (10 = 10% variance in size)

#define TE_PARTICLEBURST   122      // very similar to lavasplash.
// coord (origin)
// short (radius)
// byte (particle color)
// byte (duration * 10) (will be randomized a bit)

#define TE_FIREFIELD         123      // makes a field of fire.
// coord (origin)
// short (radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
// short (modelindex)
// byte (count)
// byte (flags)
// byte (duration (in seconds) * 10) (will be randomized a bit)
//
// to keep network traffic low, this message has associated flags that fit into a byte:
#define TEFIRE_FLAG_ALLFLOAT   1 // all sprites will drift upwards as they animate
#define TEFIRE_FLAG_SOMEFLOAT   2 // some of the sprites will drift upwards. (50% chance)
#define TEFIRE_FLAG_LOOP      4 // if set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration.
#define TEFIRE_FLAG_ALPHA      8 // if set, sprite is rendered alpha blended at 50% else, opaque
#define TEFIRE_FLAG_PLANAR      16 // if set, all fire sprites have same initial Z instead of randomly filling a cube.

#define TE_PLAYERATTACHMENT         124 // attaches a TENT to a player (this is a high-priority tent)
// byte (entity index of player)
// coord (vertical offset) ( attachment origin.z = player origin.z + vertical offset )
// short (model index)
// short (life * 10 );

#define TE_KILLPLAYERATTACHMENTS   125 // will expire all TENTS attached to a player.
// byte (entity index of player)

#define TE_MULTIGUNSHOT            126 // much more compact shotgun message
// This message is used to make a client approximate a 'spray' of gunfire.
// Any weapon that fires more than one bullet per frame and fires in a bit of a spread is
// a good candidate for MULTIGUNSHOT use. (shotguns)
//
// NOTE: This effect makes the client do traces for each bullet, these client traces ignore
//       entities that have studio models.Traces are 4096 long.
//
// coord (origin)
// coord (origin)
// coord (origin)
// coord (direction)
// coord (direction)
// coord (direction)
// coord (x noise * 100)
// coord (y noise * 100)
// byte (count)
// byte (bullethole decal texture index)

#define TE_USERTRACER            127 // larger message than the standard tracer, but allows some customization.
// coord (origin)
// coord (origin)
// coord (origin)
// coord (velocity)
// coord (velocity)
// coord (velocity)
// byte ( life * 10 )
// byte ( color ) this is an index into an array of color vectors in the engine. (0 - )
// byte ( length * 10 )
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
BetaX
Member
Join Date: Nov 2005
Old 12-30-2005 , 18:52  
Reply With Quote #6

Ahhh... Yes, thank you. I already resolved this, and I already found that list.

Thanks anyhow. I'm sure it'll help someone else.
BetaX is offline
Reply



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 16:12.


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