Chaz-CR Posted August 10, 2013 Posted August 10, 2013 Hi well, i've been trying to change a command handler whit a timer but i couldn't. I'd like you guys help me cuz i dont know how to do this line works thanks! Here is the code! function saveAllVehiclesAlternative () local file = fileCreate( "vehicles.xml" ) local vs = 0 local prec = getTickCount() fileWrite( file, "\n" ) for k, i in ipairs ( getElementsByType( "vehicle" ) ) do if allVehicles[i] then local x, y, z = getElementPosition( i ) local ar, ag, ab, br, bg, bb, cr, cg, cb, dr, dg, db = getVehicleColor( i, true ) fileWrite( file, " \""..allVehicles[i].."\" model=\""..getElementModel( i ).."\" pos=\""..toJSON({x, y, z}).."\" color=\""..toJSON({ar, ag, ab, br, bg, bb, cr, cg, cb, dr, dg, db}).."\" paintjob=\""..getVehiclePaintjob(i).."\" upgrades=\""..toJSON( getVehicleUpgrades(i) ).."\" interior=\""..getElementInterior(i).."\" dimension=\""..getElementDimension(i).."\" /> \n" ) vs = vs + 1 end end fileWrite( file, " \n" ) fileClose( file ) outputDebugString( vs.." vehiculos guardados en "..getTickCount()-prec.." ms", 3 ) end addCommandHandler( "preguard", saveAllVehiclesAlternative ) ||Age Of Battles|WarLife|RPG|DM|FR|24/7|Custom Skins|Cars|Weapons|| http://facebook.com/AoBMTA - Fanpage
Castillo Posted August 10, 2013 Posted August 10, 2013 Just do: setTimer ( saveAllVehiclesAlternative, 60000, 0 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Chaz-CR Posted August 10, 2013 Author Posted August 10, 2013 Thanks Solid. Offtopic: Where can i contact you for something about a resource? ||Age Of Battles|WarLife|RPG|DM|FR|24/7|Custom Skins|Cars|Weapons|| http://facebook.com/AoBMTA - Fanpage
tosfera Posted August 10, 2013 Posted August 10, 2013 You can either PM him on the forums, or talk to him on skype. (Hard to reach him there I tell ya!) If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
Chaz-CR Posted August 10, 2013 Author Posted August 10, 2013 lmao, k thanks for you respond! ||Age Of Battles|WarLife|RPG|DM|FR|24/7|Custom Skins|Cars|Weapons|| http://facebook.com/AoBMTA - Fanpage
Castillo Posted August 10, 2013 Posted August 10, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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