Jump to content

Spawn with Weapons


GuilhermeP

Recommended Posts

 

How do I get players started with a parachute in this spawn?

 

local player = getLocalPlayer()
function killzs(player)
guiSetVisible ( fundo1, true )
                guiSetVisible ( losanto, true )
                guiSetVisible ( lasventuras, true )
                guiSetVisible ( zonaruracl, true )
                guiSetVisible ( sanfierro, true )
                showCursor ( true )
 end 
 function tempos ( player )
    setTimer ( killzs, 5000, 1 ,player )
    outputChatBox ( "GhostKratos,Sempre inovando!", player, 10, 250, 1 )

    end
     addCommandHandler("///spawn", tempos)
     addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), tempos )


fundo1 = guiCreateStaticImage(0.00, 0.00, 2.5, 2.5, "images/spawn.png", true)
        zonaruracl = guiCreateButton(0.60, 0.58, 0.38, 0.14, "", true, fundo1)
        guiSetAlpha(zonaruracl, 0.10)
        lasventuras = guiCreateButton(0.06, 0.58, 0.38, 0.14, "", true, fundo1)
        guiSetAlpha(lasventuras, 0.10)
        losanto = guiCreateButton(0.06, 0.32, 0.38, 0.14, "", true, fundo1)
        guiSetAlpha(losanto, 0.10)
        sanfierro = guiCreateButton(0.60, 0.32, 0.38, 0.14, "", true, fundo1)
        guiSetAlpha(sanfierro, 0.10)

        if getElementData(localPlayer,"logedin") then
    guiSetVisible(fundo1,false)
else
    guiSetVisible(fundo1,false)
end


addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
local spawns = {
  { 1429.66028 },
  { 2327.74292 },
  { 2885.57227 }
}

function tamanho( tabela )
  local count = 0
  for a in pairs( tabela ) do
    count = count + 1
  end
  return count
end
        
            if (source == lasventuras) then    --SPAWN LV--
            local player = getLocalPlayer()        
local spawnPositions = {
{1891.6865234375, 877.65985107422, 721.93872070313},
{1792.7873535156, 1718.9221191406, 814.08441162109},
{1265.4808349609, 2967.2697753906, 808.52252197266},
{481.853515625, 2050.9831542969, 778.2783203125},
{66.460441589355, 1476.8333740234, 763.30413818359},
}

function tamanhas( tables )
  local count = 0
  for a in pairs( tables ) do
    count = count + 1
  end
  return count
end    

local zikao = math.random(tamanhas(spawnPositions))
                  setElementPosition (player , spawnPositions[zikao][1],spawnPositions[zikao][2],spawnPositions[zikao][3]  )   -------lv
                  guiSetVisible ( fundo1, false )
                   showCursor ( false )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == zonaruracl) then         --SPAWN ZONA RURAL--
            local player = getLocalPlayer()    
local spawnPositions = {
{16.354850769043, -2576.9909667969, 504.41473388672},
{-29.615926742554, -944.26678466797, 810.76837158203},
}

function tamanhas( tables )
  local count = 0
  for a in pairs( tables ) do
    count = count + 1
  end
  return count
end    

local zikao = math.random(tamanhas(spawnPositions))
                  setElementPosition (player , spawnPositions[zikao][1],spawnPositions[zikao][2],spawnPositions[zikao][3]  )   -------lv
                  guiSetVisible ( fundo1, false )
                   showCursor ( false )
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == losanto) then      --SPAWN LS--
            local player = getLocalPlayer()
local spawnPositions = {
{2068.8125, -848.57751464844, 782.20153808594},
{336.69967651367, -1651.8778076172, 787.15704345703},
{949.07312011719, -1665.2944335938, 717.75024414063},
{1847.9370117188, -2189.2109375, 787.32629394531},
}
function tamanhas( tables )
  local count = 0
  for a in pairs( tables ) do
    count = count + 1
  end
  return count
end    

local zikao = math.random(tamanhas(spawnPositions))
                  setElementPosition (player , spawnPositions[zikao][1],spawnPositions[zikao][2],spawnPositions[zikao][3]  )
                  guiSetVisible ( fundo1, false )
                   showCursor ( false )
                                   
            end
         end
)

addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
        function ( )
            if (source == sanfierro) then       --SPAWN SF--
            local player = getLocalPlayer()

local spawnPositions = {
{-2324.955078125, 831.47149658203, 658.47210693359},
{-2054.3369140625, 225.01008605957, 782.77520751953},
{-2809.5341796875, -220.92073059082, 782.66387939453},
}

function tamanhas( tables )
  local count = 0
  for a in pairs( tables ) do
    count = count + 1
  end
  return count
end    

local zikao = math.random(tamanhas(spawnPositions))
                  setElementPosition (player , spawnPositions[zikao][1],spawnPositions[zikao][2],spawnPositions[zikao][3]  )   -------lv
                  guiSetVisible ( fundo1, false )
                   showCursor ( false )
            end
         end
)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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