iiv03 Posted February 6, 2021 Share Posted February 6, 2021 (edited) hello I would like to know how should I check if ped while inside a car and touched marker and then something happens? I used these functions in the client side because at beginning i put it if the player touched the marker and then do movement Vehicle Ped, and now I would like to know how to check if the ped hit marker something happens? createPed createVehicle warpPedIntoVehicle setPedAnalogControlState client side: teleport_part = createMarker(-757.400390625, 109.099609375, 41.400001525879,"corona",4,0,0,0,0) function parts() pedveh1 = createPed(0,0,0,0,0) warpPedIntoVehicle(pedveh1,botvehicle1) setPedAnalogControlState(pedveh1, "accelerate", 1) pedveh2 = createPed(0,0,0,0,0) warpPedIntoVehicle(pedveh2,botvehicle2) setPedAnalogControlState(pedveh2, "accelerate", 1) pedveh3 = createPed(0,0,0,0,0) warpPedIntoVehicle(pedveh3,botvehicle3) setPedAnalogControlState(pedveh3, "accelerate", 1) pedveh4 = createPed(0,0,0,0,0) warpPedIntoVehicle(pedveh4,botvehicle4) setPedAnalogControlState(pedveh4, "accelerate", 1) end addEventHandler ( "onClientMarkerHit", teleport_part, parts) do i need to use event "onMarkerHit"? + function "getPedOccupiedVehicle"? in server side how do I know vehicles in getPedOccupiedVehicle because I put them on a client side path. do I need to use the triggerClientEvent, how i do way? Edited February 6, 2021 by xFabel add my line Link to comment
Furzy Posted February 6, 2021 Share Posted February 6, 2021 if getElementType ( yourPed ) == "ped" then Use this to check if the element is a ped. Link to comment
iiv03 Posted February 6, 2021 Author Share Posted February 6, 2021 (edited) 2 hours ago, Furzy said: if getElementType ( yourPed ) == "ped" then Use this to check if the element is a ped. i know but have u see my question down? tried it on onClientMarkerHit nothing happen does it mean only works with onMarkerHit? Edited February 6, 2021 by xFabel Link to comment
Furzy Posted February 6, 2021 Share Posted February 6, 2021 3 minutes ago, xFabel said: i know but have u see my question down? tried it on onClientMarkerHit nothing happen does it mean only works with onMarkerHit? Yeah, if u read the wiki you'll see that onClientMarkerHit is for players not element at all Link to comment
iiv03 Posted February 6, 2021 Author Share Posted February 6, 2021 Just now, Furzy said: Yeah, if u read the wiki you'll see that onClientMarkerHit is for players not element at all I switched everything on the server side, but is there function to let ped move a car ? such as setPedAnalogControlState :(( Link to comment
Furzy Posted February 6, 2021 Share Posted February 6, 2021 4 minutes ago, xFabel said: I switched everything on the server side, but is there function to let ped move a car ? such as setPedAnalogControlState :(( You can use triggers or create an ElementData in server side to check if peds hit marker and then start the client side function. 1 Link to comment
iiv03 Posted February 6, 2021 Author Share Posted February 6, 2021 16 minutes ago, Furzy said: You can use triggers or create an ElementData in server side to check if peds hit marker and then start the client side function. tysm. i got it 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