Julian09123 Posted January 19, 2013 Share Posted January 19, 2013 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
iFoReX Posted January 19, 2013 Share Posted January 19, 2013 pon /debugscript 3 y ve si tiene algun problema Link to comment
NodZen Posted January 19, 2013 Share Posted January 19, 2013 dxDrawRectangle , crea un rectangulo en la pantalla del jugador, No en el mapa. Link to comment
FraN-724 Posted January 19, 2013 Share Posted January 19, 2013 Si quieres crear un cuadrado en el mapa usa createRadarArea Link to comment
Julian09123 Posted January 19, 2013 Author Share Posted January 19, 2013 http://oi46.tinypic.com/mvq5n6.jpg eso aparece cuando pongo /debugscript 3 Link to comment
Xperia Posted January 19, 2013 Share Posted January 19, 2013 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
Julian09123 Posted January 19, 2013 Author Share Posted January 19, 2013 ahora dice Error http://oi50.tinypic.com/hre9th.jpg Link to comment
Xperia Posted January 19, 2013 Share Posted January 19, 2013 Pon el script en server, en el meta. Link to comment
Julian09123 Posted January 19, 2013 Author Share Posted January 19, 2013 asi Server <meta> <info author="Julian^" type="script" name="Loc" version="1.3" /> <script src="Server.lua" type="server" /> </meta> Link to comment
Xperia Posted January 19, 2013 Share Posted January 19, 2013 ¿Y estas seguro de que tu archivo de llama server?Si no es asi, cambialo, porque en el debugscript sale que se llama client. Link to comment
Julian09123 Posted January 19, 2013 Author Share Posted January 19, 2013 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
Xperia Posted January 19, 2013 Share Posted January 19, 2013 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
Julian09123 Posted January 19, 2013 Author Share Posted January 19, 2013 No tampoco Ya deja no se solucionara no importa Link to comment
Alexs Posted January 19, 2013 Share Posted January 19, 2013 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
Recommended Posts