Other Languages Moderators Lord Henry Posted November 18, 2016 Author Other Languages Moderators Share Posted November 18, 2016 ERROR: idlevehicles.lua:34: table index is nil Warning: idlevehicles.lua:34: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil] function onPlayerDeathHandler(totalAmmo, killer, killerWeapon, bodypart, stealth) local thePlayer = source timers[theVehicle] = setTimer( isVehicleStatic(theVehicle) and respawnVehicle or destroyElement, 20000, 1, theVehicle )--line 34 end addEventHandler( "onPlayerWasted", root, onPlayerDeathHandler) Link to comment
LoPollo Posted November 18, 2016 Share Posted November 18, 2016 (edited) The error says all. well... don't you have an hex editor? if not you can download one like HXD and pasting the hex code in a new blank file, otherwise take the script, set the priority on high (or still above normal - default priority) to the handler of deaths, and timers[theVehicle] = setTimer( isVehicleStatic(theVehicle) and respawnVehicle or destroyElement, 20000, 1, theVehicle ) --replace to local theVehicle = pedsOccupiedVehicles[source] timers[theVehicle] = setTimer( isVehicleStatic(theVehicle) and respawnVehicle or destroyElement, 20000, 1, theVehicle ) Edited November 18, 2016 by LoPollo 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