Jump to content

[DUDA] Spawn


DuFraN

Recommended Posts

Posted

Hola, que puedo hacer para que cuando un player de determinado team muera spawneé en el barrio de su gang, osea lo que digo es que por ejemplo cuando un balla muera aparesa en su barrio y cuando un grove muera haga lo mismo. ¿Que funcion debo usar?.

Posted
createTeam  
setTimer 
spawnPlayer 
setElementFrozen 
addEventHandler 
onPlayerSpawn 
  
isObjectInACLGroup ("user."..accName, aclGetGroup ( " ACL  " ) )  
accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
  

no se me ocurre mas perdon :c

Posted

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:

Posted
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) 

Posted
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.

Posted
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

Posted

Claro que es obligatorio que vallan los "end", Lo que le di fue una idea, puede tomar la mía o la tuya. Como el quiera...

y lo de "thePlayer" Ni en - Debugscript y consola, no me tira error.. Bueno ya hay que dejar esto así, ya que lo soluciono.

Y para que no se considere spam :S

  • Recently Browsing   0 members

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