Jump to content

[Ayuda] Con Locacion en tab


Julian09123

Recommended Posts

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

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

Usa:

getZoneName 

su cuarto argumento es un boolean que dice la ciudad, Para agregarlo a la scoreboard, utiliza la función exportada:

'scoreboardAddColumn'.

Developer @ MYVAL

Posted
function resetearColumna(jugador,columna,elemento) 
setElementData(jugador,columna,elemento) 
end 

Para que crear esa funcion?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Eso es porque "source" no existe.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Podrias crearlo client side, y usar localPlayer.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Proba cambiando "source".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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 

Skype: Juliang09123

Posted

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) 

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

ahora si Pero Me queda Gigante porq los nombres son muy grandes entonces Yo quiero Poner donde esta osea LS SF O Lv

las aventuras san fierro y los santos

Skype: Juliang09123

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

De nada.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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