Lloyd Logan Posted January 23, 2013 Posted January 23, 2013 Hey, I want it so that when the player enters the marker it warps the Created ped into the vehicle? client pickPed = createMarker(1790.33105, -1909.81689, 13.03162, "cylinder", 1.5, 255, 0, 0) function warpit() triggerServerEvent("doIt", source, "pickPed") end addEventHandler("onClientMarkerHit", root, warpit) server createMarker(1777.95203, -1892.48059, 12.38782, "cylinder", 0.9, 255, 0, 0) taxiPed = createPed(252, 1789.95386, -1910.94507, 13.03228) taxiVeh = createVehicle(420, 1777.95203, -1892.48059, 12.38782) function pickPed() warpPedIntoVehicle( taxiPed, taxiVeh, 2) end addEvent("doIt", true) addEventHandler("doIt", root, pickPed) If it it possible, could you make it so that the ped is warped in the current vehicle the player is in? Instead of the createVeh? If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Castillo Posted January 23, 2013 Posted January 23, 2013 -- client side: pickPed = createMarker(1790.33105, -1909.81689, 13.03162, "cylinder", 1.5, 255, 0, 0) function warpit ( hitElement ) if ( hitElement == localPlayer ) then triggerServerEvent ( "doIt", localPlayer ) end end addEventHandler ( "onClientMarkerHit", root, warpit ) -- server side: createMarker(1777.95203, -1892.48059, 12.38782, "cylinder", 0.9, 255, 0, 0) taxiPed = createPed(252, 1789.95386, -1910.94507, 13.03228) taxiVeh = createVehicle(420, 1777.95203, -1892.48059, 12.38782) function pickPed ( ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then warpPedIntoVehicle ( taxiPed, vehicle, 2 ) end end addEvent ( "doIt", true ) addEventHandler ( "doIt", root, pickPed ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Lloyd Logan Posted January 23, 2013 Author Posted January 23, 2013 Thanks Alot, Castillo!! If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Castillo Posted January 23, 2013 Posted January 23, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Lloyd Logan Posted January 23, 2013 Author Posted January 23, 2013 You're welcome. Sorry, Castillo, when I hit any marker, the ped is warped into the Veh, how would i make it so that the ped is only warped when it hits that client side marker? If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Castillo Posted January 23, 2013 Posted January 23, 2013 Change: addEventHandler ( "onClientMarkerHit", root, warpit ) To: addEventHandler ( "onClientMarkerHit", pickPed, warpit ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Lloyd Logan Posted January 23, 2013 Author Posted January 23, 2013 Change: addEventHandler ( "onClientMarkerHit", root, warpit ) To: addEventHandler ( "onClientMarkerHit", pickPed, warpit ) Thank you!! Sorry about this but as a general question, how can I delete/erase a ped? If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Lloyd Logan Posted January 23, 2013 Author Posted January 23, 2013 destroyElement Thanks!! If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
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