Jump to content

help with getElementPosition


MajdMTA

Recommended Posts

function buttonPick() 
    if source == Button_VS_sn then 
        if isPedInVehicle(localPlayer) then 
           local v = getPedOccupiedVehicle(localPlayer) 
           local x, y, z = getElementPosition(v) 
           local vehicleZoneName = getZoneName(x, y, z) 
           guiSetText(label_Zone, "", tostring(vehicleZoneName)) 
        end 
    end 
end 
addEventHandler("onClientGUIClick", guiRaoot, buttonPick) 

Link to comment
function buttonPick() 
    if source == Button_VS_sn then 
        if isPedInVehicle(localPlayer) then 
           local v = getPedOccupiedVehicle(localPlayer) 
           local x, y, z = getElementPosition(v) 
           local vehicleZoneName = getZoneName(x, y, z) 
           guiSetText(label_Zone, "", tostring(vehicleZoneName)) 
        end 
    end 
end 
addEventHandler("onClientGUIClick", guiRaoot, buttonPick) 

Guys, none of this codes worked.. you can lock it.

Link to comment
What I don't understand:

You want to get the zonename of the vehicle you are sitting in ... why?!

The zonename will be the same as the zonename of the localPlayer. Still don't understand what you are even trying.

When i pick it... IT will be in Hospital for example okay? and if i'm in different place? think about that.

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...