Jump to content

[DUDA] Spawn


DuFraN

Recommended Posts

tienes que hacer una función que defina. Un jugador en un "Equipo" - al morir aparezca en un lugar en especifico. podrías usar esto.

function funcion(source) 
if getElementType( thePlayer ) == 'player' then 
local equipo = getTeamFromName ( "Escribe el equipo aqui" ) 
local Team = getPlayerTeam ( source ) 
if (Team) == equipo then 
spawnPlayer (source, x, y, z, rotacion, skinID) 
addEventHandler ( "onPlayerWasted", getRootElement(), funcion ) 

Espero que te ayude. :fadein:

EDIT: Claro que tienes que cambiar todo lo de "spawnPlayer" (source, x, y, z, rotacion, skinID)

Solo aclaro, me gusta aclarar las cosas :wink:

Link to comment
posiciones = { 
            "NoTeam" = {560, 0, 5},--Solo cambia las coordenadas entre los parentesis 
            "Ballas" = {0, 0, 5}, 
            "Vagos" = {50, 0, 5}, 
            } 
             
             
function spawn() 
    team = getPlayerTeam ( source ) 
    if team then 
        name = getTeamName ( team ) 
        if name then 
            x, y, z = unpack(posiciones[name]) 
            spawnPlayer ( source, x, y, z ) 
        end 
    else 
        x, y, z = unpack(posiciones["NoTeam"]) 
        spawnPlayer ( source, x, y, z ) 
    end 
end 
addEventHandler ( "onPlayerWasted", getRootElement(), spawn) 

Link to comment
tienes que hacer una función que defina. Un jugador en un "Equipo" - al morir aparezca en un lugar en especifico. podrías usar esto.
function funcion(source) 
if getElementType( thePlayer ) == 'player' then 
local equipo = getTeamFromName ( "Escribe el equipo aqui" ) 
local Team = getPlayerTeam ( source ) 
if (Team) == equipo then 
spawnPlayer (source, x, y, z, rotacion, skinID) 
addEventHandler ( "onPlayerWasted", getRootElement(), funcion ) 

Espero que te ayude. :fadein:

EDIT: Claro que tienes que cambiar todo lo de "spawnPlayer" (source, x, y, z, rotacion, skinID)

Solo aclaro, me gusta aclarar las cosas :wink:

thePlayer no esta definido.

Link to comment
tienes que hacer una función que defina. Un jugador en un "Equipo" - al morir aparezca en un lugar en especifico. podrías usar esto.
function funcion(source) 
if getElementType( thePlayer ) == 'player' then 
local equipo = getTeamFromName ( "Escribe el equipo aqui" ) 
local Team = getPlayerTeam ( source ) 
if (Team) == equipo then 
spawnPlayer (source, x, y, z, rotacion, skinID) 
addEventHandler ( "onPlayerWasted", getRootElement(), funcion ) 

Espero que te ayude. :fadein:

EDIT: Claro que tienes que cambiar todo lo de "spawnPlayer" (source, x, y, z, rotacion, skinID)

Solo aclaro, me gusta aclarar las cosas :wink:

thePlayer no esta definido.

Ami me sirve perfecto. :S

Link to comment
  • Recently Browsing   0 members

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