Jump to content

SetMarcos

Members
  • Posts

    81
  • Joined

  • Last visited

Posts posted by SetMarcos

  1. OIá, eu estou aqui para explicar uma base de um script que não consigo fazer...

    De acordo com esse script de slotman quero tornar o spawn de zombies constante...

    Ideia: MAX PLAYERS SERVER = 100

    Se o servidor tiver lotado, no caso 100/100, eu quero que exista 5 zumbi para cada um dos 100...

    100 x 5 = 500 é o máximo de zumbis que só pode chegar ao máximo se houver os 100 jogadores, caso haja 1 jogador ele só vai ficar com seus 5 zumbis constantes...

    Lembrando que tem que ser feito em cima do script de slothman...

    PAGO R$8 PARA QUEM FAZER... (Descompilado _-) 

    Skype: MarcosPRO20

    430x73_FFFFFF_FF9900_000000_000000.png

  2. 13 hours ago, MaligNos said:

    Você está utilizando a função unpack() de maneira incorreta.

    
    local pos = { 
    {477, 2205.8999,  -1176.9, 25.4, 0, 0, 270 },--posição
    {402, 2206.3,  -1172.9,  25.7, 0, 0, 268 }, 
    {494, 2206.3999, -1169.1, 25.7, 0, 0, 270 }, 
    {502, 2206.3, -1164.9,25.7, 0, 0, 270 },
    {503, 2206.5,1160.6, 25.7, 0, 0, 270 }, 
    {522, 2206, -1156.9 ,25.4, 0, 0, 272 }, 
    {587,2206.3,-1152.9,25.5, 0, 0, 272 },
    {521, 2227.7,-1177.2,25.4, 0, 0, 86 }, 
    {400, 2227.8999,-1173.6,25.9 , 0, 0, 90}, 
    {603, 2228.3999,-1170.1, 25.7  , 0, 0, 90 }, 
    {429,2228,-1166.3,25., 0, 0, 88 }, 
    {566, 2227.8999,-1162.9,25.7, 0, 0, 90 }, -- a função só funciona nesse
    }
    local vehicles = {}
    
    for index,veiculo in pairs(pos) do
    	table.insert(vehicles,createVehicle(unpack(veiculo)))
    	setVehicleDamageProof(vehicles[index], true) -- blidao
    	setVehicleColor ( vehicles[index], 255, 255, 255, 0, 0, 0 )  -- cor do carro
    	setVehicleHeadLightColor ( vehicles[index], 255, 0, 0 )-- luzes com cor
    	setVehicleDoorState ( vehicles[index], 1,1) -- portas
    end
    
    --
        function  lockPrivate( player,seat, jacked )    
    		for _,veiculo in pairs(vehicles) do
    			if (source == veiculo) and (seat == 0) then
    				local account = getPlayerAccount( player )
    				local accountName = ( account and getAccountName ( account ) or "" )
    				if not( accountName == "") then -- accountName == "Nome_da_Conta" or accountName == "accountName == "Nome_da_Conta"
    					cancelEvent()
    					outputChatBox("  #ffff00* #ff0000Esse veículo está a venda! #00ff00[Execute: F1/Compras]#ff0000[Consulte um ADM]", player, 255, 0, 0, true)
    				else
    					outputChatBox("", player, 0, 255, 0, true)
    				end
    				break
    			end
    		end
        end
    addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate )
    

     

    Muito obrigado!

    430x73_FFFFF_F9900_00000_00000.png

  3. Na minha minha VPS LINUX, a versão 1.5.3 funcionou perfeitamente...

    Faça o seguinte: 

    - Cheque o firewall. (Pode está bloqueando o .exe)

    - Tenha certeza que não tem programas de terceiros influenciando no processo do seu servidor.

    - baixe novamente a nova versão, pois os arquivos podem está corrompidos.

    - ou simplesmente, pode ser erro no seu mtaserver.conf, já que vc não especificou o real problema.

    xD

    Meu skype: MarcosPRO20

                                                                                                                                          430x73_FFFFFF_FF9900_000000_000000.png

  4. opa! é o seguinte... meu script está com um unpack para pegar as posições dos carros e criar com a função createvehicle...

    então, quero estabelecer uma função que funcione para todos os veiculos criados no script. No entanto, ela só está funcionando no último veículo do meu array...

    me ajudem, porfavor <3

    vejam o code:

    local vehicles = { 
    {477, 2205.8999,  -1176.9, 25.4, 0, 0, 270 },--posição
    {402, 2206.3,  -1172.9,  25.7, 0, 0, 268 }, 
    {494, 2206.3999, -1169.1, 25.7, 0, 0, 270 }, 
    {502, 2206.3, -1164.9,25.7, 0, 0, 270 },
    {503, 2206.5,1160.6, 25.7, 0, 0, 270 }, 
    {522, 2206, -1156.9 ,25.4, 0, 0, 272 }, 
    {587,2206.3,-1152.9,25.5, 0, 0, 272 },
    {521, 2227.7,-1177.2,25.4, 0, 0, 86 }, 
    {400, 2227.8999,-1173.6,25.9 , 0, 0, 90}, 
    {603, 2228.3999,-1170.1, 25.7  , 0, 0, 90 }, 
    {429,2228,-1166.3,25., 0, 0, 88 }, 
    {566, 2227.8999,-1162.9,25.7, 0, 0, 90 }, -- a função só funciona nesse
    }
    
    vehicle = createVehicle( unpack(vehicles))
    
    setVehicleDamageProof(vehicle, true) -- blidao
    setVehicleColor ( vehicle, 255, 255, 255, 0, 0, 0 )  -- cor do carro
    setVehicleHeadLightColor ( vehicle, 255, 0, 0 )-- luzes com cor
    setVehicleDoorState ( vehicle, 1,1) -- portas
    
    --
        function  lockPrivate( player,seat, jacked )    
            if ( source == vehicle ) and (seat == 0) then
                local account = getPlayerAccount( player )
                local accountName = ( account and getAccountName ( account ) or "" )
                if not( accountName == "") then -- accountName == "Nome_da_Conta" or accountName == "accountName == "Nome_da_Conta"
                    cancelEvent()
                    outputChatBox("  #ffff00* #ff0000Esse veículo está a venda! #00ff00[Execute: F1/Compras]#ff0000[Consulte um ADM]", player, 255, 0, 0, true)
                else
                    outputChatBox("", player, 0, 255, 0, true)
                end
            end
        end
    addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate )

    430x73_FFFFFF_FF9900_000000_000000.png

  5. Uma dúvida que eu sempre tive...

    setElementData salva o banco?

    On 05/11/2016 at 5:18 PM, MrDante said:
    
    function StarKill ( ammo, killer, killerweapon, Vehicle, bodypart )
    
      if ( killer ) and ( killer ~= source ) then
       x,y,z = getElementPosition(killer)
       setElementData(killer, "positions", {x, y, z});
       local  procurado = getPlayerWantedLevel (killer)
      
    
      if procurado == 0 then    
        givePlayerMoney ( killer, 200 )
        setPlayerWantedLevel ( killer, 2)
        elseif procurado == 2 then
        givePlayerMoney ( killer, 200 )
        setPlayerWantedLevel ( killer, 4)
        elseif procurado == 4 then
        givePlayerMoney ( killer, 200 )
        setPlayerWantedLevel ( killer, 6)
      elseif procurado == 6 then
         setPlayerWantedLevel (killer,0)
         removePedFromVehicle (killer)   
       setElementPosition (killer, 2587.328125, 2067.626953125, 10.8203125) 
         outputChatBox ("[PENITENCIÁRIA] - #ff0000Você foi preso por 60 segundos...",killer,80,80,80,true)
         outputChatBox ("[PENITENCIÁRIA] - " .. getPlayerName(killer) .. "#ff0000 foi preso por 60 segundos...",source,80,80,80,true)
       setElementFrozen (killer, true)
       setTimer (function () 
           backlocation(killer) 
       end, 120000, 1)
      else  
        givePlayerMoney ( killer, 200 )    
      end
    end
      
    function backlocation (killer)
    local x, y, z = unpack(getElementData(killer, "positions"))
    setElementPosition (killer,x,y,z+1)
    
    end
    end
    addEventHandler ( "onPlayerWasted", getRootElement(), StarKill )
    

     

    vou testar aqui mano... 

  6. Fala galera, necessito da ajuda de vocês...

    Vamos lá, esse script pega o player matou o outro, dá 200$ e duas estrelas, então eu quero fazer como está no código.... quando chegar a 6 estrelas ele é preso por 60 segundos e sendo setado pra uma prisão dps voltar pro msm lugar que ele tava ao chegar as 6 estrelas...

    Obrigado teste já...

    function StarKill ( ammo, killer, killerweapon, Vehicle, bodypart )
    
      if ( killer ) and ( killer ~= source ) then
       x,y,z = getElementPosition(killer)
       local  procurado = getPlayerWantedLevel (killer)
      
    
      if procurado == 0 then    
        givePlayerMoney ( killer, 200 )
        setPlayerWantedLevel ( killer, 2)
        elseif procurado == 2 then
        givePlayerMoney ( killer, 200 )
        setPlayerWantedLevel ( killer, 4)
        elseif procurado == 4 then
        givePlayerMoney ( killer, 200 )
        setPlayerWantedLevel ( killer, 6)
      elseif procurado == 6 then
         setPlayerWantedLevel (killer,0)
         removePedFromVehicle (killer)   
       setElementPosition (killer, 2587.328125, 2067.626953125, 10.8203125) 
         outputChatBox ("[PENITENCIÁRIA] - #ff0000Você foi preso por 60 segundos...",killer,80,80,80,true)
         outputChatBox ("[PENITENCIÁRIA] - " .. getPlayerName(killer) .. "#ff0000 foi preso por 60 segundos...",source,80,80,80,true)
       setElementFrozen (killer)
       setTimer (backlocation(killer) setElementPosition, 120000, 1)
      else  
        givePlayerMoney ( killer, 200 )    
      end
    end
    end
    addEventHandler ( "onPlayerWasted", getRootElement(), StarKill )
    
    function backlocation (killer)
    setElementPosition (killer,x,y,z+1)
    
    end

    ~Marcos: Owner and Developer

    Fórum: http://infeczumbi.hol.es

    server IP: mtasa://198.100.158.105:22003

  7.  

    if I want to make greenzones in anti-zombie areas, the following code corresponds?

    -- By default it adds greenzone to the Freeroam/play standard spawnpoints to prevent spawnkills, you can add greenzone areas to it using the coordinate format
    -- Format is: {x = 0, y = 0, z = 0, width = 0, depth = 0, height = 0},
    local greenzones = {
    	{x = 2467.42, y = -1686.06, z = 12, width = 37, depth = 36, height = 15}, -- Grove Street
    	{x = 1987.69, y = 1503.08, z = 8, width = 40, depth = 70, height = 25}, -- LV Pirate ship
    	{x = -727.38, y = 930.76, z = 11, width = 60, depth = 60, height = 25}, -- Wooden house thing
    	{x = -2420, y = -626.2, z = 125, width = 60, depth = 60, height = 30}, -- San Fierro antenna thing
    }
    
    -- initialize all zones on resource start
    local z = {}
    function initGreenzones()
    	if greenzones and #greenzones ~= 0 then
    		for _,v in ipairs (greenzones) do
    			if v then
    				if v.x and v.y and v.z and v.width and v.depth and v.height then
    					local c = createColCuboid (v.x, v.y, v.z, v.width, v.depth, v.height)
    					local rarea = createRadarArea (v.x, v.y, v.width, v.depth, 0, 255, 0, 150)
    					setElementParent (rarea, c)
    					
    					setElementData (rarea, "zombieProof", true)
    					
    					if c then
    						z[c] = true
    						for _,p in ipairs (getElementsWithinColShape(c, "player")) do
    							setElementData (p, "greenzone", true)
    						end
    						addEventHandler ("onElementDestroy", c,
    							function()
    								if z[source] then
    									z[source] = nil
    								end
    							end
    						)
    						addEventHandler ("onColShapeHit", c,
    							function (h, d)
    								if h and d and isElement(h) and getElementType (h) == "player" then
    									setElementData (h, "greenzone", true)
    									outputChatBox ("* Greenzone * You have entered the greenzone", h, 0, 220, 0)
    								end
    							end
    						)
    						addEventHandler ("onColShapeLeave", c,
    							function (h, d)
    								if h and d and isElement(h) and getElementType (h) == "player" then
    									removeElementData (h, "greenzone")
    									outputChatBox ("* Greenzone * You have left the greenzone", h, 220, 220, 0)
    								end
    							end
    						)
    					end
    				end
    			end
    		end
    	end
    end
    addEventHandler ("onResourceStart", resourceRoot, initGreenzones)
    
    function resetGreenzoneData()
    	for _,p in ipairs (getElementsByType("player")) do
    		if isElement(p) then
    			removeElementData (p, "greenzone")
    		end
    	end
    end
    addEventHandler ("onResourceStop", resourceRoot, resetGreenzoneData)

     

    Just now, MarcosMix99 said:

     

    if I want to make greenzones in anti-zombie areas, the following code corresponds?

    
    -- By default it adds greenzone to the Freeroam/play standard spawnpoints to prevent spawnkills, you can add greenzone areas to it using the coordinate format
    -- Format is: {x = 0, y = 0, z = 0, width = 0, depth = 0, height = 0},
    local greenzones = {
    	{x = 2467.42, y = -1686.06, z = 12, width = 37, depth = 36, height = 15}, -- Grove Street
    	{x = 1987.69, y = 1503.08, z = 8, width = 40, depth = 70, height = 25}, -- LV Pirate ship
    	{x = -727.38, y = 930.76, z = 11, width = 60, depth = 60, height = 25}, -- Wooden house thing
    	{x = -2420, y = -626.2, z = 125, width = 60, depth = 60, height = 30}, -- San Fierro antenna thing
    }
    
    -- initialize all zones on resource start
    local z = {}
    function initGreenzones()
    	if greenzones and #greenzones ~= 0 then
    		for _,v in ipairs (greenzones) do
    			if v then
    				if v.x and v.y and v.z and v.width and v.depth and v.height then
    					local c = createColCuboid (v.x, v.y, v.z, v.width, v.depth, v.height)
    					local rarea = createRadarArea (v.x, v.y, v.width, v.depth, 0, 255, 0, 150)
    					setElementParent (rarea, c)
    					
    					setElementData (rarea, "zombieProof", true)
    					
    					if c then
    						z[c] = true
    						for _,p in ipairs (getElementsWithinColShape(c, "player")) do
    							setElementData (p, "greenzone", true)
    						end
    						addEventHandler ("onElementDestroy", c,
    							function()
    								if z[source] then
    									z[source] = nil
    								end
    							end
    						)
    						addEventHandler ("onColShapeHit", c,
    							function (h, d)
    								if h and d and isElement(h) and getElementType (h) == "player" then
    									setElementData (h, "greenzone", true)
    									outputChatBox ("* Greenzone * You have entered the greenzone", h, 0, 220, 0)
    								end
    							end
    						)
    						addEventHandler ("onColShapeLeave", c,
    							function (h, d)
    								if h and d and isElement(h) and getElementType (h) == "player" then
    									removeElementData (h, "greenzone")
    									outputChatBox ("* Greenzone * You have left the greenzone", h, 220, 220, 0)
    								end
    							end
    						)
    					end
    				end
    			end
    		end
    	end
    end
    addEventHandler ("onResourceStart", resourceRoot, initGreenzones)
    
    function resetGreenzoneData()
    	for _,p in ipairs (getElementsByType("player")) do
    		if isElement(p) then
    			removeElementData (p, "greenzone")
    		end
    	end
    end
    addEventHandler ("onResourceStop", resourceRoot, resetGreenzoneData)
    

     

    line 21

  8. Panel = {
        button = {},
        window = {}
    }
    
    
    function window()
    showCursor(true)
    isPanelShowing = true
    local player = getLocalPlayer()
    local screenW, screenH = guiGetScreenSize()
            Panel.window[1] = guiCreateWindow((screenW - 367) / 2, (screenH - 376) / 2, 367, 376, "VIP_Panel 1.1", false)
            guiWindowSetSizable(Panel.window[1], false)
            guiSetAlpha(Panel.window[1], 1.00)
    
            Panel.button[1] = guiCreateButton(68, 25, 238, 44, "VIP Equip", false, Panel.window[1])
            guiSetProperty(Panel.button[1], "NormalTextColour", "FFFFFFFF")
            Panel.button[2] = guiCreateButton(68, 75, 238, 44, "Spawn Infernus", false, Panel.window[1])
            guiSetProperty(Panel.button[2], "NormalTextColour", "FFFFFFFF")
            Panel.button[3] = guiCreateButton(68, 125, 238, 44, "Spawn Hunter", false, Panel.window[1])
            guiSetProperty(Panel.button[3], "NormalTextColour", "FFFFFFFF")
            Panel.button[4] = guiCreateButton(68, 175, 238, 44, "Add Armor", false, Panel.window[1])
            guiSetProperty(Panel.button[4], "NormalTextColour", "FFFFFFFF")
            Panel.button[5] = guiCreateButton(68, 225, 238, 44, "Fill Health", false, Panel.window[1])
            guiSetProperty(Panel.button[5], "NormalTextColour", "FFFFFFFF")
            Panel.button[6] = guiCreateButton(68, 274, 238, 44, "Delete Wandet Level", false, Panel.window[1])
            guiSetProperty(Panel.button[6], "NormalTextColour", "FFFFFFFF")
            Panel.button[7] = guiCreateButton(68, 323, 238, 44, "Fix Motor", false, Panel.window[1])
            guiSetProperty(Panel.button[7], "NormalTextColour", "FFFFFFFF")
            Panel.button[8] = guiCreateButton(324, 25, 33, 36, "X", false, Panel.window[1])
            guiSetFont(Panel.button[8], "clear-normal")
            guiSetProperty(Panel.button[8], "NormalTextColour", "FFAAAAAA")    
            
            addEventHandler("onClientGUIClick",Panel.button[8],function()  -- Close Window
            destroyElement(Panel.window[1])
            showCursor(false)
            isPanelShowing = false
            end,false)
            
            addEventHandler("onClientGUIClick",Panel.button[2],function()
            triggerServerEvent("infernus",localPlayer,localPlayer)
            end,false)
            
            addEventHandler("onClientGUIClick",Panel.button[3],function()
            triggerServerEvent("hunter",localPlayer,localPlayer)
            end,false)
            
            addEventHandler("onClientGUIClick",Panel.button[5],function()
            setElementHealth(player,999)
            end,false)
            
            addEventHandler("onClientGUIClick",Panel.button[4],function()
            triggerServerEvent("givearmor",player,player)
            end,false)
            
            addEventHandler("onClientGUIClick",Panel.button[7],function( player )
            if not getPedOccupiedVehicle(player) then return end
            setElementHealth(getPedOccupiedVehicle(player),1000)
            end,false)
            
            addEventHandler("onClientGUIClick",Panel.button[6],function()
            triggerServerEvent("wandet",localPlayer,localPlayer)
            end,false)
            
            addEventHandler("onClientGUIClick",Panel.button[1],function()
            triggerServerEvent("weaponbox",localPlayer,localPlayer)
            end,false)
    end
    addEvent( "GUIVIP", true )
    addEventHandler( "GUIVIP", getRootElement(), window)
    function marcosfunc ( thePlayer , commandName )
       local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
       if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then 
       triggerClientEvent ( thePlayer, "GUIVIP", thePlayer)
       else
       outputChatBox ( "Sai fora remelau <3",thePlayer,255,0,0,true)
       end
     end 
    addCommandHandler ( "vip", marcosfunc )
    
    addEvent("infernus",true)
    addEventHandler("infernus", root,function(player)
    local x, y, z = getElementPosition( player ) 
    local infernus = createVehicle(411,x, y, z)
    outputChatBox(" * You Spawn the Infernus! * ",player, 0,255,0)
    setTimer(warpPedIntoVehicle, 100, 1, player, infernus, 0)
    end)
    
    addEvent("hunter",true)
    addEventHandler("hunter", root,function(player)
    local x, y, z = getElementPosition( player ) 
    local hunter = createVehicle(425,x, y, z)
    outputChatBox(" * You Spawn the Hunter! * ",player, 0,255,0)
    setTimer(warpPedIntoVehicle, 100, 1, player, hunter, 0)
    end)
    
    addEvent("givearmor", true)
    addEventHandler("givearmor",getRootElement(), function(player)
    setPedArmor(player,999)
    end)
    
    addEvent("wandet", true)
    addEventHandler("wandet",root , function( player )
    setPlayerWantedLevel(player,0)
    end)
    
    addEvent("weaponbox", true)
    addEventHandler("weaponbox",root, function()
    giveWeapon(source,1,99999,true)
    giveWeapon(source,31,99999,true)
    giveWeapon(source,24,99999,true)
    giveWeapon(source,29,99999,true)
    giveWeapon(source,34,99999,true)
    giveWeapon(source,35,99999,true)
    giveWeapon(source,16,99999,true)
        outputChatBox(" * You've got the 'Weaponbox' successful! ' ",source, 0,255,0)
    end)
    
     

     

    agora é com você

  9. 15 hours ago, Dealman said:
    
    function vidacolete()
    local marcos = getTeamName(getPlayerTeam( source ))
    local armor = getPedArmor( source 
    

    As far as I can tell, source is never defined. Try replacing source with client.

     
    so I have to do all the script specifying the player? thank you bro! 
    I am new in POO MTASA xD
    
     
    16 hours ago, Woovie said:

    Moved to scripting.

    thank you bro!
×
×
  • Create New...