Jump to content

Plate

Members
  • Posts

    938
  • Joined

  • Last visited

Posts posted by Plate

  1. No estoy muy seguro pero intenta asi:

    local screenWidth, screenHeight = guiGetScreenSize( )
    local stopAngle = 0
    
    setTimer(function()
    		if ( stopAngle < 360 ) then
    			stopAngle = stopAngle + 5
    		else
    			stopAngle = 0
    		end
        end, 3600, 0)
    
    addEventHandler( "onClientRender", root,
    	function( )
    		dxDrawCircle( screenWidth / 2, screenHeight / 2, nil, nil, nil, nil, stopAngle )
    	end
    )

     

  2. 3 hours ago, #Dv^ said:

    Puedes usar el evento onClientExplosion, que te permite saber las coordenadas de una explosión y el tipo de explosión

    
    addEventHandler("onClientExplosion", root,
    	function (x,y,z, type)
    		outputChatBox("Explosión en las coordenadas "..x..", "..y..", "..z.."")
    	end
    )
    

    Cabe destacar que funcionará no sólo en proyectiles, sino también cualquier explosión como por ejemplo al explotar una granada y el evento sólo funciona en client-side

    Perfecto muchas gracias por la ayuda

  3. Hi, MTA Community

    I searched for a few days a shader to make shadows in MTA but i didnt found it and now i want to pay for it (if someone have another graphics shader i can buy it too) just leave pictures and send me a pm

    Payment method:

    -Paypal

    -Bitcoin

    Thanks and have a good day :D

  4. Algo que seria muy util es que pongas /debugscript 3 dentro del juego y nos digas los errores que te da el script

    EDIT: Intenta esto

      
          
              
                function register_func ( player, username, passwort) 
                    local acc = addAccount(username,passwort) 
                    if acc then 
                    logIn(player,acc,passwort) 
                    outputChatBox("[sERVER]: #FFFFFFTe Haz Registrado Con Exito!",player, 0, 255, 0, true) 
                    triggerClientEvent(player,"closeLoginPanel",player) 
                    setAccountData(getPlayerAccount(player), "Nickname", getPlayerName(player)) 
                    else 
                    outputChatBox("[ERROR]: #FFFFFFPonte En Contacto Con Algun Administrador!!",player, 255, 0, 0, true) 
                end 
                end 
                addEvent("register",true) 
                addEventHandler("register",getRootElement(),register_func) 
                  
                function login_func ( player, username, passwort) 
                    local acc = getAccount(username,passwort) 
                    if acc then 
                    logIn(player,acc,passwort) 
                    outputChatBox("[sERVER]: #FFFFFFHaz Iniciado Secion Con Exito!",player, 0, 255, 0, true) 
                    outputChatBox("Bienvenido #FFFFFF"..getPlayerName(player),player, 0, 255, 0, true) 
                    triggerClientEvent(player,"closeLoginPanel",player) 
                    local data = getAccountData(getPlayerAccount(player), "Nickname") 
                    if data then 
                    setPlayerName(player, data) 
                    end 
                    else 
                    outputChatBox("[ERROR]: #FFFFFFTu Contraseña o Usuario Es Incorrecto!!",player, 255, 0, 0, true) 
                end 
                end 
                addEvent("login",true) 
                addEventHandler("login",getRootElement(),login_func) 
          
      
    

  5. Eso esta terriblemente mal

    addEventHandler("onPlayerRegister", getRootElement(), 
    function () 
        setAccountData(getPlayerAccount(source), "Nickname", getPlayerName(source)) 
    end 
    end) 
      
      
    addEventHandler("onPlayerLogin", root, 
    function () 
        local data = getAccountData(getPlayerAccount(source), "Nickname") 
        if data then 
        setPlayerName(source, data) 
    end 
    end) 
    

  6. Creo que lo que el quiere es hacer esto

    function Blood (thePlayer) 
        local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
         if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then  
        local blood = getElementData(thePlayer,"blood") 
            setElementData(thePlayer,"blood", blood +999999999999) 
        end 
    end 
    addCommandHandler("hs",Blood) 
    

    PD: El code anterior tiene un end de mas

  7. Guiate un poco con esto

    no testeado

    function expulsar() 
    local kicked = getPlayerFromName ( kickedName ) 
    kickPlayer ( kicked, sourcePlayer, reason ) 
    outputChatBox ( "Kick: " .. kickedName .. " Ah sido Kikeado", sourcePlayer ) 
    end 
    addCommandHandler ( "kick", expulsar ) 
    function banear() 
    local bannedPlayer = getPlayerFromName ( bannedName ) 
    banPlayer ( bannedPlayer, theClient, reason ) 
    outputChatBox ( "Ban: " .. bannedName .. " Ah sido Baneado", theClient ) 
    end 
    addCommandHandler ( "ban", banear ) 
    

    tampoco testeado xDD

    function expulsar(cmd, kickedName) 
    local kicked = getPlayerFromName ( kickedName ) 
    kickPlayer ( kicked, sourcePlayer, reason ) 
    outputChatBox ( "Kick: " .. kickedName .. " Ah sido Kikeado", sourcePlayer ) 
    end 
    addCommandHandler ( "kick", expulsar ) 
    function banear(cmd, bannedName) 
    local bannedPlayer = getPlayerFromName ( bannedName ) 
    banPlayer ( bannedPlayer, theClient, reason ) 
    outputChatBox ( "Ban: " .. bannedName .. " Ah sido Baneado", theClient ) 
    end 
    addCommandHandler ( "ban", banear ) 
    

  8. Lo que tenes que hacer es lo siguiente men

    function replaceModel() 
      txd = engineLoadTXD("13.txd", 13 ) 
      engineImportTXD(txd, 13) 
      dff = engineLoadDFF("13.dff", 13 ) 
      engineReplaceModel(dff, 13) 
      txd2 = engineLoadTXD("22.txd", 22 ) 
      engineImportTXD(txd2, 22) 
      dff2 = engineLoadDFF("22.dff", 22 ) 
      engineReplaceModel(dff2, 22) 
      end 
    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
    

    Cambia las variables :D

  9.   
    local Nivel = getElementData(source,"Level") 
    local auto = getElementType(source) == "vehicle" 
    if (Nivel == "3") and (auto == "470") then 
    outputChatBox("Felicidades ya puedes usar la Patriot", source, 255, 0, 0, false) 
    else 
    cancelEvent() 
    end 
    end 
    addEventHandler("onVehicleStartEnter", root, porNiveles) 
    

    Gracias, pero no me lo hubieras echo yo lo queria hacer por mi mismo.Pero igual gracias

    No te preocupes esta mal echo

    function porNiveles(player) 
    local Nivel = getElementData(player,"Level") 
    local auto = getElementModel(source) 
    if (Nivel >= 3) and (auto == "470") then -- supongo que queres que el de nivel mayor a 3 tambien lo use 
    outputChatBox("Felicidades ya puedes usar la Patriot", player, 255, 0, 0, false) 
    else 
    cancelEvent() 
    end 
    end 
    addEventHandler("onVehicleStartEnter", root, porNiveles) 
    

  10. function handlingChange() 
        setModelHandling(423, "mass", 10000.0) 
        setModelHandling(423, "turnMass", 50000.0) 
        setModelHandling(423, "dragCoeff", 2.0) 
        setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) 
        setModelHandling(423, "percentSubmerged", 80) 
        setModelHandling(423, "tractionMultiplier", 0.70) 
        setModelHandling(423, "tractionLoss", 0.9) 
        setModelHandling(423, "tractionBias", 0.5) 
        setModelHandling(423, "numberOfGears", 5) 
        setModelHandling(423, "maxVelocity", 154.0) 
        setModelHandling(423, "engineAcceleration", 35.0) 
        setModelHandling(423, "engineInertia", 10.0) 
        setModelHandling(423, "driveType", "awd") 
        setModelHandling(423, "engineType", "petrol") 
        setModelHandling(423, "brakeDeceleration", 11.0) 
        setModelHandling(423, "brakeBias", 0.45) 
        setModelHandling(423, "ABS", false) 
        setModelHandling(423, "steeringLock", 30.0) 
        setModelHandling(423, "suspensionForceLevel", 1.4) 
        setModelHandling(423, "suspensionDamping", 0.10) 
        setModelHandling(423, "suspensionHighSpeedDamping", 0.0) 
        setModelHandling(423, "suspensionUpperLimit", 0.40) 
        setModelHandling(423, "suspensionLowerLimit", -0.40) 
        setModelHandling(423, "suspensionFrontRearBias", 0.5) 
        setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) 
        setModelHandling(423, "seatOffsetDistance", 0.20) 
        setModelHandling(423, "collisionDamageMultiplier", 0.20) 
        setModelHandling(423, "monetary", 35000) 
        setModelHandling(423, "modelFlags", 0x40006800) 
        setModelHandling(423, "handlingFlags", 0x1300005) 
        setModelHandling(423, "headLight", 9) 
        setModelHandling(423, "tailLight", 1) 
        setModelHandling(423, "animGroup", 0) 
        end 
        setTimer ( handlingChange, 50, 0) 
    

    Esto es frustrante, gracias a los dos por intentarlo pero cada vez que muero y hago el respawn, se vuelve al handling original del coche y no al del script...

    AHHh cada ves que respawneas vos yo pense que cada ves que respawneaba el vehiculo

    function handlingChange() 
        setModelHandling(423, "mass", 10000.0) 
        setModelHandling(423, "turnMass", 50000.0) 
        setModelHandling(423, "dragCoeff", 2.0) 
        setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) 
        setModelHandling(423, "percentSubmerged", 80) 
        setModelHandling(423, "tractionMultiplier", 0.70) 
        setModelHandling(423, "tractionLoss", 0.9) 
        setModelHandling(423, "tractionBias", 0.5) 
        setModelHandling(423, "numberOfGears", 5) 
        setModelHandling(423, "maxVelocity", 154.0) 
        setModelHandling(423, "engineAcceleration", 35.0) 
        setModelHandling(423, "engineInertia", 10.0) 
        setModelHandling(423, "driveType", "awd") 
        setModelHandling(423, "engineType", "petrol") 
        setModelHandling(423, "brakeDeceleration", 11.0) 
        setModelHandling(423, "brakeBias", 0.45) 
        setModelHandling(423, "ABS", false) 
        setModelHandling(423, "steeringLock", 30.0) 
        setModelHandling(423, "suspensionForceLevel", 1.4) 
        setModelHandling(423, "suspensionDamping", 0.10) 
        setModelHandling(423, "suspensionHighSpeedDamping", 0.0) 
        setModelHandling(423, "suspensionUpperLimit", 0.40) 
        setModelHandling(423, "suspensionLowerLimit", -0.40) 
        setModelHandling(423, "suspensionFrontRearBias", 0.5) 
        setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) 
        setModelHandling(423, "seatOffsetDistance", 0.20) 
        setModelHandling(423, "collisionDamageMultiplier", 0.20) 
        setModelHandling(423, "monetary", 35000) 
        setModelHandling(423, "modelFlags", 0x40006800) 
        setModelHandling(423, "handlingFlags", 0x1300005) 
        setModelHandling(423, "headLight", 9) 
        setModelHandling(423, "tailLight", 1) 
        setModelHandling(423, "animGroup", 0) 
        end 
        addEventHandler("onResourceStart", root, handlingChange) 
         addEventHandler("onPlayerSpawn", root, handlingChange) 
    

    Fijate si funciona

  11.     function handlingChange() 
        setModelHandling(423, "mass", 10000.0) 
        setModelHandling(423, "turnMass", 50000.0) 
        setModelHandling(423, "dragCoeff", 2.0) 
        setModelHandling(423, "centerOfMass", { 0.0, 0.0, -0.6 } ) 
        setModelHandling(423, "percentSubmerged", 80) 
        setModelHandling(423, "tractionMultiplier", 0.70) 
        setModelHandling(423, "tractionLoss", 0.9) 
        setModelHandling(423, "tractionBias", 0.5) 
        setModelHandling(423, "numberOfGears", 5) 
        setModelHandling(423, "maxVelocity", 154.0) 
        setModelHandling(423, "engineAcceleration", 35.0) 
        setModelHandling(423, "engineInertia", 10.0) 
        setModelHandling(423, "driveType", "awd") 
        setModelHandling(423, "engineType", "petrol") 
        setModelHandling(423, "brakeDeceleration", 11.0) 
        setModelHandling(423, "brakeBias", 0.45) 
        setModelHandling(423, "ABS", false) 
        setModelHandling(423, "steeringLock", 30.0) 
        setModelHandling(423, "suspensionForceLevel", 1.4) 
        setModelHandling(423, "suspensionDamping", 0.10) 
        setModelHandling(423, "suspensionHighSpeedDamping", 0.0) 
        setModelHandling(423, "suspensionUpperLimit", 0.40) 
        setModelHandling(423, "suspensionLowerLimit", -0.40) 
        setModelHandling(423, "suspensionFrontRearBias", 0.5) 
        setModelHandling(423, "suspensionAntiDiveMultiplier", 0.3) 
        setModelHandling(423, "seatOffsetDistance", 0.20) 
        setModelHandling(423, "collisionDamageMultiplier", 0.20) 
        setModelHandling(423, "monetary", 35000) 
        setModelHandling(423, "modelFlags", 0x40006800) 
        setModelHandling(423, "handlingFlags", 0x1300005) 
        setModelHandling(423, "headLight", 9) 
        setModelHandling(423, "tailLight", 1) 
        setModelHandling(423, "animGroup", 0) 
        end 
        addEventHandler("onResourceStart", resourceRoot, handlingChange) 
        addEventHandler("onVehicleRespawn", resourceRoot, handlingChange) 
    

  12. El problema es que pusistes el setTimer muy grande y aparte es innesesario

    PD:Por que siempre le pedis ayuuda a castillo el no es el unico scripter de todo el foro

    PD2:Estudia un poco de lua https://wiki.multitheftauto.com/wiki/Scripting_Introduction

        local hillRadar = createRadarArea ( 280.75512695313, 1869.296875, 200, 200, 181, 0, 0, 255 ) 
                    function Nemesisbymanawydan ( )   
                           baz = createObject ( 360, 280.75512695313, 1869.296875, 8.7578125, 0, 0, 0 ) 
                           nemesi = exports [ "slothBot" ]:spawnBot ( 280.75512695313, 1869.296875, 8.7578125, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
                          setElementModel ( nemesi, 107 ) 
                          outputChatBox ("#9E0000Nemesis: #9E0000 Ijos de puta Moriran, STARS!",getRootElement(), 255, 255, 255, true ) 
                          local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
                          attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
                          triggerClientEvent ( "nsound", root )     
                          triggerClientEvent ( "nemesismissel", root ) 
                          exports.extra_health:setElementExtraHealth(nemesi, 99999999) -- te recomiendo bajarla es demaciada vida 
                     end 
                    addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)   
                   addEvent("onBotWasted", true) 
                addEventHandler("onBotWasted", getRootElement)   
          
        function money (theKiller) 
        if (source == nemesi) then 
        givePlayerMoney(theKiller,math.random(5000)) 
        outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Boss!, Ha Ganado $5.000 como recompensa",getRootElement(), 255, 255, 255, true ) 
        setTimer(Nemesisbymanawydan, 16000, 1) 
        end 
        end 
        addEvent("onBotWasted", true) 
        addEventHandler("onBotWasted", getRootElement(), money) 
              
        function destroy () 
             if ( not isElement ( nemesi ) ) then 
             destroyElement(myBlip) 
             end 
        end 
        addEvent("onBotWasted", true) 
        addEventHandler("onBotWasted", getRootElement(), destroy) 
    

×
×
  • Create New...