Jump to content

TadMad

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by TadMad

  1. Buenas, yo tenía un servidor de paradise en mi ordenador con Windows 10 de 64 bits, la base de datos en XAMPP y todo funcionaba perfectamente. Deje de usar el servidor por unos meses y cuando lo intenté volver a abrir me daba un error de "Changing field characters.created failed", el módulo de mta_mysql.dll cargaba bien y se conectaba a la base de datos con todos los resources cargando perfectamente, menos el players. Primero decidí actualizar el módulo de mta_mysql.dll, seguía el mismo error, luego decidí probar con el paradise default y generar nuevas tablas a ver si el problema era de mi servidor, un error parecido ahora era "Unable to create table characters". Intenté probar con el módulo de 64 bits, el mismo error, usar otra base de datos que no fuera local, lo mismo, en varios posts he leído que a varias personas les ocurría el mismo error, pero no aportaban ninguna solución.

    Gracias.

  2. On 27/05/2019 at 18:23, CodyJ(L) said:

    Sorry for a bit of a late response, haven't been reading forums much lately.

     

    https://wiki.multitheftauto.com/wiki/OnClientVehicleDamage

    https://wiki.multitheftauto.com/wiki/GetVehiclePanelState

    https://wiki.multitheftauto.com/wiki/SetVehiclePanelState

    When you active the function loop through the panels and save their states. On vehicle damage loop through and restore their states to what has been saved.

     

    
    damageTable = {}
    
    function setVehiclePanelsDamageProof(player)
       local veh = getPedOccupiedVehicle(player)
       if isElement(veh) then
          if damageTable[veh] then
             damageTable[veh] = nil
          else
             damageTable[veh] = {}
             for i = 0,6 do
                local state = getVehiclePanelState(veh,i)
                damageTable[veh][i] = state
             end
          end
       end
    end
    addCommandHandler ( "damageProof", setVehiclePanelsDamageProof ) -- # Change this to whatever you want
    
    function onVehicleDamage()
        if isElement(source) and damageTable[source] then
          for i = 0,6 do
             setVehiclePanelState(source,i,damageTable[source][i])
          end
       end
    end
    
    addEventHandler("onVehicleDamage", root, onVehicleDamage)
    

    Basic script, should work (Untested) . You'll have to modify it to your needs though.

     

    When you use the command "damageProof" it loops through the vehicles panels and saves their states (Or if table exists nils it) which enables or disables it. If a table exists (It's enabled) onVehicleDamage it loops through and resets the vehicles panel states. If disabled then it'll ignore it.

    Thank you for helping :D

  3. Hey,

    I'm always getting the error 'There was a problem validating your serial', I tried following the steps mentioned, rebooting the VM, reinstalling MTA on the VM, reinstalling MTA on my PC, and still doesn't work.

    I'm running the Virtual Machine with Windows 7 and VMware.

  4. I need help because I can't figure out how to get the physical parts (doors, panels) of a vehicle that got damaged, I tried using onClientVehicleDamage, but didn't work. I'd like to do a function that restores the door or panel to it's old state when you damage it.

    (I mean, if the door was damaged when you hit it, it's still damaged, but if it was intact, it keeps intact). I want to disable damaging vehicle parts with fists but keeping the old part state.

  5. 1 hour ago, JustinMTA said:

    Is the truck using a shader or is that the default paintjob for this truck?

    It's using the default one but it also happens with shaders.

    It happens to all vehicles which have different variants that change their paintjob. (Benson, Mule, Trailers, ...)

  6. 12 hours ago, Tut said:

    Indeed but to be more specific, @TadMad you could try applying 2 new 4x4 bitmaps to replace your indicator lights in any 3d software. (bitmap res doesn't matter, i just favor low .txd size)

    In a test we did shade the Blinker bitmaps with a yellow color but you should get the point ?

     

    lFv14w4.png

    But, how can I do that? do I need to replace all the vehicles dff files? can't I do it with shaders?

  7. Bueno, yo hace no mucho que empecé a scriptear y he estado probando algunas cosas con paradise , haciendo scripts, etc, y necesito ayuda ya que al hacer un comando para revivir a alguien cuando está muerto, todo va bien menos que cuando reaparece le sigue saliendo lo de "Wait X Seconds for Respawn" necesito ayuda para quitar eso cuando le reviva, este es el código que tengo:

    addCommandHandler( "revivir",
    	function( player, commandName, otherPlayer, ... )
    	    local other, name = exports.players:getFromName( player, otherPlayer )
    	    local isdead = isPedDead ( other )
         	local x, y, z = getElementPosition ( other )
    		if isdead then
    		    spawnPlayer( other, x, y, z )
    			setCameraTarget ( other )
            else
    		outputChatBox( "Este jugador esta vivo.", player, 0, 255, 153 )
    		end
        end
    )

    perdón si sale un poco movido pero en el lua original todo esta bien alineado

×
×
  • Create New...