exelomax Posted March 28, 2015 Posted March 28, 2015 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
Castillo Posted March 28, 2015 Posted March 28, 2015 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.
exelomax Posted March 28, 2015 Author Posted March 28, 2015 (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 March 28, 2015 by Guest
Castillo Posted March 28, 2015 Posted March 28, 2015 Es "thePlayer" no "theplayer", fijate bien que este correctamente escrito, con mayusculas y minusculas. Y te dije "root" no "getrootelement".
exelomax Posted March 28, 2015 Author Posted March 28, 2015 me confundi con otro comando ahora pruebo y te confirmo
exelomax Posted March 28, 2015 Author Posted March 28, 2015 no amigo se transporta pero en el chat no dice nada
exelomax Posted March 28, 2015 Author Posted March 28, 2015 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
Castillo Posted March 28, 2015 Posted March 28, 2015 Es "outputChatBox" no "OutputChatBox" Te dije que tengas cuidado al escribir los nombres de las funciones.
exelomax Posted March 28, 2015 Author Posted March 28, 2015 eso lo cambie ahora como no me andaba . fijate en el primero lo escribi bien pero tampoco me anda . gracias amig por ayudarme
Castillo Posted March 28, 2015 Posted March 28, 2015 Postea el nuevo codigo con el error que mencione anteriormente arreglado.
exelomax Posted March 28, 2015 Author Posted March 28, 2015 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
Recommended Posts