Jump to content

(AYUDA) Porque el mensaje no aparece en el chat


exelomax

Recommended Posts

puse un teleport y cuando lo uso quiero que aparezca en el chat a donde fui pero no sale

-----by_EXE 
  
  
function teletransporte ( thePlayer ) 
    local theElement = ( isPedInVehicle ( thePlayer ) and getPedOccupiedVehicle ( thePlayer ) or thePlayer ) 
    setElementPosition ( theElement, -1683.3970947266, -246.03791809082, 14.1484375 ) --x,y,z posicion a donde 
    -- 
        local name = getPlayerName(source) 
        outputChatBox("#04ff00El jugador"..name.."#04ff00se fua al picodromo (#00ff00/pico#ffffff)", source, 255, 255, 255, true) --chat 
end 
addCommandHandler ( "pico", teletransporte ) --comando a utilizar 
  

Link to comment
local name = getPlayerName(source) 
        outputChatBox("#04ff00El jugador"..name.."#04ff00se fua al picodromo (#00ff00/pico#ffffff)", source, 255, 255, 255, true) --chat 

No veo en ninguna parte la variable 'source', deberias estar usando 'thePlayer'.

Y en outputChatBox, cambia el 'source' por 'root', porque si no enviara el mensaje solamente al jugador que utilizo el comando, no a todo el servidor.

Link to comment

entonces modifico

local name = getPlayerName(theplayer) 
        outputChatBox("#04ff00El jugador"..name.."#04ff00se fua al picodromo (#00ff00/pico#ffffff)", getrootelement, 255, 255, 255, true) --chat 

decis asi

Edited by Guest
Link to comment

ok

-----by_EXE 
  
  
function tel ( thePlayer ) 
    local theElement = ( isPedInVehicle ( thePlayer ) and getPedOccupiedVehicle ( thePlayer ) or thePlayer ) 
    setElementPosition ( theElement, -1683.3970947266, -246.03791809082, 14.1484375 ) --x,y,z posicion a donde 
    -- 
        local name = getPlayerName(thePlayer) 
        OutputChatBox("#04ff00El jugador"..name.."#04ff00se fua al picodromo (#00ff00/pico#ffffff)", root, 255, 255, 255, true) --chat 
end 
addCommandHandler ( "pico", tel ) --comando a utilizar 
  

ese es todo

Link to comment

ya esta amigo ya anduvo . muchas gracias te debo una

-----by_EXE 
  
  
function tel ( thePlayer ) 
    local theElement = ( isPedInVehicle ( thePlayer ) and getPedOccupiedVehicle ( thePlayer ) or thePlayer ) 
    setElementPosition ( theElement, -1683.3970947266, -246.03791809082, 14.1484375 ) --x,y,z posicion a donde 
    -- 
        local name = getPlayerName(thePlayer) 
        outputChatBox("#04ff00El jugador " ..name.. " #04ff00se fua al picodromo #ffffff(FB2306/pico#ffffff)", root, 255, 255, 255, true) --chat 
end 
addCommandHandler ( "pico", tel ) --comando a utilizar 
  

Link to comment
  • Recently Browsing   0 members

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