Raised This Month: $ Target: $400
 0% 

Solved [HELP] Player Aim At Entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DarthMan
Veteran Member
Join Date: Aug 2011
Old 03-09-2017 , 13:23   Re: [HELP] Player Aim At Entity
Reply With Quote #8

Quote:
Originally Posted by Kotoamatsukami View Post
First of all, I am just trying to help here and if this still doesn't help, I am sorry.

I will explain here what I am trying to do. Firstly, catch what the 'id' is aiming, and save the aimed target into 'iEnt'. Then, I check in the while loop if the aimed index( iEnt ) is equal to the entity that the user wanted to aim( ent ). So, I check it( ent == iEnt ). If it's equal then show the HUD message that you wanted to show to the user.

I might be wrong but any improvement or rectification towards my code is greatly welcomed.
Thank you..
PHP Code:
public display_map_nameid )
{
    new 
iEntbodyentlist32 ], panel
    
    get_user_aiming
idiEntbody50 )
    
    while( ( 
ent find_ent_by_tnameent"target_map" ) ) !=)
    {
        if ( 
is_user_connectedid ) && ent == iEnt )
        {
            
set_hudmessageg_hud_colour], g_hud_colour], g_hud_colour], -1.0, -1.000.02.00.00.0)
            
show_hudmessageentlistent ], g_mapnamesg_mapselectionpanel ] ] )
        }
        
    
panel++
    }    

Sadly, it doesn't display anything
DarthMan is offline
 



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 17:46.


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