Jump to content

[Ayuda] Con Locacion en tab


Julian09123

Recommended Posts

exports.scoreboard:scoreboardAddColumn("lugar") 
  
function julianEsGay() 
local x,y,z = getElementPosition(source) 
local lugar = getZoneName(x,y,z) 
resetearColumna(source,"lugar",lugar) 
end 
  
setTimer(function() 
julianEsGay() 
end,1000,0) 
  
  
function resetearColumna(jugador,columna,elemento) 
setElementData(jugador,columna,elemento) 
end 

proba asi la hice a la rapida postea si hay algun error :P

PD : estaba tan aburrido que te hice una funcion xDD

Edited by Guest
Link to comment
exports.scoreboard:scoreboardAddColumn("lugar") 
  
function Lugar() 
local x,y,z = getElementPosition(localplayer) 
local lugar = getZoneName(x,y,z) 
resetearColumna(source,"lugar",lugar) 
end 
  
setTimer(function() 
Lugar() 
end,1000,0) 
  
  
function resetearColumna(jugador,columna,elemento) 
setElementData(jugador,columna,elemento) 
end 

Link to comment

Proba asi

sv-side

exports.scoreboard:scoreboardAddColumn("lugar") 

cl-side

  
function Lugar() 
local x,y,z = getElementPosition(getLocalPlayer()) 
local lugar = getZoneName(x,y,z) 
resetearColumna(getLocalPlayer(),"lugar",lugar) 
end 
  
setTimer(function() 
Lugar() 
end,1000,0) 
  
  
function resetearColumna(jugador,columna,elemento) 
setElementData(jugador,columna,elemento,true) 

Link to comment
local cityTags = 
    { 
        [ "Los Santos" ] = "LS", 
        [ "Las Venturas" ] = "LV", 
        [ "San Fierro" ] = "SF" 
    } 
  
function updateLocation ( ) 
    local x, y, z = getElementPosition ( localPlayer ) 
    local city = getZoneName ( x, y, z, true ) 
    setElementData ( localPlayer, "lugar", cityTags [ city ] or "N/A" ) 
end 
setTimer ( updateLocation, 1000, 0 ) 

Link to comment
  • Recently Browsing   0 members

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