nowofresh Posted December 30, 2010 Share Posted December 30, 2010 function displaylogo( ) local xs,ys=guiGetScreenSize() guiCreateStaticImage( 0, 0, xs, ys, "engine_player/img/pic/pokazlogo.png", false ) setTimer ( przyciski, 50, 1 ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), displaylogo ) function lang ( ) pol = { [1]="Witaj",[2]="Nazwa" } ang = { [1]="Y're welcome",[2]="Username" } ger = {} end function przyciski ( ) dxDrawRectangle(354.0,351.0,343.0,145.0,tocolor(0,255,255,150),false) buttonpl = guiCreateButton( 354.0,351.0,343.0,145.0, "Polski", true ) buttoneng = guiCreateButton( 354.0,351.0,343.0,145.0, "English", true ) buttonger = guiCreateButton( 354.0,351.0,343.0,145.0, "Germany", true ) end addEventHandler ( "onClientGUIClick", buttonpl, function ( ) setElementData(source,"pl") end , false ) addEventHandler ( "onClientGUIClick", buttonang, function ( ) setElementData(source,"ang") end , false ) addEventHandler ( "onClientGUIClick", buttonger, function ( ) setElementData(source,"ger") end , false ) function dalej ( ) fadeCamera(true) setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) dxDrawRectangle(354.0,351.0,343.0,145.0,tocolor(0,255,255,150),false) getElementData(source,jezyk) if jezyk == "pl" then setElementData(source,haspl) end if jezyk == "ang" then setElementData(source,hasang) end if jezyk == "ger" then setElementData(source,gasger) end end addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() ), startcamera) function okno ( ) dxDrawText ( function ( ) getElementData(source,wybrany) if wybrany == "haspl" then pol[1] end end , x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) end What is a bad ? Link to comment
Castillo Posted December 30, 2010 Share Posted December 30, 2010 Your code doesn't makes any sense, debug it. Link to comment
MCvarial Posted December 30, 2010 Share Posted December 30, 2010 The least you could do is write your code in english. Link to comment
nowofresh Posted December 30, 2010 Author Share Posted December 30, 2010 Your code doesn't makes any sense, debug it. Why ? get player lang ----------------- generate text with lang who was got ----------------- Link to comment
nowofresh Posted December 30, 2010 Author Share Posted December 30, 2010 And... Can i make # addEventHandler ( "onClientGUIClick", buttonpl, # function ( ) # setElementData(source,"pl") # end # , false ) create function ( ) in event ? Link to comment
Castillo Posted December 30, 2010 Share Posted December 30, 2010 lot of errors in debug script, something really weird: function okno ( ) dxDrawText ( function ( ) getElementData(source,wybrany) if wybrany == "haspl" then pol[1] end end , x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) end wtf? create a function with dxDrawText? its obiusly that you don't understand how this stuff works, i recommend getting back into wiki. Link to comment
nowofresh Posted December 30, 2010 Author Share Posted December 30, 2010 No, why ? Computer must calcule valvue. Link to comment
Castillo Posted December 31, 2010 Share Posted December 31, 2010 I don't know what are you saying now, i will stop posting here. 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