Chaky Posted July 6, 2014 Posted July 6, 2014 ya busque y solo encuentro el script de los autos explotados si alguien me ayudara se lo agradeceria ya sea dandome el link del script o diciendome como hacerlo me urge para un server de zombies gracias
alex17 Posted July 6, 2014 Posted July 6, 2014 function respawnVehicles() outputChatBox("#FFFF00*Reiniciando vehiculos vacios en 30s *", root, 255, 255, 255, true) outputChatBox("#0040FF*Respawning All Empty Vehicles in 30s *", root, 255, 255, 255, true) setTimer(function () local vehicles = getElementsByType ( "vehicle" ) outputChatBox("#0EF629*Vehiculos vacios han sido reiniciados*", root, 255, 255, 255, true) outputChatBox("#00ccFf*Empty Vehicles has been respawned*", root, 255, 255, 255, true) for k, vehicle in ipairs ( vehicles ) do if isEmpty( vehicle ) then respawnVehicle ( vehicle ) end end end, 30000, 1) -- edita el tiempo en el qe se respawnean los autos end setTimer(respawnVehicles, 1000000, 0)-- edita el tiempo de diferencia entre cada respawn. Suerte function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if (type( passengers ) == 'number') then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end
UserToDelete Posted July 7, 2014 Posted July 7, 2014 (edited) Version con variantes, solo he añadido un poco de aritmetica Tiempo_de_aviso = 30 -- En segundos Tiempo_de_respawn = 10 -- En minutos function respawnVehicles() outputChatBox("#FFFF00*Reiniciando vehiculos vacios en 30s *", root, 255, 255, 255, true) outputChatBox("#0040FF*Respawning All Empty Vehicles in 30s *", root, 255, 255, 255, true) setTimer(function () local vehicles = getElementsByType ( "vehicle" ) outputChatBox("#0EF629*Vehiculos vacios han sido reiniciados*", root, 255, 255, 255, true) outputChatBox("#00ccFf*Empty Vehicles has been respawned*", root, 255, 255, 255, true) for k, vehicle in ipairs ( vehicles ) do if isEmpty( vehicle ) then respawnVehicle ( vehicle ) end end end, (Tiempo_de_aviso * 1000), 1) end setTimer(respawnVehicles, (Tiempo_de_respawn * 60000), 0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if (type( passengers ) == 'number') then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end -- Creditos a Alex YouTube video de este post: Edited July 8, 2014 by Guest
Chaky Posted July 8, 2014 Author Posted July 8, 2014 function respawnVehicles() outputChatBox("#FFFF00*Reiniciando vehiculos vacios en 30s *", root, 255, 255, 255, true) outputChatBox("#0040FF*Respawning All Empty Vehicles in 30s *", root, 255, 255, 255, true) setTimer(function () local vehicles = getElementsByType ( "vehicle" ) outputChatBox("#0EF629*Vehiculos vacios han sido reiniciados*", root, 255, 255, 255, true) outputChatBox("#00ccFf*Empty Vehicles has been respawned*", root, 255, 255, 255, true) for k, vehicle in ipairs ( vehicles ) do if isEmpty( vehicle ) then respawnVehicle ( vehicle ) end end end, 30000, 1) -- edita el tiempo en el qe se respawnean los autos end setTimer(respawnVehicles, 1000000, 0)-- edita el tiempo de diferencia entre cada respawn. Suerte function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if (type( passengers ) == 'number') then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end okay pero esto lo pongo en el Lua ?
UserToDelete Posted July 8, 2014 Posted July 8, 2014 Usas la version complicada del script, cuando la version simple es la mia; Si, eso va en el lua, es obvio, no?
alex17 Posted July 8, 2014 Posted July 8, 2014 no entendi eso si va en lua ? a que te refieres si es por si es lado client o server es del lado server y te recomiendo el script de venad ya que esta mejor echo y es mas facil de utilizar
UserToDelete Posted July 9, 2014 Posted July 9, 2014 no entendi eso si va en lua ? a que te refieressi es por si es lado client o server es del lado server y te recomiendo el script de venad ya que esta mejor echo y es mas facil de utilizar Se me da bien colocar variantes en scripts
Chaky Posted July 10, 2014 Author Posted July 10, 2014 bueno es que siempre que lo hago me sale en verde el cuadro o rectangulo quiero saber como hacerlo rojo blanco amarillo rosa o cualquier otro color gracias
Recommended Posts