Raised This Month: $51 Target: $400
 12% 

Temp Entity Codes // Copiar & Pegar.


  
 
 
Thread Tools Display Modes
Author Message
xLeoNNN
Veteran Member
Join Date: Sep 2010
Location: de_dust2
Old 02-12-2012 , 22:14   Temp Entity Codes // Copiar & Pegar.
#1

Hola, hago esta guía, tutorial, snnipet, como lo quieran llamar con algunos temp entity para llegar y copiar.

por que para llegar y copiar ?
simplemente por que es una paja estar haciendo los codes y borrando los //, aparte que dejo unas imágenes de como hacerlos. Ahh, y también por que no todos saben muy bien los valores de los write_* de estos codes encontrados en message_const.inc .

bueno empecemos:

Resources a usar:

PHP Code:
new g_ExpSprg_smokeSprg_lightingSprsprite_flaresprite_beamic_particlesmodel_gibsg_bubbles

new const EXPLO_SPRITE[] = "sprites/zerogxplode.spr"
new const SMOKE_SPRITE[] = "sprites/steam1.spr"
new const LIGHTING_SPRITE[] = "sprites/lgtning.spr"

public plugin_precache()
{
    
line precache_model("sprites/white.spr")
    
g_ExpSpr precache_model(EXPLO_SPRITE)
    
g_smokeSpr precache_model(SMOKE_SPRITE)
    
g_lightingSpr precache_model(LIGHTING_SPRITE)
    
sprite_flare precache_model("sprites/flare6.spr")
    
sprite_beam precache_model("sprites/laserbeam.spr")
    
ic_particles    precache_model("sprites/glow01.spr")
    
model_gibs precache_model("models/hgibs.mdl")
    
g_bubbles precache_model("sprites/bubble.spr")

TE_DLIGHT: Aura que ilumina el entorno de una entidad. Es llamado cada 0.1 segundos

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)
        
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY_id)
write_byte(TE_DLIGHT// TE id
engfunc(EngFunc_WriteCoordorigin[0]) // x
engfunc(EngFunc_WriteCoordorigin[1]) // y
engfunc(EngFunc_WriteCoordorigin[2]) // z
write_byte(70// radius
write_byte(255// r
write_byte(0// g
write_byte(0// b
write_byte(3// life
write_byte(0// decay rate
message_end() 
TE_BEAMENTPOINT: Linea que une 2 entidades, una válida (classname o player) y la otra no (cualquier otro origin)

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)

message_beginMSG_BROADCAST,SVC_TEMPENTITY)
write_byte (TE_BEAMENTPOINT)
write_short(id 0x1000// lean el comentario de abajo :D
write_coord (origin[0])        // Start X
write_coord (origin[1])        // Start Y
write_coord (origin[2])        // Start Z
write_short(line)        // Sprite
write_byte (1)              // Start frame                
write_byte (10)             // Frame rate                    
write_byte (1)            // Life
write_byte (5)           // Line width                
write_byte (0)            // Noise
write_byte (255)         // Red
write_byte (0)        // Green
write_byte (0)        // Blue
write_byte (150)             // Brightness                    
write_byte (25)              // Scroll speed                    
message_end() 
Quote:
Originally Posted by Kiske View Post
En el TE_BEAMENTPOINT el write_short(id | 0x1000) es la posición desde la que sale el sprite indicado.
El 0x1000 es desde la punta del arma actual (si estás con cuchillo , granadas o la C4 en mano sale desde el centro del jugador el sprite)
TE_BEAMPOINT: Línea que une 2 entidades (origin)

Spoiler


PHP Code:
new PlayerOrigin[3], EndOrigin[3]
get_user_origin(idPlayerOrigin1// Origin del player    get_user_origin(id, EndOrigin, 3) // Origin del AIM del player
        
message_begin(MSG_ONE_UNRELIABLE,SVC_TEMPENTITY {0,0,0},id)
write_byte(TE_BEAMPOINTS// TE_
write_coord(PlayerOrigin[0])    //X // starting pos
write_coord(PlayerOrigin[1])    //Y
write_coord(PlayerOrigin[2])    //Z
write_coord(EndOrigin[0])    //X // ending pos
write_coord(EndOrigin[1])    //Y
write_coord(EndOrigin[2])    //Z
write_short(line)    // sprite index
write_byte (1)      // Start frame                
write_byte (10)     // Frame rate                    
write_byte (1)       // Life
write_byte (5)     // Line width                
write_byte (0)      // Noise
write_byte(255)        // red
write_byte(0)   // green
write_byte(0)    // blue
write_byte(150// brightness
write_byte(25// scroll speed in 0.1's
message_end() 
TE_TAREXPLOSION: Explosión del juego Quake2 con sonido (traducción del inc)



PHP Code:
new originF[3]
get_user_origin(idoriginF3)
    
message_begin(MSG_PVSSVC_TEMPENTITYoriginF0)
write_byte(TE_TAREXPLOSION// TE_
write_coord(originF[0]) // X
write_coord(originF[1]) // Y
write_coord(originF[2]) // Z
message_end() 
TE_EXPLOSION: Explosión normal del CS, véase el ejemplo de la HE-GRENADE.

Spoiler


PHP Code:
new originF[3]
get_user_origin(idoriginF3)

message_begin(MSG_PVSSVC_TEMPENTITYoriginF0)
write_byte(TE_EXPLOSION)
write_coord(originF[0]) // X
write_coord(originF[1]) // Y
write_coord(originF[2]) // Z
write_short(g_ExpSpr// sprite
write_byte(40// scale in 0.1
write_byte(10// framerate
write_byte(0// flags
message_end() 
TE_SMOKE: Efecto de humo simple, véase el ejemplo de la HE-GRENADE.

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)

message_begin(MSG_PVSSVC_TEMPENTITYorigin)
write_byte(TE_SMOKE// TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]-50// z
write_short(g_smokeSpr// sprite
write_byte(random_num(5060)) // scale
write_byte(random_num(1020)) // framerate
message_end() 
TE_SPARKS: Efecto simple de chispas, véase el ejemplo al disparar a un metal (CS)

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)
    
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
write_byte(TE_SPARKS// TE_
write_coord(origin[0]) // X
write_coord(origin[1]) // Y 
write_coord(origin[2]) // Z
message_end() 
TE_LAVASPLASH: Efecto muy bueno de partículas (Quake 1)

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)
    
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
write_byte(TE_LAVASPLASH// TE_
write_coord(origin[0]) // X
write_coord(origin[1]) // Y
write_coord(origin[2]) // Z
message_end() 
TE_TELEPORT: ejemplo simple de teletransportación de Quake 1

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)
    
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
write_byte(TE_TELEPORT// TE_
write_coord(origin[0]) // X
write_coord(origin[1]) // Y
write_coord(origin[2]) // Z
message_end() 
TE_EXPLOSION2: explosión pequeña de partículas de colores amarillos/cafes.

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)
    
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
write_byte(TE_EXPLOSION2// TE_
write_coord(origin[0]) // X
write_coord(origin[1]) // Y
write_coord(origin[2]) // Z
write_byte(188// start color 
write_byte(10// num colors 
message_end() 
TE_IMPLOSION: partículas que se reunen en un punto determinado

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)

message_begin(MSG_PVSSVC_TEMPENTITYorigin)
write_byte(TE_IMPLOSION// TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_byte(128// radius
write_byte(20// count
write_byte(3// duration
message_end() 

TE_SPRITETRAIL: partículas (usando un sprite) que se dispersan con gravedad sobre el entorno.

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin1)
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
write_byte(TE_SPRITETRAIL)
write_coord(origin[0]) // Start X
write_coord(origin[1]) // Start Y
write_coord(origin[2]) // Start Z
write_coord(origin[0]) // End X
write_coord(origin[1]) // End Y
write_coord(origin[2]) // End Z
write_short(sprite_flare// sprite
write_byte(5// count
write_byte(1// life
write_byte(3// scale
write_byte(34// velocity
write_byte(43// randomness of velocity
message_end() 
TE_SPRITETRAIL *2: Partículas (usando un sprite) con gravedad en linea recta entre 1 origin y otro (simplemente lo que cambie fue, en vez de repetir el origin de un jugador, use 2 origins, el del jugador (punto 1) y el del aim (origin 2)).

PHP Code:
new origin[3], EndOrigin[3]
get_user_origin(idorigin1)
get_user_origin(idEndOrigin3)

message_begin(MSG_BROADCASTSVC_TEMPENTITY)
write_byte(TE_SPRITETRAIL)
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_coord(EndOrigin[0]) // x
write_coord(EndOrigin[1]) // y
write_coord(EndOrigin[2]) // z
write_short(sprite_flare)
write_byte(30)
write_byte(2
write_byte(3
write_byte(0)
write_byte(0)
message_end() 
TE_BEAMTORUS: efecto parecido a TE_BEAMCYLINDER/TE_BEAMTORUS/TE_BEAMDISK, onda que se expande.

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
write_byteTE_BEAMTORUS );
write_coordorigin[0]); // Start X
write_coordorigin[1] ); // Start Y
write_coordorigin[2]); // Start Z
write_coordorigin[0] ); // End X
write_coordorigin[1] ); // End Y
write_coordorigin[2] + 850); // End Z
write_shortsprite_beam ); // sprite
write_byte); // Starting frame
write_byte0  ); // framerate * 0.1
write_byte); // life * 0.1
write_byte50 ); // width
write_byte); // noise
write_byte); // color r,g,b
write_byte255 ); // color r,g,b
write_byte); // color r,g,b
write_byte255 ); // brightness
write_byte); // scroll speed
message_end(); 
TE_BEAMDISK: efecto de disco que se expande por el entorno, dejando un pequeño rastro al centro de donde se genera el efecto por unos segundos.

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
write_byte(TE_BEAMDISK)
write_coordorigin[0]); // Start X
write_coordorigin[1] ); // Start Y
write_coordorigin[2]); // Start Z
write_coordorigin[0] ); // End X
write_coordorigin[1] ); // End Y
write_coordorigin[2] + 850); // End Z
write_short(sprite_beam// Sprite
write_byte(0// starting frame
write_byte(0// frame rate
write_byte(8// life
write_byte(50// life width
write_byte(0// noise amplitude
write_byte(255// r
write_byte(0// g
write_byte(0// b
write_byte(255// brightness
write_byte(0// scroll speed
message_end() 
TE_BEAMCYLINDER: onda que se expande desde un origin.

PHP Code:
new originF[3]
get_user_origin(idoriginF3)
    
message_begin(MSG_PVSSVC_TEMPENTITYoriginF0)
write_byte(TE_BEAMCYLINDER// TE id
write_coord(originF[0]) // x
write_coord(originF[1]) // y
write_coord(originF[2]) // z
write_coord(originF[0]) // x axis
write_coord(originF[1]) // y axis
write_coord(originF[2]+555// z axis
write_short(sprite_beam// sprite
write_byte(0// startframe
write_byte(0// framerate
write_byte(4// life
write_byte(60// width
write_byte(0// noise
write_byte(0// red
write_byte(0// green
write_byte(255// blue
write_byte(200// brightness
write_byte(0// speed
message_end() 
TE_BEAMFOLLOW: rastro que deja una entidad al moverse por el mapa.

Spoiler


PHP Code:
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW// TE id
write_short(id// entity
write_short(sprite_beam// sprite
write_byte(10// life
write_byte(10// width
write_byte(255// r
write_byte(0// g
write_byte(0// b
write_byte(200// brightness
message_end() 
TE_LARGEFUNNEL: efecto de partículas de color (verde y blancas creo) que se reunen en un punto, modificadas por un flag, 0 = se reunen, 1 = se expanden (o al revez creo. Ultimo write_short).



PHP Code:
new origin[3]
get_user_origin(idorigin3)

message_beginMSG_BROADCASTSVC_TEMPENTITY );
write_byte(TE_LARGEFUNNEL)
write_coord(origin[0]) // X
write_coord(origin[1]) // Y
write_coord(origin[2]) // Z
write_short(ic_particles// sprite
write_short(0/1// flag
message_end() 
TE_BLOOD: simple efecto de sangre.

Spoiler


PHP Code:
new iOrigin[3]
get_user_origin(idiOrigin3)
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
write_byte(TE_BLOOD)
write_coord(iOrigin[0]) // Start X
write_coord(iOrigin[1]) // Start Y
write_coord(iOrigin[2]) // Start Z
write_coord(iOrigin[0] + 20// End X
write_coord(iOrigin[1] + 20// End Y
write_coord(iOrigin[2] + 20// End Z
write_byte(70// color
write_byte(22// speed
message_end() 
TE_BREAKMODEL: model que se rompe en distintos trozos, luego desaparece.

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)

message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
write_byte(TE_BREAKMODEL); // TE_
write_coord(origin[0]); // X
write_coord(origin[1]); // Y
write_coord(origin[2] + 24); // Z
write_coord(16); // size X
write_coord(16); // size Y
write_coord(16); // size Z
write_coord(random_num(-50,50)); // velocity X
write_coord(random_num(-50,50)); // velocity Y
write_coord(25); // velocity Z
write_byte(10); // random velocity
write_short(model_gibs); // sprite
write_byte(9); // count
write_byte(20); // life
write_byte(0x08); // flags
message_end(); 
respecto a los flags de este...

Quote:
Originally Posted by Arkshine View Post
TE_BREAKMODEL = Box of models ;
About the flags, here retrieved from the HLSDK :

// Break Model Defines

#define BREAK_TYPEMASK 0x4F
#define BREAK_GLASS 0x01
#define BREAK_METAL 0x02
#define BREAK_FLESH 0x04
#define BREAK_WOOD 0x08

#define BREAK_SMOKE 0x10
#define BREAK_TRANS 0x20
#define BREAK_CONCRETE 0x40
#define BREAK_2 0x80

But I don't know exactly what it does.
Edit: Actually it's possible that the material flag overwrites the model provided.
TE_BUBBLES: Efecto simple de burbujas con sprite, cantidad, tamaño, velocidad, etc.

Spoiler


PHP Code:
new origin[3]  
get_user_origin(idorigin3
    
message_begin(MSG_BROADCAST ,SVC_TEMPENTITY)  
write_byte(TE_BUBBLES
write_coord(origin[0]) // Origin X (min start position)
write_coord(origin[1]) // Origin Y
write_coord(origin[2]) // Origin Z
write_coord(origin[0]) // Origin X (max start position)
write_coord(origin[1]) // Origin Y
write_coord(origin[2]) // Origin Z
write_coord(45)        // Float Height     
write_short(g_bubbles// Sprite Index
write_byte(6)           // Count            
write_coord(7)          // Speed   
message_end() 
TE_GUNSHOT: efecto no muy realista de municiones en la pared (al ser disparadas).

Spoiler


PHP Code:
new origin[3]
get_user_origin(idorigin3)

message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
write_byte(TE_GUNSHOT// TE_
write_coord(origin[0]) // Origin X
write_coord(origin[1]) // Origin Y
write_coord(origin[2]) // Origin Z
message_end() 
TE_BEAMRING: efecto de aro entre 2 entidades (NO ORIGIN!)

Spoiler


PHP Code:
new targetbody
get_user_aiming
(idtargetbody// get end entity target
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
write_byte(TE_BEAMRING)
write_short(id// start entity
write_short(target// end entity
write_short(sprite_beam// sprite
write_byte (1)      // Start frame                
write_byte (10)     // Frame rate                    
write_byte (1)       // Life
write_byte (5)     // Line width                
write_byte (0)      // Noise
write_byte(255)        // red
write_byte(0)   // green
write_byte(0)    // blue
write_byte(150// brightness
write_byte(25// scroll speed in 0.1's
message_end() 

TE_BEAMSPRITE: simple efecto de beam (linea) con un sprite al final de este.

Spoiler


PHP Code:
new origin[3], EndOrigin[3]
get_user_origin(idorigin1)
get_user_origin(idEndOrigin3)

message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
write_byte(TE_BEAMSPRITE)
write_coord(origin[0]) // Start X
write_coord(origin[1]) // Start Y
write_coord(origin[2]) // Start Z
write_coord(EndOrigin[0]) // End X
write_coord(EndOrigin[1]) // End Y
write_coord(EndOrigin[2]) // End Z
write_short(sprite_beam// line sprite
write_short(sprite_flare// end effect sprite
message_end() 
Bueno aca termina el tutorial, poco a poco iré agregando mas cosas, y si quedaron en duda respecto a los message_begin, aca les dejo una info de message_const.inc y no creo que sea necesaria traducirla.

Spoiler


*En caso de que quieran usar Fakemeta para los efectos, simplemente cambien los :

PHP Code:
message_begin()
write_coord() 
por

PHP Code:
engfunc(EngFunc_MessageBegin, ....)
engfunc(EngFunc_WriteCoord, ...) 
Aclaraciones:

* Disculpen los 2 mensajes de "Starting new modes (plugin de meTaLiCroSS)" y "Score Human (?)" ya que es mi servidor zombie plague de testeo, pero estaba desactivado, y los mensajes de los estúpidos bots.

* No puse todos los temp que hay ya que algunos no los sé usar muy bien ni para que sirven, a parte de que hay algunos muy parecidos, practicamente iguales o repetidos por así decirlo (lean el .inc) .

*Mañana termino el post y agrego nuevas cosas, aun no me puteen ya que es tarde y mañana tengo que salir temprano .
*Mañana Agregaré otras explicaciones, las imágenes de los efectos y otras cosas.
__________________

Last edited by xLeoNNN; 02-14-2012 at 18:13.
xLeoNNN is offline
Send a message via MSN to xLeoNNN
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 02-12-2012 , 23:42   Re: Temp Entity Codes // Copiar & Pegar.
#2

Nooo copadisimo, me re sirve jaja.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 02-13-2012 , 01:40   Re: Temp Entity Codes // Copiar & Pegar.
#3

buenísimo.. te re pusiste.. +1 y muchos
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Kiske
Veteran Member
Join Date: May 2009
Old 02-13-2012 , 02:22   Re: Temp Entity Codes // Copiar & Pegar.
#4

En el TE_BEAMENTPOINT el write_short(id | 0x1000) es la posición desde la que sale el sprite indicado.
El 0x1000 es desde la punta del arma actual (si estás con cuchillo , granadas o la C4 en mano sale desde el centro del jugador el sprite)



En el TE_SPRITETRAIL:
PHP Code:
new origin[3], EndOrigin[3]
get_user_origin(idorigin1)
get_user_origin(idorigin3
->
PHP Code:
new origin[3], EndOrigin[3]
get_user_origin(idorigin1)
get_user_origin(idEndOrigin3

Last edited by Kiske; 02-13-2012 at 02:30.
Kiske is offline
Send a message via Skype™ to Kiske
Exc3ll@N
Veteran Member
Join Date: Oct 2009
Location: Donde me lleve el viento
Old 02-13-2012 , 13:10   Re: Temp Entity Codes // Copiar & Pegar.
#5

Buenisimo , con esto aprendo a hacer efectos
__________________
Haz lo que sientas y te haga feliz.
Exc3ll@N is offline
Send a message via MSN to Exc3ll@N
MisterDeath
BANNED
Join Date: Sep 2010
Location: pico pal q lee
Old 02-13-2012 , 14:26   Re: Temp Entity Codes // Copiar & Pegar.
#6

Esta de 10
MisterDeath is offline
CoQuito
Senior Member
Join Date: Jul 2011
Location: Hempstead, New York
Old 02-13-2012 , 18:37   Re: Temp Entity Codes // Copiar & Pegar.
#7

Good $;
__________________
CoQuito is offline
Send a message via MSN to CoQuito Send a message via Skype™ to CoQuito
xLeoNNN
Veteran Member
Join Date: Sep 2010
Location: de_dust2
Old 02-13-2012 , 21:53   Re: Temp Entity Codes // Copiar & Pegar.
#8

gracias kiske no me habia fijado, que raro que no tuve error cuando testie xdd.

mañana agrego las otras cosas que vengo cansado ahora xdd
__________________
xLeoNNN is offline
Send a message via MSN to xLeoNNN
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 02-13-2012 , 22:05   Re: Temp Entity Codes // Copiar & Pegar.
#9

¿Saben que le hace falta a este thread para que sea de proporciones Epicas?
Spoiler
XINLEI is offline
Exc3ll@N
Veteran Member
Join Date: Oct 2009
Location: Donde me lleve el viento
Old 02-13-2012 , 23:03   Re: Temp Entity Codes // Copiar & Pegar.
#10

no es por querer desvirtuar ni nada , pero que dice en el espoiler xinlei , tus comentarios siempre son interesantes ;D
__________________
Haz lo que sientas y te haga feliz.
Exc3ll@N is offline
Send a message via MSN to Exc3ll@N
 



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 20:59.


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