AzulBananaFosco Posted July 1, 2013 Share Posted July 1, 2013 how do I go when the player types / info open the information panel? I know it uses more addcommandhandler not to know the rest: ( Link to comment
iPrestege Posted July 1, 2013 Share Posted July 1, 2013 addCommandHandler guiSetVisible Ex : addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ); end ); Link to comment
AzulBananaFosco Posted July 1, 2013 Author Share Posted July 1, 2013 failed the code is right? local x, y = guiGetScreenSize ( ) local player = getLocalPlayer() --Define el color de tu team aquà en R,G,B CR,CG,CB = 0,255,255 --Define el color de tu team en HEX hexTeamColor = "#00ffff" -- alphaDefaul=200 teamColor = tocolor ( CR, CG, CB, alphaDefaul ) -- mute = "#00ff00*#ffffff" kick = "#ffff00**#ffffff" ban = "#ff0000***#ffffff" -- mapper = "#00ff00*#ffffff" scripter = "#ffff00*#ffffff" leader = "#ff0000*#ffffff" owner = "#0000ff*#ffffff" -- ----------- --Español-- ----------- btMessES = "Panel de Informacion" --Reglas ReglasES = "Reglas" reglasListES = mute.."NO hacer publicidad. \n".. (mute.."NO insultar a los administradores o moderadores. \n").. (ban.."NO usar hack.\n").. (kick.."Respetar a los demas jugadores.\n").. (mute.."NO pedir mapas.\n").. (mute.."NO pedir 'Test'.\n").. (ban.."NO usar el TAG de el team sin autorizacion.\n").. (mute.."NO publicar IP de otros servidores.\n").. (kick.."NO usar binds repetitivamente.\n").. (ban.."NO usar una falsa identidad.\n") --Team TeamES = "Equipo" teamLevelES = mapper.."Mapper "..scripter.."Scripter "..leader.."Lider "..owner.."Fundadores" --Server ServerES = "Servidor" infoServerES = hexTeamColor.."Informacion sobre el Servidor#ffffff\n".. (" \n").. (" \n").. (" \n").. (" \n").. ("\n").. (hexTeamColor.."Desarrollo del Servidor#ffffff\n").. (" \n").. (" \n").. (" \n") infoScripterES = "¿Necesitas Scripter? Contactame a mi Skype: geek1997" ----------- --English-- ----------- btMessEN = "Information Panel" --Reglas ReglasEN = "Rules" reglasListEN = mute.."NO advertising. \n".. (mute.."NOT insult the administrators or moderators. \n").. (ban.."DO NOT use hack.\n").. (kick.."Respect other players.\n").. (mute.."NO ask for maps.\n").. (mute.."NO ask for 'Test'.\n").. (ban.."NO TAG team use without permission.\n").. (mute.."NO other servers IP post.\n").. (kick.."NO binds repeatedly use.\n").. (ban.."DO NOT use a false identity.\n") --Team TeamEN = "Team" teamLevelEN = mapper.."Mapper "..scripter.."Scripter "..leader.."Leader "..owner.."Owner" --Server ServerEN = "Server" infoServerEN = hexTeamColor.."Server Information#ffffff\n".. ("\n").. ("\n").. ("\n").. ("\n").. ("\n").. (hexTeamColor.."Development server#ffffff\n").. (" \n").. (" \n").. ("\n") infoScripterEN = "Need Scripter? Contact me at my Skype: geek1997" --------------------- --Variables default-- --------------------- btMess = btMessES --Reglas-- Reglas = ReglasES reglasList = reglasListES reglasLevel = mute.."Mute "..kick.."Kick "..ban.."Ban" --Team-- Team = TeamES teamList1 = "Olkase "..mapper..leader.."\n".. ("Player2 \n").. ("Player3 \n").. ("Player4 \n").. ("Player5 \n").. (" \n").. (" \n").. (" \n").. (" \n").. (" \n") teamList2 = "Player6 \n".. ("Player7 \n").. ("Player8 \n").. ("Player9 \n").. (" \n").. (" \n").. (" \n").. (" \n").. (" \n").. (" \n") teamLevel = teamLevelES --Server-- Server = ServerES infoServer = infoServerES infoScripter = infoScripterES --Color Down Bar-- rR,gR,bR = 0,0,0 rT,gT,bT = 0,0,0 rS,gS,bS = 0,0,0 alphaR = 200 alphaT = 200 alphaS = 200 function main(key, keyState) showCursor(true) removeEventHandler("onClientRender", getRootElement(), contenido) removeEventHandler("onClientRender", getRootElement(), window) removeEventHandler("onClientRender", getRootElement(), contReglas) removeEventHandler("onClientRender", getRootElement(), contTeam) removeEventHandler("onClientRender", getRootElement(), contServer) start = getTickCount() addEventHandler ( "onClientRender", getRootElement(), window ) setTimer ( function() guiIdiomas() guiContenido() addEventHandler ( "onClientRender", getRootElement(), contenido ) addEventHandler ( "onClientRender", getRootElement(), contReglas ) end, 1500, 1 ) end addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ); end ); function guiIdiomas() ancho = 600 alto = 520 midAncho = ancho/2 midAlto = alto/2 medX = x/2 medY = y/2 cantBot = 2 botScale = 20 botSpace = (botScale*cantBot)+(5*cantBot) alphaEs = 100 alphaEn = 100 alphaQuit = 200 es = guiCreateButton(medX+midAncho-botSpace, medY-midAlto+5, botScale, botScale, "EN", false) addEventHandler("onClientGUIClick",es,onClickES) addEventHandler( "onClientMouseEnter",es,onEnterES) addEventHandler("onClientMouseLeave",es,onLeaveES) en = guiCreateButton(medX+midAncho-botSpace+botScale+5, medY-midAlto+5, botScale, botScale, "ES", false) addEventHandler("onClientGUIClick",en,onClickEN) addEventHandler( "onClientMouseEnter",en,onEnterEN) addEventHandler("onClientMouseLeave",en,onLeaveEN) quit = guiCreateButton(medX+midAncho-botSpace+botScale+5, medY-midAlto-25, 25, 25, "Quit", false) addEventHandler("onClientGUIClick",quit,onClickQuit) addEventHandler( "onClientMouseEnter",quit,onEnterQuit) addEventHandler("onClientMouseLeave",quit,onLeaveQuit) guiSetAlpha(en, 0) guiSetAlpha(es, 0) guiSetAlpha(quit, 0) end function guiContenido() sizeX = ancho/3 sizeY = 40 mitSize = sizeX*0.5 botX = medX-mitSize botY = medY+midAlto-sizeY reglas = guiCreateButton(botX-sizeX , botY, sizeX, sizeY, "Reglas", false) addEventHandler("onClientGUIClick",reglas,onClickReglas) addEventHandler( "onClientMouseEnter",reglas,onEnterReglas) addEventHandler("onClientMouseLeave",reglas,onLeaveReglas) team = guiCreateButton(botX, botY, sizeX, sizeY, "Equipo", false) addEventHandler("onClientGUIClick",team,onClickTeam) addEventHandler( "onClientMouseEnter",team,onEnterTeam) addEventHandler("onClientMouseLeave",team,onLeaveTeam) server = guiCreateButton(botX+sizeX, botY, sizeX, sizeY, "Servidor", false) addEventHandler("onClientGUIClick",server,onClickServer) addEventHandler( "onClientMouseEnter",server,onEnterServer) addEventHandler("onClientMouseLeave",server,onLeaveServer) guiSetAlpha(reglas, 0) guiSetAlpha(team, 0) guiSetAlpha(server, 0) end function window() ancho = 600 alto = 520 btAncho = 600 btAlto = 25 local now = getTickCount() local elapsedTime = now - start local endTime = start + 1500 local duration = endTime - start local progress = elapsedTime / duration local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, "OutBounce") local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, 200, progress, "OutBounce") posx = (x/2)-(x1/2) posy = Link to comment
mcer Posted July 1, 2013 Share Posted July 1, 2013 WTF?? addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ); end ); Use it (Don't add " ; " ). addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ) end ) Link to comment
iPrestege Posted July 1, 2013 Share Posted July 1, 2013 WTF?? addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ); end ); Use it (Don't add " ; " ). addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ) end ) Do you think this is problem? Tell me why. Link to comment
mcer Posted July 1, 2013 Share Posted July 1, 2013 (edited) WTF?? addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ); end ); Use it (Don't add " ; " ). addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ) end ) Do you think this is problem? Tell me why. As far as I know in scripts can not be used ";" I've never seen a mta script that uses the ";". Edited July 1, 2013 by Guest Link to comment
iPrestege Posted July 1, 2013 Share Posted July 1, 2013 WTF?? addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ); end ); Use it (Don't add " ; " ). addCommandHandler('info', function ( ) guiSetVisible ( gElement,true ) end ) Do you think this is problem? Tell me why. As far as I know in scripts can not be used "" I've never seen a mta script that uses the ";". Doesn't matter it'll work anyways . Link to comment
AzulBananaFosco Posted July 1, 2013 Author Share Posted July 1, 2013 How would the code to open the panel / info? Help me? and I'm sorry for bugging Link to comment
iMr.3a[Z]eF Posted July 1, 2013 Share Posted July 1, 2013 addCommandHandler('info', -- the command for open the window function ( ) guiSetVisible ( gElement,true ); -- gElement = the window end ); Link to comment
AzulBananaFosco Posted July 1, 2013 Author Share Posted July 1, 2013 addCommandHandler ( 'info' , function ( ) guiSetVisible ( btMessES, true ) end ) ???? Link to comment
iMr.3a[Z]eF Posted July 1, 2013 Share Posted July 1, 2013 ex: local wnd = guiCreateWindow ( 0, 0, 0.5, 0.4, "Information", true ) addCommandHandler('info', -- the command for open the window function ( ) guiSetVisible ( wnd,true ); -- gElement = the window end ); wnd = the window that you made it. Link to comment
AzulBananaFosco Posted July 1, 2013 Author Share Posted July 1, 2013 ok 'to taking but where did you get this wnd? Link to comment
AzulBananaFosco Posted July 1, 2013 Author Share Posted July 1, 2013 yes' have skype? Link to comment
iMr.3a[Z]eF Posted July 1, 2013 Share Posted July 1, 2013 nope write the whole script you made if its private you can connect me at private MSG Link to comment
AzulBananaFosco Posted July 1, 2013 Author Share Posted July 1, 2013 if I use the one you gave me when players enter / info will appear? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now