yaver123 Posted May 3, 2012 Share Posted May 3, 2012 Hola ise este script que me paso un chico de aca de foro y no anda que es lo que salio mal o lo que falta para que anda quiero cambiar el connect de los users y que aparesca a la derecha function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, left, top, clip, wordbreak, postGUI) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font ) ax = ax + w color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end last = e + 1 s, e, cap, col = str:find( pat, last ) end if last <= #str then cap = str:sub( last ) local w = dxGetTextWidth( cap, scale, font ) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font, left, top, clip, wordbreak, postGUI ) end end local messageJoin = "" local messageQuit = "" function renderPlayerJoined ( ) dxDrawColorText("* ".. messageJoin,504.0,4.0,574.0,20.0,tocolor(200,0,0,255),0.7,"sans","left","top",false,false,false) end function renderPlayerLeft ( ) dxDrawColorText("* ".. messageQuit,503.0,16.0,573.0,32.0,tocolor(0,0,255,170),0.7,"sans","left","top",false,false,false) end addEventHandler('onClientPlayerJoin', root, function() messageJoin = getPlayerName(source) .. " #ffffffa entrado al servidor." addEventHandler ( "onClientRender", root, renderPlayerJoined ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, renderPlayerJoined ) end ,6000,1 ) end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) outputChatBox('* ' .. oldNick .. ' #ffffffis now known as ' .. newNick, 255, 100, 100) end ) addEventHandler('onClientPlayerQuit', root, function(reason) messageQuit = getPlayerName(source) .. " #ffffffa salido del server [" .. reason .. "]" addEventHandler ( "onClientRender", root, renderPlayerLeft ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, renderPlayerLeft ) end ,6000,1 ) end ) y el meta es "fisker" version="1.0.0" type="script" name="redirect" description="c" /> Link to comment
Arsilex Posted May 3, 2012 Share Posted May 3, 2012 lo primero no lo iciste tu y lo segundo lo tengo yo me va perfecto y lo de cambiarlo tienes que cambiar las coordenadas de el dxDrawColoreText que aun no lo averigue donde aver si me dice elmota donde es Link to comment
yaver123 Posted May 3, 2012 Author Share Posted May 3, 2012 PRIMERO LEE ARRIBA DIJE Hola ise este script que me paso un chico de aca de foro y no anda QUE ME PASO UN CHICO YO SOLO ISE LO DEL META MEN OTRA COSA NO ANDA ENTRA UN USER Y NO APARECE NADA ... Link to comment
Alexs Posted May 3, 2012 Share Posted May 3, 2012 OT: Pero yo lo lei antes y decia "hice este script" Ahhhh, y quiza sea que lo copiaste de un tema donde ya andaba mal, buscalo de donde salio o quien "te lo paso" Link to comment
Arsilex Posted May 3, 2012 Share Posted May 3, 2012 pos a mi me anda a la perfecion no se que abras echo mal Link to comment
Recommended Posts