ImMatt Posted June 9, 2015 Share Posted June 9, 2015 (edited) This is what I'd thing would work but its giving me an error saying argument #2 is 'string', number expected but the native is saying it should be a string so I'm confused. Native: SET_PED_INTO_VEHICLE(Ped ped, Vehicle vehicle, int seatIndex) Code: local Taxi = {} Taxi_key = 84 local veh = "cavalcade2" function Taxi.tick() local playerPed = PLAYER.PLAYER_PED_ID() local player = PLAYER.GET_PLAYER_PED(playerPed) local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed) local lookDir = ENTITY.GET_ENTITY_HEADING(playerPed) if(playerExists) then if(get_key_pressed(Taxi_key)) then local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 6.0, 0.0) local modelHash = GAMEPLAY.GET_HASH_KEY(veh) wait(20) STREAMING.REQUEST_MODEL(modelHash) local taxi = VEHICLE.CREATE_VEHICLE(modelHash, coords.x, coords.y, coords.z, lookDir, false, true) VEHICLE.SET_VEHICLE_DOOR_OPEN(taxi, 0, false, true) ENTITY.SET_ENTITY_INVINCIBLE(taxi, true) wait(200) end end --#######PROBLEM HERE########## local ped = PED.CREATE_PED(26, 0x3AE4A33B, 0, 0, 0, lookDir, false, true) PED.SET_PED_INTO_VEHICLE(ped, veh, -1) --############################### end end return Taxi Edited June 9, 2015 by ImMatt Link to comment Share on other sites More sharing options...
Jitnaught Posted June 9, 2015 Share Posted June 9, 2015 PED.SET_PED_INTO_VEHICLE(ped, taxi, -1) Link to comment Share on other sites More sharing options...
ImMatt Posted June 9, 2015 Author Share Posted June 9, 2015 PED.SET_PED_INTO_VEHICLE(ped, taxi, -1) Still getting error, Its saying 'SET_PED_INTO_VEHICLE'. argument #2 is 'string'; 'number' expected. but the native calls for a string Link to comment Share on other sites More sharing options...
Jitnaught Posted June 9, 2015 Share Posted June 9, 2015 (edited) I does not use a string. The error says that it wants the vehicle handle, which is an integer, not a string. Edited June 9, 2015 by LetsPlayOrDy Link to comment Share on other sites More sharing options...
ImMatt Posted June 10, 2015 Author Share Posted June 10, 2015 (edited) So how would I fix this, cause using veh and taxi both don't work Edited June 10, 2015 by ImMatt Link to comment Share on other sites More sharing options...
ffzero58 Posted June 10, 2015 Share Posted June 10, 2015 (edited) You need the latest LUA hook which compiles every 10 minutes using the latest natives.h DB definitions. https://github.com/gallexme/LuaPlugin-GTAV/commits/master EDIT:I should add that the error you see is normally indicative of a native using the Any type for its params. Edited June 10, 2015 by ffzero58 Link to comment Share on other sites More sharing options...
ImMatt Posted June 10, 2015 Author Share Posted June 10, 2015 You need the latest LUA hook which compiles every 10 minutes using the latest natives.h DB definitions. https://github.com/gallexme/LuaPlugin-GTAV/commits/master EDIT: I should add that the error you see is normally indicative of a native using the Any type for its params. Still not working, now it just says argument #2 is 'nil'; 'number' expected Link to comment Share on other sites More sharing options...
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