Jump to content

Lo ay?


eldelahoz

Recommended Posts

Posted

Bueno este fue el codigo que esta en ese recuerso pero no entiendo muy bien de las cordenas y como lo puedo hacer para los del team

g_loc_pla = getLocalPlayer () 
g_loc_root = getRootElement () 
  
addEvent ( "destroyTrepassor", true ) 
addEventHandler ( "destroyTrepassor", g_loc_root, 
    function () 
         
        posX = 15.7054 
        posY =  1719.3632 
        posZ =  50.123 
         
        posX2 = 237.7176 
        posY2 =  1696.5727 
        posZ2 =  50.1087 
         
        posX3 = 354.6243 
        posY3 = 2028.3897 
        posZ3 = 50.1217 
         
        posX4 = 188.241 
        posY4 = 2081.3469 
        posZ4 = 50.1422 
         
        local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) 
         
        rotZ = getPlayerRotation ( g_loc_pla ) 
         
        if isInResArea == "true" then 
            timer1 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX, posY, posZ, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
            timer2 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX2, posY2, posZ2, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
            timer3 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX3, posY3, posZ3, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
            timer4 = setTimer ( createProjectile, 2000, 0, g_loc_pla, 20, posX4, posY4, posZ4, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
        end 
         
    end 
) 
  
addEvent ( "destroyTimers", true ) 
addEventHandler ( "destroyTimers", g_loc_root, 
    function () 
         
        local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) 
        if isInResArea == "false" then 
            killTimer ( timer1 ) 
            killTimer ( timer2 ) 
            killTimer ( timer3 ) 
            killTimer ( timer4 ) 
        end 
         
    end 
) 

Posted

Bueno segun lo tuyo hise esto pero no meda la explosión noce por que T_T aquí los .lua

Defensa_C

g_loc_pla = getLocalPlayer () 
g_loc_root = getRootElement () 
  
addEvent ( "destroyTrepassor", true ) 
addEventHandler ( "destroyTrepassor", g_loc_root, 
    function () 
         
        posX = 755.60467529297 
        posY =  836.24938964844 
        posZ =  -0.304687 
         
        posX2 = 755.60467529297 
        posY2 =  836.24938964844 
        posZ2 =  -0.304687 
         
        posX3 = 755.60467529297 
        posY3 = 836.24938964844 
        posZ3 = -0.304687 
         
        posX4 = 755.60467529297 
        posY4 = 836.24938964844 
        posZ4 = -0.304687 
         
        local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) 
         
        rotZ = getPlayerRotation ( g_loc_pla ) 
         
        if isInResArea == "true" then 
            timer1 = setTimer ( createExplosion, 200, 0, g_loc_pla, 20, posX, posY, posZ, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
            timer2 = setTimer ( createExplosion, 200, 0, g_loc_pla, 20, posX2, posY2, posZ2, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
            timer3 = setTimer ( createExplosion, 200, 0, g_loc_pla, 20, posX3, posY3, posZ3, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
            timer4 = setTimer ( createExplosion, 200, 0, g_loc_pla, 20, posX4, posY4, posZ4, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) 
        end 
         
    end 
) 
  
addEvent ( "destroyTimers", true ) 
addEventHandler ( "destroyTimers", g_loc_root, 
    function () 
         
        local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) 
        if isInResArea == "false" then 
            killTimer ( timer1 ) 
            killTimer ( timer2 ) 
            killTimer ( timer3 ) 
            killTimer ( timer4 ) 
        end 
         
    end 
) 
  

]

Defensa_S

g_base_col = createColCuboid ( 755.50213623047, 836.47106933594, -0.3046875, 10, 10, 10 ) 
createBlip ( 755.50213623047, 836.47106933594, -0.3046875, 47 ) 
  
g_root = getRootElement () 
  
--rocketOne = createMarker ( -2931.5136, 454.4492, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker 
--rocketTwo = createMarker ( -2931.5932, 487.1994, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker 
  
function hit ( pla, dim ) 
    if getElementType ( pla ) == "player" then 
    local vehicle = getPlayerOccupiedVehicle ( pla ) 
        if vehicle or not vehicle then 
            local skin = getPlayerSkin ( pla ) 
            if skin == 104 then 
                outputChatBox ( "Bienvenido, "..getClientName(pla).."!", pla, 0, 150, 0 ) 
            else 
                setElementData ( pla, "inRestrictedArea", "true" ) 
                triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) 
                outputChatBox ( "***Has entrado y no heres del clan***", pla, 255, 0, 0 ) 
                outputChatBox ( "* "..getClientName(pla).." ahora moriras!", g_root, 255, 0, 0 ) 
            end 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", g_base_col, hit ) 
  
function leave ( pla, dim ) 
    if getElementType ( pla ) == "player" then 
    local vehicle = getPlayerOccupiedVehicle ( pla ) 
        if vehicle or not vehicle then 
            local skin = getPlayerSkin ( pla ) 
            if skin == 104 then 
                outputChatBox ( "Chao!", pla, 0, 100, 0 ) 
            else 
                setElementData ( pla, "inRestrictedArea", "false" ) 
                triggerClientEvent ( pla, "destroyTimers", g_root, pla ) 
                outputDebugString ( "*"..getClientName(pla).." has left col shape" ) 
            end 
        end 
    end 
end 
addEventHandler ( "onColShapeLeave", g_base_col, leave ) 

¡Saludos!

Posted

Lo puse asi y no me dio no ce si esta mal

area = createColCuboid ( 755.50213623047, 836.47106933594, -0.3046875, 10, 10, 10 ) 
  
function hit(thePlayer) 
local 755.50213623047, 836.47106933594, -0.3046875 = getElementPosition( thePlayer ) 
createExplosion ( 755.50213623047, 836.47106933594, -0.3046875, 0) 
createExplosion ( 756.50213623047, 836.47106933594, -0.3046875, 0) 
createExplosion ( 754.50213623047, 836.47106933594, -0.3046875, 0) 
createExplosion ( 755.50213623047, 837.47106933594, -0.3046875, 0) 
createExplosion ( 755.50213623047, 835.47106933594, -0.3046875, 0) 
createExplosion ( 755.50213623047, 836.47106933594, 1.3046875, 0) 
createExplosion ( 755.50213623047, 836.47106933594, -1.3046875, 0) 
            end 
        end 
    end 
end 
addEventHandler("onColShapeHit", area, hit) 

Te quiero hacer unas preguntas me das tu skype o msm

Posted

Usare algo para que no de tanto lag pero tengo un problema es que ahora no me da el script no funciona le agrege para los del team y no funciona

area = createColCuboid ( 755.50213623047, 836.47106933594, -0.3046875, 10, 10, 10 ) 
  
function hit(thePlayer) 
 if getElementType( thePlayer ) == "player" then 
if getTeamName( getPlayerTeam( thePlayer ) ) ~= "Nombre del clan" then 
killPed( thePlayer ) 
else 
    outputChatBox ( "No Heres Del Clan Muere por aver Entrado", thePlayer, 0, 255, 0 ) 
            end 
        end 
    end 
end 
addEventHandler("onColShapeHit", area, hit) 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...