Zahl Posted October 4, 2009 Posted October 4, 2009 Well as I am a fan of learning by doing, I thought I should try to add some (mostly useless) features to existing resources instead of immediately trying to create a new game mode. So one simple idea I had was to add some passengers to every vehicle in the race resource, but apparently this doesn't work. Below the line vehicle = createVehicle(spawnpoint.vehicle, x, y, z, 0, 0, spawnpoint.rotation, #nick <= 8 and nick or nick:sub(1, 8)) in race_server.lua, I added: local ped = createPed(9, x + 2, y + 2, z + 1) warpPedIntoVehicle(ped, vehicle, 1) The ped gets created, but it stays outside the vehicle, the function returns false. ... So what's wrong here?
50p Posted October 4, 2009 Posted October 4, 2009 Do you get any errors/warnings? Maybe try to warp the ped with a timer. setTimer( warpPedIntoVehicle, 100, 1, ped, vehicle, 1 );
Zahl Posted October 4, 2009 Author Posted October 4, 2009 OK finally I found the cause In util_server.lua the warpPedIntoVehicle() function gets redefined, and this version does not support peds and seats... Simple reason, long time to find it
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