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

message_begin() - help me learn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 05-13-2014 , 04:41   message_begin() - help me learn
Reply With Quote #1

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
swapped is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-13-2014 , 05:16   Re: message_begin() - help me learn
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=49828
__________________
Arkshine is offline
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 05-13-2014 , 11:38   Re: message_begin() - help me learn
Reply With Quote #3

i will try something and come back.
swapped is offline
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 05-19-2014 , 02:16   Re: message_begin() - help me learn
Reply With Quote #4

So im back, i made this code with some help from internet

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() }
swapped is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-19-2014 , 02:36   Re: message_begin() - help me learn
Reply With Quote #5

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.
__________________
Arkshine 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 08:31.


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