AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   message_begin() - help me learn (https://forums.alliedmods.net/showthread.php?t=240329)

swapped 05-13-2014 04:41

message_begin() - help me learn
 
So i need someone to help me to use message_begin()

I want to create special effects, powers, etc using messages but i dont know how to do that :{

example of this message, how to complete it ?
Code:
    message_begin(MSG_ ,SVC_TEMPENTITY) //message begin     write_byte(TE_DLIGHT)     write_coord() // position ( what ? )     write_coord()     write_coord()     write_byte(1000.0) // radius in 10's // distance :D     write_byte(250.0) //colour     write_byte(0.0)     write_byte(0.0)     write_byte() // life in 10's // ( what ? )     write_byte() // decay rate in 10's // ( what ? )     message_end()

And also , how to determinate the INDEX ??

Lol is my first time when im try to learning about messages :3

Arkshine 05-13-2014 05:16

Re: message_begin() - help me learn
 
https://forums.alliedmods.net/showthread.php?t=49828

swapped 05-13-2014 11:38

Re: message_begin() - help me learn
 
i will try something and come back.

swapped 05-19-2014 02:16

Re: message_begin() - help me learn
 
So im back, i made this code with some help from internet :twisted:

But i wanna when player is hited with this LASER take damage.

Code:
Code:
#include <amxmodx> new g_Beam; public plugin_init( ) {     register_clcmd( "test", "pTest" ); }   public plugin_precache() {     g_Beam = precache_model( "sprites/zerogxplode4.spr" ); } public pTest( id ) {             new I_player_origin[ 3 ], I_end_origin[ 3 ];             get_user_origin( id, I_player_origin, 1 );             get_user_origin( id, I_end_origin, 3 );             message_begin( MSG_BROADCAST, SVC_TEMPENTITY )             write_byte( 0 )                     write_coord(I_player_origin[ 0 ] )               write_coord(I_player_origin[ 1 ] )             write_coord(I_player_origin[ 2 ] )             write_coord(I_end_origin[ 0 ] )               write_coord(I_end_origin[ 1 ] )             write_coord(I_end_origin[ 2 ] )             write_short( g_Beam )             write_byte( 1 )             write_byte( 1 )               write_byte( 2 )                 write_byte( 40 )                 write_byte( 2 )               write_byte( 255 )             write_byte( 255 )             write_byte( 255 )             write_byte( 200 )                 write_byte( 0 )               message_end() }

Arkshine 05-19-2014 02:36

Re: message_begin() - help me learn
 
You would need to play with TraceLine, and checking if you hit something. There is tutorial about it. Unrelated to message, so if you have some issue make a new thread.


All times are GMT -4. The time now is 09:40.

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