Absence2 Posted March 6, 2012 Share Posted March 6, 2012 How do I make a GUI window open when I right click on a Ped? all I got is this: local laura = createPed( 211, 1488.5498046875, 1305.8798828125, 1093.2963867188, 275 ) setElementDimension( laura, 0 ) setElementData( laura, "name", "Laura Fredriksen" ) setPedAnimation ( laura, "DEALER", "DEALER_IDLE_01", -1, true, false, false ) setElementFrozen(laura, true) I don't know how to go further , couldn't find much on wiki either Link to comment
Kenix Posted March 6, 2012 Share Posted March 6, 2012 (edited) Server: https://wiki.multitheftauto.com/wiki/OnElementClicked Client: https://wiki.multitheftauto.com/wiki/OnClientClick Also viewtopic.php?f=91&t=40750&p=413548#p413548 Vehicle deleter. Edited March 6, 2012 by Guest Link to comment
Castillo Posted March 6, 2012 Share Posted March 6, 2012 You should learn to use the 'search' feature, this question has been asked before. viewtopic.php?f=91&t=35564&p=373950&hilit=onClientClick function onPedClick(button, state, absX, absY, wx, wy, wz, element) if (element and getElementType(element) == "ped" and state=="down") then local x, y, z = getElementPosition(localPlayer) if (getDistanceBetweenPoints3D(x, y, z, wx, wy, wz) <=3) then guiSetVisible(myGUIElement, true) end end end addEventHandler("onClientClick", getRootElement(), onPedClick) Link to comment
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