Jump to content

Help with code.


nowofresh

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...