Hassam Posted July 29, 2013 Share Posted July 29, 2013 Hello, I'm posting here because i can't spawn one car, look at this vehicle = {} function SpawnVehicle(vid, vx, vy, vz, rotation, r, g, b, r2, g2, b2) if (isElement(vehicle[client])) then destroyElement(vehicle[client]) end vehicle[client] = createVehicle(vid, vx, vy, vz, 0, 0, rotation) if (vehicle[client]) then setVehicleColor(vehicle[client], r, g, b, r2, g2, b2) end warpPedIntoVehicle(client, vehicle[client]) setElementData(vehicle[client], "jobvehicle", true) end addEvent("SpawnVehicle", true) addEventHandler("SpawnVehicle", root, SpawnVehicle) [2013-07-30 00:58:14] WARNING: Spawners\server.lua:69: Bad argument @ 'warpPedIntoVehicle'[2013-07-30 00:58:14] WARNING: Spawners\server.lua:70: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean] Link to comment
DNL291 Posted July 30, 2013 Share Posted July 30, 2013 Make sure you're triggering the event with the correct arguments and try using source instead of client. Link to comment
Hassam Posted July 30, 2013 Author Share Posted July 30, 2013 Make sure you're triggering the event with the correct arguments and try using source instead of client. Yes, but I found the problems, anyways, thanks for help 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