Raised This Month: $ Target: $400
 0% 

Sort of get player location


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-02-2014 , 16:52   Sort of get player location
Reply With Quote #1

Well, i am using lasermines plugin. I made it doesnt shows laser when someone is acrossing the laser.
But i would like it to show the laser untill touch the body that is blocking it.
It has this to get end of laser location:
PHP Code:
pev(i_Entpev_vuser1vEnd
But i need to get player location that is touching the lasermine. How?
__________________
Jhob94 is offline
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-03-2014 , 04:34   Re: Sort of get player location
Reply With Quote #2

I am not sure but try this out ..
Register touch with the Laser entity .. and get player origin when the touch function gets called ..
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then
devilicioux is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-03-2014 , 07:13   Re: Sort of get player location
Reply With Quote #3

Quote:
Originally Posted by devilicioux View Post
I am not sure but try this out ..
Register touch with the Laser entity .. and get player origin when the touch function gets called ..
You can't do that, since temporary entities can't be touched(he talks about laser sprite, not lasermine entity on the wall).
In ltm_Think(i_Ent) forward, in this switch case
PHP Code:
case BEAMBREAK_THINK
you should find this piece of code(you could just search for it)
PHP Code:
if( fBeamthink fCurrTime && get_pcvar_num(g_LVISIBLE))
{
    
DrawLaser(i_EntvOriginvEnd );
    
set_pevi_EntLASERMINE_BEAMTHINKfCurrTime 0.1 );

and replace it with this code(not tested, I just thought of that code, but it should work if i haven't missed something)
PHP Code:
if( fBeamthink fCurrTime && get_pcvar_num(g_LVISIBLE))
{
    if(
fFraction 1.0)
        
get_tr2(0TR_vecEndPosvEnd);
                        
    
DrawLaser(i_EntvOriginvEnd );
    
set_pevi_EntLASERMINE_BEAMTHINKfCurrTime 0.1 );

klippy 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 21:11.


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