Jump to content

Recommended Posts

  • Scripting Moderators
2 minutes ago, DABL said:

Yup, But I'd better give the idea to AhmadLy and he'll understand the idea, because he speaks the language I speak.

Let him contact me :D

4 minutes ago, DABL said:

Yup, But I'd better give the idea to AhmadLy and he'll understand the idea, because he speaks the language I speak.

Thanks for your support and advice ! DGS will get stronger !

Edited by thisdp
  • Like 1
  • Thanks 1
Link to comment
  • Scripting Moderators
Just now, DABL said:

@thisdp

I do not know if this idea exists in Dgs


dgsElementSetShadow

 This idea creates a shadow under element dgs.

dgsSetProperty(label,"shadow",{offsetx,offsety,color})

Link to comment
  • 2 weeks later...

How about to switch to a tab that has a function?

I tried:

            addEventHandler("onDgsTabPanelTabSelect", tabFinance, loadFinance)

but doesn't works. On wiki hasn't a description and I thought it will work. Can you help me?

 

And also cannot write on an edit.

Edited by illusion
  • Thanks 1
Link to comment
  • Scripting Moderators
2 hours ago, illusion said:

How about to switch to a tab that has a function?

I tried:


            addEventHandler("onDgsTabPanelTabSelect", tabFinance, loadFinance)

but doesn't works. On wiki hasn't a description and I thought it will work. Can you help me?

 

And also cannot write on an edit.

i will check it after 13 hours.

  • Like 1
Link to comment
  • Scripting Moderators
16 minutes ago, illusion said:

No, I don't want that. I want to switch a tab and trigger another window that will be created in that tab.

function onSelect()
end
 addEventHandler("onDgsTabPanelTabSelect", tabPanel, onSelect)
  • Thanks 1
Link to comment
  • 2 weeks later...
  • Scripting Moderators
9 hours ago, anchor said:

Reporting version 3.321, my dgs edit not rendering


got this error


ERROR: dgs\client.lua:539: attempt to index local 'eleData' (a nil value)  [DUP x72]

 

fixed ! Thanks for report. This issue caused by some unknown characters in scheme loader, when i rewrite the code in that line, I found the size of file 1 byte smaller than before.

  • Like 1
Link to comment
  • Scripting Moderators
2 hours ago, DABL said:

Is there a new version of new function?

These three months I am preparing my college entrance exam, update will be slow. DGS still has a long way to go.

Thanks for your supporting. :D

  • Like 2
Link to comment
  • 5 weeks later...
On 20.03.2018 at 01:11, thisdp said:

These three months I am preparing my college entrance exam, update will be slow. DGS still has a long way to go.

Thanks for your supporting. :D

your library is awesome! Keep it up xD

-- aaand 1 question: What is ellipce detect area and how can i use it? Maybe it's hard to understand for me because i'm not from english-speaking country.... i guess...

Edited by Juuve
Link to comment
  • Scripting Moderators
7 hours ago, Juuve said:

your library is awesome! Keep it up xD

-- aaand 1 question: What is ellipce detect area and how can i use it? Maybe it's hard to understand for me because i'm not from english-speaking country.... i guess...

Not because of this xd. If you have learned ellipse, it will be easy for you to use it.

ellipse equation: x^2/a^2 + y^2/b^2 = 1 (a≠b)

circle equation: x^2+y^2 = r^2

 

This is useful if you want to use an oval button and you don't want a square detecting area of the button.

Edited by thisdp
  • Like 2
Link to comment
  • Scripting Moderators
2 hours ago, anchor said:

i got this error on create a dgsDxCreateWindow

 

[2018-04-19 14:14:34] ERROR: dgs\Core\window.lua:32: attempt to index field 'closeButtonColor' (a nil value)

I was meeting with such an error, but I solved it by using "updatedgs" again.

Edited by thisdp
  • Like 1
Link to comment

i got a problem today. I use dgsImageSetImage to change image when i click on button. Then i click other button to destroy current image. Then i create video. I click on button again and video element destroys but now images change by themselves each 0.5 second without button clicking. I have no setTimer functions in my script - only dgsImageSetImage and onDgsMouseClick

i hope you everyone understood me xD

Edited by Juuve
  • Like 1
Link to comment
  • 3 weeks later...
  • Scripting Moderators

Hello Everyone.

DGS Discord Server is created:https://discord.gg/QEs8q6W

You can put forward your suggestions in the server.

Any news of dgs will be available in the server.

I am glad that you can join it.

Thanks for your support !

  • Like 2
Link to comment
  • 2 weeks later...

So after the Update i got these errors:

http://prntscr.com/jiedl1

 

Code:

local screenwidth, screenheight = guiGetScreenSize ()

function isWithinNightTime ()

    local time = getRealTime()
    local hour = time.hour
    if hour >= 20 or hour <= 8 then
        return true
    else
        return false
    end
end



function showVersionInfo ()


end

function SubmitPasswortLoginEdit(button)
    if button == "left" then
        if guiGetText ( Password ) == "******" then
            guiSetText ( Password, "" )
        end
    end
end

function guiShowLoginAgain_func ()
    guiSetVisible ( LoginWindow, true )
    guiSetText ( gEdit["passwort_login"], "" )
end
addEvent ( "guiShowLoginAgain", true )
addEventHandler ( "guiShowLoginAgain", getRootElement(), guiShowLoginAgain_func )

