Eweest Posted July 7, 2015 Share Posted July 7, 2015 Hi guys! What's wrong here? Server: Vehicle = {} function spawnCars(modelid , carN) if (isElement(Vehicle[source])) then return end if ( modelid and carN) then local playerX,playerY,playerZ = getElementPosition(source) Vehicle[source] = createVehicle(modelid,playerX,playerY, playerZ) setElementData(source,"veh",Vehicle[source]) warpPedIntoVehicle(source,Vehicle[source]) outputChatBox("You have spawned "..tostring(carN).. " !" ,player,255,255,0) setElementData(source , "vehN" , carN) g_VehicleData[vehicle] = { creator = source, timers = {} } if not g_Trailers[modelid] then if getOption('vehicles.idleexplode') then g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) end g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) end destroyElement(vehN) outputChatBox("Your Spawner :[ " ..tostring(carN).." ] is destroyed",player,255,255,0) end end addEvent("spawn",true) addEventHandler("spawn",root,spawnCars) Link to comment
Walid Posted July 8, 2015 Share Posted July 8, 2015 destroyElement(vehN) vehN it's not defined in your code. 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