Carbonik Posted October 26, 2011 Share Posted October 26, 2011 How to use client variable in server side? for example; client side: myped = createPed(120, x,y,z) and how i can use myped variable in server side? i want to set myped variable in server side server side: warpPedIntoVehicle(myped, somevehicle) Link to comment
qaisjp Posted October 26, 2011 Share Posted October 26, 2011 client: function warpPedIntoVehicle(ped, veh) triggerServerEvent("warpPedIntoVehicle", root, ped,veh) end addCommandHandler("ped", function() myped = createPed(120,x,y,z) warpPedIntoVehicle(myped, getPedOccupiedVehicle()) end) server: addEvent("warpPedIntoVehicle", true) addEventHandler("warpPedIntoVehicle", root, function(ped,veh) warpPedIntoVehicle(ped,veh) end) Call warpPedIntoVehicle client side. 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