Roubeen Posted February 15, 2015 Share Posted February 15, 2015 Hola a todos, hoy vengo a pedir ayuda con un problema que me surgió, ayer en mi server, y la verdad nose que lo produjo, pero creo que es un script que descargue, empiezo del principio, Yo ayer modifique el modo play para que no hayan vehículos cuando se inicie el mapa y saque los puntos de spawn, los saque borrando el archivo broph.lua, este lo borre del meta también, esto no me surgió problema o nose si es la causa porque, al borrar los puntos de spawn tuve que descargar un script para que cuando alguien muera aparezca en el hospital mas cercano, se llama dieselhp acá el link: https://community.multitheftauto.com/ind ... ls&id=9684 y yo creo que aqui esta el problema que cuando alguien muere y respawnea las municiones que tenga se duplican, intente modificar el script pero no logro encontrar la solución para evitar la duplicación de munición, Espero que puedan ayudarme y GRACIAS. Link to comment
Castillo Posted February 15, 2015 Share Posted February 15, 2015 Supongo que vos ya tenias un script que guardaba las armas del jugador, y este script que descargaste tiene tambien esto, por lo que que hace que las armas se dupliquen. Link to comment
Roubeen Posted February 15, 2015 Author Share Posted February 15, 2015 Tengo el save_system, ¿Crees que ese puede ser el script que interfiere? Link to comment
Castillo Posted February 15, 2015 Share Posted February 15, 2015 Obvio, ya que tenes dos sistemas de guardado de armas, lo unico que tenes que hacer, es quitar uno, te diria que le quites el que tiene el recurso de hospitales. Link to comment
Roubeen Posted February 15, 2015 Author Share Posted February 15, 2015 Bueno cambie el dieselhp por otro script parecido, pero que no guarda armas, y resulta que respawneo sin armas ahora .... Link to comment
Calculador Posted February 15, 2015 Share Posted February 15, 2015 Bueno cambie el dieselhp por otro script parecido, pero que no guarda armas, y resulta que respawneo sin armas ahora .... No todos los scripts guardan las armas al morir, es decir necesitas uno que únicamente te guarde las armas cuando mueres, no simplemente cuando sales del juego. Link to comment
Roubeen Posted February 15, 2015 Author Share Posted February 15, 2015 El único problema del dieselhp, es que me duplica la munición, de hecho ahora no solo la duplica, es decir, de una deagle de 73-7 muero y ahora son 263-7, por favor si alguien podría ver ese script y fijarse que se puede cambiar para que no haga mas eso, si es que sirve acá una lista de los script que tengo, por si el save_system no es el que produce el problema. "admin" startup="1" protected="0" /> "defaultstats" startup="1" protected="0" /> "helpmanager" startup="1" protected="0" /> "joinquit" startup="1" protected="0" /> "mapcycler" startup="1" protected="0" /> "mapmanager" startup="1" protected="0" /> "parachute" startup="1" protected="0" /> "performancebrowser" startup="1" protected="0" /> "resourcebrowser" startup="1" protected="1" default="true" /> "resourcemanager" startup="1" protected="1" /> "spawnmanager" startup="1" protected="0" /> "voice" startup="1" protected="0" /> "votemanager" startup="1" protected="0" /> "webadmin" startup="1" protected="0" /> "login_panel" startup="1" protected="0" /> "glue" startup="1" protected="0" /> "save_system" startup="1" protected="0" /> "vehiclehud" startup="1" protected="0" /> "house_system" startup="1" protected="0" /> "fbi" startup="1" protected="0" /> "swat" startup="1" protected="0" /> "keegansoldier" startup="1" protected="0" /> "thamskin" startup="1" protected="0" /> "militar" startup="1" protected="0" /> "marine" startup="1" protected="0" /> "piloto" startup="1" protected="0" /> "ak47" startup="1" protected="0" /> "ftapanel" startup="1" protected="0" /> "gatemaker" startup="1" protected="0" /> "WeaSki" startup="1" protected="0" /> "swatrope2" startup="1" protected="0" /> "water_level" startup="1" protected="0" /> "AutoPuertaMTA" startup="1" protected="0" /> "location(getpos)" startup="1" protected="0" /> "gtaonline-eliminado" startup="1" protected="0" /> "killmessages_editados" startup="1" protected="0" /> "killmoney" startup="1" protected="0" /> "Scoreboard" startup="1" protected="0" /> "interiors" startup="1" protected="0" /> "anti-bounce" startup="1" protected="0" /> "nametag1" startup="1" protected="0" /> "Musica" startup="1" protected="0" /> "msjbienvenida" startup="1" protected="0" /> "patriot" startup="1" protected="0" /> "cargobob" startup="1" protected="0" /> "M44" startup="1" protected="0" /> "carsystem" startup="1" protected="0" /> "skinshop" startup="1" protected="0" /> "ammunationbysoul" startup="1" protected="0" /> "cortexts" startup="1" protected="0" /> "bankrob" startup="1" protected="0" /> "liquor_store" startup="1" protected="0" /> "figth_shop" startup="1" protected="0" /> "tuneshop" startup="1" protected="0" /> "vehicle_save_load" startup="1" protected="0" /> "Paises" startup="1" protected="0" /> "02vehicledamageshader" startup="1" protected="0" /> "blowingbullets" startup="1" protected="0" /> "dieselhp" startup="1" protected="0" /> "staffpanel" startup="1" protected="0" /> "playerblips" startup="1" protected="0" /> Gracias de antemano Link to comment
UserToDelete Posted February 15, 2015 Share Posted February 15, 2015 Y el codigo de ellos? Link to comment
Roubeen Posted February 15, 2015 Author Share Posted February 15, 2015 Puse todos los recursos que uso por si conocen alguno que pueda causar el problema acá dejo el start.lua del dieselhp cache = {} function saveProperty() local name = getPlayerName(source) -- Get the name if isPedDead(source) then -- Checks if the player is dead. cache[name] = { weapons = false } -- Reset the cache local weaponsTable = {} -- Create a empty table for i=0, 0 do -- Loop the stuff if(getPedWeapon(source, i) ~= 0 and getPedTotalAmmo(source, i) > 0) then table.insert(weaponsTable, getPedWeapon(source, i) .. "." .. getPedTotalAmmo(source, i)) -- Insert into the empty table end end cache[name].weapons = weaponsTable -- Put the empty table in the Cache. else cache[name] = { weapons = false } -- If not then just empty the cache end end addEventHandler("onPlayerWasted", getRootElement(), saveProperty) function loadProperty() local name = getPlayerName(source) -- Get his name if cache[name] and cache[name].weapons then -- Check if there is a cache if cache[name].weapons ~= false then -- Double check local weps = cache[name].weapons for i, node in ipairs(weps) do -- Loop the table local wepinfo = split(node, ".") -- Split the string local wepid = wepinfo[1] local wepammo = wepinfo[2] --setTimer(giveWeapon, i*1000, 1, source, wepid, wepammo ) -- Used for testing giveWeapon ( source, wepid, wepammo ) -- gives the weapon end end end end addEventHandler("onPlayerSpawn", getRootElement(), loadProperty) addEventHandler( "onPlayerWasted", getRootElement( ), function() local x,y,z = getElementPosition(source) if x >= 0 then if y > 590 then setTimer( spawnPlayer, 1000, 1, source, 1606.81115,1821.92810,10.82031 ) elseif y > -400 then setTimer(spawnPlayer, 1000, 1, source, 1243.521,330.7334,19.55469) elseif x >= 1606 then setTimer( spawnPlayer, 1000, 1, source, 2029.95532,-1406.37072,17.21023 ) else setTimer( spawnPlayer, 1000, 1, source, 1172.71948,-1323.23217,15.40160 ) end elseif y < 0 then setTimer( spawnPlayer, 1000, 1, source, -2203.40673,-2310.25146,31.375 ) elseif x < -2000 then setTimer( spawnPlayer, 1000, 1, source, -2656.09277,637.234,14.453 ) elseif x < -700 then setTimer( spawnPlayer, 1000, 1, source, -1514.69409,2520.21459,55.94024 ) else setTimer( spawnPlayer, 1000, 1, source, -319.34173,1050.21472,20.34025 ) end end ) bueno yo creo que por ahí esta el problema, pero por si acaso dejo el de weaski que sirve para guardar el skin y creo que las armas que tal vez pueda estar interfiriendo o algo. WeaSki function onWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) if not( isGuestAccount (getPlayerAccount(source)) ) then local theWeapon = getPedWeapon (source) local theWeapon1 = getPedWeapon (source, 1) local theWeapon2 = getPedWeapon (source, 2) local theWeapon3 = getPedWeapon (source, 3) local theWeapon4 = getPedWeapon (source, 4) local theWeapon5 = getPedWeapon (source, 5) local theWeapon6 = getPedWeapon (source, 6) local theWeapon7 = getPedWeapon (source, 7) local theWeapon8 = getPedWeapon (source, -- s8) --> local theWeapon9 = getPedWeapon (source, 9) local theWeapon10 = getPedWeapon (source, 10) local theWeapon11 = getPedWeapon (source, 11) local theWeapon12 = getPedWeapon (source, 12) local weaponAmmo = getPedTotalAmmo (source) local weaponAmmo1 = getPedTotalAmmo (source, 1) local weaponAmmo2 = getPedTotalAmmo (source, 2) local weaponAmmo3 = getPedTotalAmmo (source, 3) local weaponAmmo4 = getPedTotalAmmo (source, 4) local weaponAmmo5 = getPedTotalAmmo (source, 5) local weaponAmmo6 = getPedTotalAmmo (source, 6) local weaponAmmo7 = getPedTotalAmmo (source, 7) local weaponAmmo8 = getPedTotalAmmo (source, -- s8) --> local weaponAmmo9 = getPedTotalAmmo (source, 9) local weaponAmmo10 = getPedTotalAmmo (source, 10) local weaponAmmo11 = getPedTotalAmmo (source, 11) local weaponAmmo12 = getPedTotalAmmo (source, 12) local Skiin = getPedSkin (source) fadeCamera (source, false) setTimer (setElementModel, 2000, 1, source, Skiin, true) setTimer (spawnPlayer, 1000, 1, source, 2036.1735839844, -1413.0563964844, 16.9921875, 0, getPedSkin (source), 0, 0, getPlayerTeam(source)) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) setTimer (giveWeapon, 2000, 1, source, theWeapon1, weaponAmmo1, true) setTimer (giveWeapon, 2000, 1, source, theWeapon2, weaponAmmo2, true) setTimer (giveWeapon, 2000, 1, source, theWeapon3, weaponAmmo3, true) setTimer (giveWeapon, 2000, 1, source, theWeapon4, weaponAmmo4, true) setTimer (giveWeapon, 2000, 1, source, theWeapon5, weaponAmmo5, true) setTimer (giveWeapon, 2000, 1, source, theWeapon6, weaponAmmo6, true) setTimer (giveWeapon, 2000, 1, source, theWeapon7, weaponAmmo7, true) setTimer (giveWeapon, 2000, 1, source, theWeapon8, weaponAmmo8, true) setTimer (giveWeapon, 2000, 1, source, theWeapon9, weaponAmmo9, true) setTimer (giveWeapon, 2000, 1, source, theWeapon10, weaponAmmo10, true) setTimer (giveWeapon, 2000, 1, source, theWeapon11, weaponAmmo11, true) setTimer (giveWeapon, 2000, 1, source, theWeapon12, weaponAmmo12, true) end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) Link to comment
Recommended Posts