function SubmitEinloggenBtn(cmd, state)
	if state == "down" then
		source = getPlayerName(lp)
		local passwort = DGS:dgsDxGUIGetText( pw )
		triggerServerEvent ( "einloggen", lp, lp, hash ( "sha512", passwort ))
		local file = xmlLoadFile ( ":reallife_server/pw.xml" )
		if DGS:dgsDxRadioButtonGetSelected(pwSafeYes) == true then
			local psafe = xmlFindChild ( file, "pw", 0 )
			xmlNodeSetValue ( psafe, passwort  )
			xmlSaveFile ( file )
		end
		if DGS:dgsDxRadioButtonGetSelected(pwSafeNo) == true then
			local psafe = xmlFindChild ( file, "pw", 0 )
			xmlNodeSetValue ( psafe, nil  )
			xmlSaveFile ( file )
		end
	end
end


function _CreateLoginWindow()






    login = DGS:dgsDxCreateWindow(0.44, 0.41, 0.11, 0.18,"Login",true, nil,nil,nil,nil,nil,nil,nil, true)
    DGS:dgsDxWindowSetSizable(login,false)
    DGS:dgsDxWindowSetMovable(login,false)

    DGS:dgsDxCreateLabel(0.04, 0.11, 0.30, 0.12,"Passwort:",true,login)

    pw = DGS:dgsCreateEdit( 0.04, 0.25, 0.91, 0.14, "", true, login, tocolor(255,255,255) )
    DGS:dgsDxCreateLabel(0.05, 0.44, 0.65, 0.12, "Passwort speichern ?",true,login)

    --   DGS:dgsDxRadioButtonSetSelected(pwSafeNo, true)
    DGS:dgsDxGUISetProperty(pw,"masked",true)
    DGS:dgsSetParent(pw, login)
    loginButton = DGS:dgsDxCreateButton(0.23, 0.78, 0.54, 0.17, "Einloggen", true, login, nil, nil, nil, nil, nil, nil, tocolor(1,223,1), tocolor(4,170,4), tocolor(4,170,4) )
    pwSafeYes = DGS:dgsDxCreateRadioButton(0.05, 0.59, 0.60, 0.08, "Ja",true, login)
    pwSafeNo = DGS:dgsDxCreateRadioButton(0.67, 0.59, 0.25, 0.08, "Nein",true, login)
    addEventHandler ( "onClientDgsDxMouseClick", loginButton, SubmitEinloggenBtn, true )
    showCursor(true)


    local pwfile = xmlLoadFile ( ":reallife_server/pw.xml" )

    if not pwfile then
        pwfile = xmlCreateFile ( ":reallife_server/pw.xml", "PW" )
        xmlSaveFile ( pwfile )
        pwfile = xmlLoadFile ( ":reallife_server/pw.xml" )

        psafe = xmlCreateChild ( pwfile, "pw" )
        xmlSaveFile ( pwfile )
    else


        local psafe = xmlFindChild ( pwfile, "pw", 0 )
        success = xmlNodeGetValue ( psafe )
        DGS:dgsDxGUISetText(pw, success)
        DGS:dgsDxRadioButtonSetSelected(pwSafeYes, true)
    end
end


function camera ()
    local matrix = math.random(1,5)
    if matrix == 1 then
        setCameraMatrix (  -2002.5085449219, 97.438499450684, 50.890598297119, -2002.3596191406, 98.375770568848, 50.575439453125 )
    elseif matrix == 2 then
        setCameraMatrix (  -1994.8226318359, -150.59030151367, 71.665397644043, -1995.6309814453, -150.32920837402, 71.137786865234 )
    elseif matrix == 3 then
        setCameraMatrix (  -2134.8269042969, 1479.3785400391, 58.808700561523, -2134.3942871094, 1478.5981445313, 58.357345581055 )
    elseif matrix == 4 then
        setCameraMatrix (  -2821.173828125, 553.37512207031, 61.36360168457, -2821.9301757813, 552.81994628906, 61.017475128174 )
    elseif matrix == 5 then
        setCameraMatrix (  -1716.0357666016, 938.47021484375, 51.152000427246, -1716.7960205078, 938.76733398438, 50.574275970459 )
    end
end








function GUI_ShowLoginWindow()


    joinmusik = playSound (loginmusic, true)
    setSoundVolume(joinmusik,0.3)
    bindKey ( "enter", "down", SubmitEinloggenBtn )
    _CreateLoginWindow()

end
addEvent ( "ShowLoginWindow", true)
addEventHandler ( "ShowLoginWindow", getRootElement(), GUI_ShowLoginWindow)


function GUI_DisableLoginWindow()
 --   addEventHandler ( "onClientRender", root, InfoUnten )
--    addEventHandler ( "onClientRender", root, infoUntenRechts )
    stopSound(joinmusik)
    DGS:dgsDxGUICloseWindow(login)
    showCursor(false)
    setTimer ( checkForSocialStateChanges, 10000, 0 )
    setTimer ( getPlayerSocialAvailableStates, 1000, 1 )
    if isTimer ( LVCamFlightTimer ) then
        killTimer ( LVCamFlightTimer )
    end
    setElementClicked ( false )
	setTempToken ()
	findSettings ()

	
end
addEvent ( "DisableLoginWindow", true )
addEventHandler ( "DisableLoginWindow", getRootElement(), GUI_DisableLoginWindow)

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
    function ()
        local player = getLocalPlayer()
        for i = 1, 100 do
            outputChatBox (" ")
        end
        triggerServerEvent ( "regcheck", getLocalPlayer(), player )
    end
)

function ShowInfoWindow ()
    infobox_start_func("Herzlich Willkommen\nbei "..sk.." Reallife\nLogge dich nun unten ein!", 7500 )
end


function setTempToken ()

	resetToken = setTimer ( setTempToken, 60000*60, 0 )
	local token = generateString ( 6 )
	triggerServerEvent ( "setTempToken", getLocalPlayer(), token )
	playerTempToken = token
	outputChatBox("Ein neuer Token wurde soeben gesetzt. "..token)
end

 

 

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...