micheal1230 Posted January 17, 2012 Share Posted January 17, 2012 How do I make a npc spawn and when u click on him/her a GUI comes up that u can buy from Link to comment
Castillo Posted January 17, 2012 Share Posted January 17, 2012 -- client side: myPed = createPed(0, 0, 0, 3) 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 (element == myPed) then if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3 then guiSetVisible(myGUIWindow, true) end end end end addEventHandler("onClientClick", root, onPedClick) Link to comment
joedajoester Posted January 18, 2012 Share Posted January 18, 2012 Try this. https://community.multitheftauto.com/index.php?p= ... ls&id=1953 Link to comment
Castillo Posted January 18, 2012 Share Posted January 18, 2012 @joedajoester: What has that resource to do with his question? it's not what he's looking for. Link to comment
joedajoester Posted January 18, 2012 Share Posted January 18, 2012 Ooh I totally misread it even after u said that I read what he said a few times and I now understand what he meant. I feel stupid now 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