Jump to content

[HELP] GUI via Ped


Recommended Posts

  
local t_button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) 
         guiSetVisible ( t_button, false ) --- No point for this function if this is set to true  
  
addEventHandler ( "onClientClick", getRootElement(),  
function ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) 
  
        if button == "left" and state == "up" and  clickedElement  then 
if getElementType(  clickedElement ) ~= "ped" then return end  
                guiSetVisible ( t_button, true )  
        end 
end 
 ) 

Link to comment
Thank you Solidsnake, I appreciate yourhelp. AND ALSO Thanks Saml1er.

EDIT)

It does nothing ingame when I use LMB or RMB on another player. I've set it clientsided.

You're trying to create a Roleplay script without knowing basic things like this ...? Maybe it's a good thing to get to know the basics before you take a big step and move to a RP script.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...