AlliedModders

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

swapped 05-19-2014 02:51

Traceline help
 
Hello dear members, i finded this tutorial on alliedmods, i wanna check when i hit TE_BEAMPOINTS a player take damage

Here is the 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()


}

So, i wanna you help me use this tutorial for create a damage to my te beampoints plugin.
( i dont have no idea how to use it )

Arkshine 05-19-2014 03:10

Re: Traceline help
 
It's a tutorial with example, so read it and don't create thread right away. You obviously did not read it, nor tried things. If I'm wrong, you should post what you tried.

swapped 05-19-2014 03:27

Re: Traceline help
 
I dont try nothing, i read this tutorial 10 times and sincely i dont understand absolute nothing, how can help this tutorial my :(


Sorry but im realy confuse i need you to explain me detalied please

ezio_auditore 05-21-2014 09:10

Re: Traceline help
 
what you want...
damage player when hit the 'sprite'?!

swapped 05-22-2014 02:06

Re: Traceline help
 
Quote:

Originally Posted by ezio_auditore (Post 2140699)
what you want...
damage player when hit the 'sprite'?!

yes

ezio_auditore 05-23-2014 11:59

Re: Traceline help
 
well techincally, i don't think that 'sprite' takes damage... (I don't think we can hook Ham_TakeDamage with the entity coz it never takes damage. As far as i know.)
Good coders like ConnorMcLeod or Arkshine may help :D

swapped 05-24-2014 02:15

Re: Traceline help
 
Quote:

well techincally, i don't think that 'sprite' takes damage
no shit ?

Quote:

... (I don't think we can hook Ham_TakeDamage with the entity coz it never takes damage. As far as i know.)
As like everyone know.

Quote:

Good coders like ConnorMcLeod or Arkshine may help :D
And bailopan why not ?

SpeeDeeR 05-24-2014 04:13

Re: Traceline help
 
You can use the code from Nades Mode
Quote:

Originally Posted by ot_207
Trip laser: This is the most complex mode. Throw this at the wall or ceiling, and it will take some time before it will activate.After it activates it will draw a laser. If anyone should blunder into the detection path, the grenade will launch itself in the direction of the victim


ezio_auditore 05-24-2014 08:43

Re: Traceline help
 
Quote:

Originally Posted by SpeeDeeR (Post 2141795)
You can use the code from Nades Mode

I guess in this plugin a touch is registered with that sprite's entity name

DavidJr 05-24-2014 21:27

Re: Traceline help
 
No, you cannot detect TE_BEAMPOINTS. But if you want to detect it, you may try to make an entity and set the sprites model, set the the solidity to SOLID_BBOX and you can detect it in TraceAttack/TakeDamage.


All times are GMT -4. The time now is 18:07.

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