Jump to content

Spaw


Recommended Posts

no no no... perdonen la molestia...

ya aprendi..

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        resetMapInfo() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
function spawn(player) 
    if not isElement(player) then return end 
    repeat until spawnPlayer ( player, 2037.70996+math.random(0,0), 1543.10693+math.random(0,0), 10.67188, 0, math.random(9,288), 0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 

Pero con un problema... Aora Como desactivo Los demas spaw que bienen por defaul?

Link to comment
no no no... perdonen la molestia...

ya aprendi..

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        resetMapInfo() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
function spawn(player) 
    if not isElement(player) then return end 
    repeat until spawnPlayer ( player, 2037.70996+math.random(0,0), 1543.10693+math.random(0,0), 10.67188, 0, math.random(9,288), 0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 

Pero con un problema... Aora Como desactivo Los demas spaw que bienen por defaul? o simplemente se quede espectando a otros jugadores.

Link to comment

Talvez sea el archivo .map del "play"... Borrá esto

    "ranch" posX="-711" posY="957" posZ="12.4" rotation="90">
    "pirate" posX="2005" posY="1543" posZ="13.5" rotX="270">
    "grove" posX="2485" posY="-1667" posZ="13.3" rotX="0">
    "hill" posX="-2405" posY="-598" posZ="132.6" rotX="128">
Link to comment
  • 3 weeks later...
Talvez sea el archivo .map del "play"... Borrá esto

    "ranch" posX="-711" posY="957" posZ="12.4" rotation="90">
    "pirate" posX="2005" posY="1543" posZ="13.5" rotX="270">
    "grove" posX="2485" posY="-1667" posZ="13.3" rotX="0">
    "hill" posX="-2405" posY="-598" posZ="132.6" rotX="128">

Gracias :D

Link to comment
  • Recently Browsing   0 members

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