Jump to content

ayuda Location


Julian09123

Recommended Posts

Hola quisiera saver que error tiene? osea se activa en la consola no tiene fallos

pero pongo /loc y nada que me falta?

no anda

Client

function crearCuadrado() 
    dxDrawRectangle(195.0,734.0,955.0,33.0,tocolor(0,0,0,150),false) 
end 
addEventHandler("onClientRender",root,crearCuadrado) 
function playerloc ( source ) 
    local playername = getPlayerName ( source ) 
    local location = getElementZoneName ( source ) 
    outputChatBox ( "* " .. playername .. "'s Location: " .. location, getRootElement(), 0, 255, 255 )  
end 
addCommandHandler ( "loc", playerloc ) 

Link to comment
function crearCuadrado() 
    dxDrawRectangle(195.0,734.0,955.0,33.0,tocolor(0,0,0,150),false) 
end 
addEventHandler("onClientRender",root,crearCuadrado) 
function playerloc ( source ) 
    local playername = getPlayerName(getLocalPlayer()) 
    local location = getElementZoneName ( getLocalPlayer()) 
    outputChatBox ( "* " .. playername .. "'s Location: " .. location, getRootElement(), 0, 255, 255 ) 
end 
addCommandHandler ( "loc", playerloc ) 

Prueba eso.

Link to comment

si se llama server

meta:

<meta> 
<info author="Julian^" type="script" name="Loc" version="1.3" /> 
  
<script src="Server.lua" type="server" /> 
</meta> 

ahora lo pruebo y no dice nada no dice error ni nada

pero no aparece la loc

Server:

function crearCuadrado() 
    dxDrawRectangle(195.0,734.0,955.0,33.0,tocolor(0,0,0,150),false) 
end 
addEventHandler("onClientRender",root,crearCuadrado) 
function playerloc ( source ) 
    local playername = getPlayerName(getLocalPlayer()) 
    local location = getElementZoneName ( getLocalPlayer()) 
    outputChatBox ( "* " .. playername .. "'s Location: " .. location, getRootElement(), 0, 255, 255 ) 
end 
addCommandHandler ( "loc", playerloc ) 

Link to comment

Prueba esto:

function crearCuadrado() 
    dxDrawRectangle(195.0,734.0,955.0,33.0,tocolor(0,0,0,150),false) 
end 
addEventHandler("onClientRender",root,crearCuadrado) 
function playerloc ( source ) 
    local playername = getPlayerName(getLocalPlayer()) 
    local location = getElementZoneName ( source ) 
    outputChatBox ( "* " .. playername .. "'s Location: " .. location, getRootElement(), 0, 255, 255 ) 
end 
addCommandHandler ( "loc", playerloc ) 

Link to comment
function crearCuadrado() 
    dxDrawRectangle(195.0,734.0,955.0,33.0,tocolor(0,0,0,150),false) 
end 
addEventHandler("onClientRender",root,crearCuadrado) 
  
function playerloc (  ) 
    local playername = getPlayerName ( localPlayer ) 
    local x, y, z = getElementPosition (localPlayer ) 
    local location = getZoneName ( x, y, z ) 
    outputChatBox ( "*" .. playername .. "'s Location: " .. location,  0, 255, 255 )  
end 
addCommandHandler ( "loc", playerloc ) 

No mostrara la posición a todos, Si quieres eso tendrás que hacer un archivo en server side que contenga esto:

function playerloc ( source ) 
    local playername = getPlayerName ( source) 
    local location = getElementZoneName ( source ) 
    outputChatBox ( "*" .. playername .. "'s Location: " .. location, root,  0, 255, 255 )  
end 
addCommandHandler ( "loc", playerloc ) 

Link to comment
  • Recently Browsing   0 members

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