AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 If I'm right, you need to remove the player from the vehicle. addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if (source == GUIEditor_Button[1]) then local theVehicle = getPedOccupiedVehicle(localPlayer) if not theVehicle then setElementPosition (localPlayer, 1523.9138183594, 1527.1204833984, 10.2602405548 ) return end removePedFromVehicle ( localPlayer ) setElementPosition (theVehicle , 1523.9138183594, 1527.1204833984, 10.2602405548 ) warpPedIntoVehicle ( localPlayer, theVehicle) end end) no i mean when in the car i click the button my car go this Position but car fly and blow why? Link to comment
12p Posted November 24, 2011 Share Posted November 24, 2011 That's another script, dude. Link to comment
AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 That's another script, dude. ???????????????????????? Link to comment
CapY Posted November 24, 2011 Share Posted November 24, 2011 That's another script, dude. He wants to say that's another script, not this one. DUDE. Link to comment
AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 That's another script, dude. He wants to say that's another script, not this one. DUDE. this not another script any help?? Link to comment
AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 --This function is executed when the button is clicked - it warps the local player. local function onTeleportButtonClicked() if (source == GUIEditor_Button[1]) then local localVehicle = getPedOccupiedVehicle(localPlayer) if localVehicle then if getVehicleController(localVehicle) == localPlayer then --IF the player is driving a vehicle, warp the vehicle. setElementPosition(localVehicle, 1523.9138183594, 1527.1204833984, 10.2602405548) end else setElementPosition(localPlayer, 1523.9138183594, 1527.1204833984, 10.2602405548) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], onTeleportButtonClicked, false) Solidsnake14 this not work please help me Link to comment
Castillo Posted November 24, 2011 Share Posted November 24, 2011 --This function is executed when the button is clicked - it warps the local player. local function onTeleportButtonClicked() local localVehicle = getPedOccupiedVehicle(localPlayer) if localVehicle then if getVehicleController(localVehicle) == localPlayer then --IF the player is driving a vehicle, warp the vehicle. setElementPosition(localVehicle, 1523.9138183594, 1527.1204833984, 10.2602405548) end else setElementPosition(localPlayer, 1523.9138183594, 1527.1204833984, 10.2602405548) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], onTeleportButtonClicked, false) Link to comment
AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 --This function is executed when the button is clicked - it warps the local player. local function onTeleportButtonClicked() local localVehicle = getPedOccupiedVehicle(localPlayer) if localVehicle then if getVehicleController(localVehicle) == localPlayer then --IF the player is driving a vehicle, warp the vehicle. setElementPosition(localVehicle, 1523.9138183594, 1527.1204833984, 10.2602405548) end else setElementPosition(localPlayer, 1523.9138183594, 1527.1204833984, 10.2602405548) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], onTeleportButtonClicked, false) what about if (source == GUIEditor_Button[1]) ? Link to comment
JR10 Posted November 24, 2011 Share Posted November 24, 2011 He already specified the attachedTo element to GUIEditor_Button[1]. Link to comment
Castillo Posted November 24, 2011 Share Posted November 24, 2011 That is not required, the event handler is binded to that button now. Link to comment
AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 That is not required, the event handler is binded to that button now. its work thank you but when in the Vehicle and click button this picture 1 2 why????? Link to comment
Castillo Posted November 24, 2011 Share Posted November 24, 2011 I have no idea, it worked fine in my server. Link to comment
AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 I have no idea, it worked fine in my server. its work fine when player out the Vehicle but when in the Vehicle the Vehicle fly and blow any one help me Link to comment
12p Posted November 24, 2011 Share Posted November 24, 2011 THAT IS ANOTHER SCRIPT YOU GOT, ANDRE! WHY CANT YOU UNDERSTAND IT? Link to comment
AnDReJ98 Posted November 24, 2011 Author Share Posted November 24, 2011 THAT IS ANOTHER SCRIPT YOU GOT, ANDRE! WHY CANT YOU UNDERSTAND IT? what talking about? Link to comment
12p Posted November 24, 2011 Share Posted November 24, 2011 This teleport script castillo gave you CANNOT MAKE THAT! That error is related to another script you were running at the time. Link to comment
AnDReJ98 Posted November 25, 2011 Author Share Posted November 25, 2011 This teleport script castillo gave you CANNOT MAKE THAT!That error is related to another script you were running at the time. thanks you so much Link to comment
adward Posted November 25, 2011 Share Posted November 25, 2011 That is not required, the event handler is binded to that button now. its work thank you but when in the Vehicle and click button this picture 1 2 why????? use setElementRotation 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