FlorjanMTARP Posted August 18, 2014 Posted August 18, 2014 I was wondering for the past few days, how to make a GUI show up when you right click a ped? Are there any resources samples? Sincerely, Florjan. A complete new RP server is being developed from scratch! http://www.mta-roleplay.com
Saml1er Posted August 18, 2014 Posted August 18, 2014 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 )
FlorjanMTARP Posted August 18, 2014 Author Posted August 18, 2014 Saml1er thank you but do I have to create the ped firstly? A complete new RP server is being developed from scratch! http://www.mta-roleplay.com
Castillo Posted August 18, 2014 Posted August 18, 2014 Well, if you want it to work when you click a ped, you obviously need to create one. That script will also show the GUI when you click ANY ped. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
FlorjanMTARP Posted August 18, 2014 Author Posted August 18, 2014 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. A complete new RP server is being developed from scratch! http://www.mta-roleplay.com
Castillo Posted August 18, 2014 Posted August 18, 2014 This only works with peds, not players. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
tosfera Posted August 18, 2014 Posted August 18, 2014 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. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
FlorjanMTARP Posted August 18, 2014 Author Posted August 18, 2014 I know tosfera and thanks Solidsnake. Tosfera I made some cool scripts already and I want to work better from now. Thanks giuseppe. A complete new RP server is being developed from scratch! http://www.mta-roleplay.com
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now