Jump to content

(AYUDA) Porque el mensaje no aparece en el chat


exelomax

Recommended Posts

Posted

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 
  

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

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

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
Posted

Es "thePlayer" no "theplayer", fijate bien que este correctamente escrito, con mayusculas y minusculas.

Y te dije "root" no "getrootelement".

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

Postea el nuevo codigo completo.

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

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

Posted

Es "outputChatBox" no "OutputChatBox"

Te dije que tengas cuidado al escribir los nombres de las funciones.

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

Postea el nuevo codigo con el error que mencione anteriormente arreglado.

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

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 
  

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