Jump to content

Ayuda


ELmarcoS.

Recommended Posts

Hola tengo un problema con este script, que spawnea al jugador cuando muere a una base que cree con unos amigos, estoy usando el spawn menu de 50p y tengo 2 opciones para elegir hasta ahora, civilian y umbrella corporation, el problema es que al elegir umbrella cuando el jugador muere lo spawnea a la base de los civilians, quiero saber como hago para que el script vea en que equipo está el jugador y si está en umbrella lo spawnee al morir a las coordenadas que yo ponga, acá les dejo lo que tengo:

addEventHandler("onPlayerWasted", getRootElement(), 
function() 
spawnPlayer (source, 312.30529785156, -2040.5495605469, 2.4078125953674, 90, getElementModel ( source )) 
fadeCamera (source, true) 
    setCameraTarget (source, source) 
end 
) 

Gracias.

Link to comment

Esto estaría bien?

addEventHandler("onPlayerWasted", getRootElement(), 
function(source) 
local civilian = getTeamFromName ( "Civilian" ) 
if ( civilian ) then 
spawnPlayer (source, 312.30529785156, -2040.5495605469, 2.4078125953674, 90, getElementModel ( source )) 
local umbrella = getTeamFromName ( "Umbrella Corporation" ) 
if ( umbrella ) then 
spawnPlayer (source, 245.29811096191, 1859.5770263672, 14.084012985229, 180, getElementModel ( source )) 
fadeCamera (source, true) 
    setCameraTarget (source, source) 
end 
) 

Link to comment
addEventHandler("onPlayerWasted", getRootElement(), 
function(source) 
if (getTeamName(getPlayerTeam()) == "Civilian") then 
spawnPlayer (source, 312.30529785156, -2040.5495605469, 2.4078125953674, 90, getElementModel ( source )) 
fadeCamera (source, true) 
    setCameraTarget (source, source) 
end 
) 
  
addEventHandler ("onPlayerWasted", getRootElement(), 
function spawnOnDie(source) 
if (getTeamName(getPlayerTeam()) == "Umbrella Corporation") then 
spawnPlayer (source, 245.29811096191, 1859.5770263672, 14.084012985229, 180, getElementModel ( source )) 
fadeCamera (source, true) 
    setCameraTarget (source, source) 
end 
) 

hize esto pero creo que está mal porque al morir la pantalla queda en negro D:

Link to comment
addEventHandler ( "onPlayerWasted", getRootElement(), 
    function ( ) 
        if ( getPlayerTeam ( source ) ) then 
            if ( getTeamName ( getPlayerTeam ( source ) ) == "Civilian" ) then 
                spawnPlayer ( source, 312.30529785156, -2040.5495605469, 2.4078125953674, 90, getElementModel ( source ) ) 
            elseif ( getTeamName ( getPlayerTeam ( source ) ) == "Umbrella Corporation" ) then 
                spawnPlayer ( source, 245.29811096191, 1859.5770263672, 14.084012985229, 180, getElementModel ( source ) ) 
            end 
            fadeCamera ( source, true ) 
            setCameraTarget ( source, source ) 
        end 
    end 
) 

Link to comment
  • Recently Browsing   0 members

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