Jump to content

Search the Community

Showing results for tags 'dgs'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title


Gang


Location


Occupation


Interests

Found 11 results

  1. Advanced mute system by ozy * THIS SCRIPT HAS FEATURES FOR - Mute a player for minutes or hours without using milliseconds - All data is saving to database - Press "O" to reach mute panel for better usage (only opens for players who has 'command.mute' right) - You want to mute a guy but oh shoot! he is gone before you muted him. Dont worry if you have his serial you can mute him by his serial via 'Mute Serial' on mute panel. - You can see the muted players and their remaining time, account name, serial, muted date, reason and admin name - You can mute a player on mute panel * COMMANDS - To mute a player: /amute player 1m (for 1 min or use 1h instead for 1 hours) reason - To unmute a player: /aunmute player - To see your remaining mute time if you are muted: /muteinfo * INSTALLATION - This script using dgs so you also need to download dgs and drop it into your resources folder. Download dgs here: https://wiki.multitheftauto.com/wiki/Resource:DGS - Extract files (dgs & advanced_mute_system) into your resources folder and start advanced_mute_system, system is working with dgs so don't forget to start dgs. Enjoy! - Don't forget to give admin rights to script. (Go to admin panel > resources > manage acl > on groups: double click on Admin and click Add Object enter 'resource.advanced_mute_system' press Ok and that's it) * BUGS - I test it as much as i can and look for bugs but I couldn't test it with players so there might be some bugs. - If there is any bugs please contact me via discord: papazlloyd or send an email to my forum account --------------------------------------------------- * FOR DEVELOPERS - First of all, I want you to know i made this script because there are no any mute system (properly working) on internet so there you are enjoy. - I know codes are a little bit messy and hard to understand but in future updates I'll try to make it more understandable for you. ----------------------------------------------------- Download script here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18896
  2. Hello Forum! I need yor help I am just starting to learn programming in Lua, there are not many guides, so I turn to you. I wrote my own passport emulation, but I don't understand how I can put the entered data into the database. Below I will attach my code. Also, I would be happy if you could help me and tell me how I can add the display of this "passport" when entering a marker using addEventHendler. Thank you in advance! My code local dgs = exports.dgs local sw,sh = guiGetScreenSize() -- разрешение экрана игрока local px,py = sw/1920,sh/1080 -- адаптация экрана local window = dgs:dgsCreateWindow(((sw-800)/2)*px,((sh-600)/2)*py,800*px,600*py,"Паспорт",false) local buttonExecute = dgs:dgsCreateButton(325*px,530*py,150*px,40*py,"Подтвердить",false,window,nil,nil,nil,nil,nil,nil,tocolor(255,0,0),tocolor(100,0,0),tocolor(255,0,0)) local labelFirstName = dgs:dgsCreateLabel(200*px,200*py,400*px,30*py," Имя: ",false,window) local editFirstName = dgs:dgsCreateEdit(200*px,220*py,400*px,30*py,"",false,window,tocolor(255,255,255),nil,nil,nil) dgs:dgsSetProperty(labelFirstName,"alignment",{"center"}, {"center"}) dgs:dgsSetProperty(editFirstName,"alignment",{"center"}, {"center"}) local labelLastName = dgs:dgsCreateLabel(200*px,270*py,400*px,30*py," Фамилия: ",false,window) local editLastName = dgs:dgsCreateEdit(200*px,290*py,400*px,30*py,"",false,window,tocolor(255,255,255),nil,nil,nil) dgs:dgsSetProperty(labelLastName,"alignment",{"center"}, {"center"}) dgs:dgsSetProperty(editLastName,"alignment",{"center"}, {"center"}) local labelAge = dgs:dgsCreateLabel(200*px,340*py,400*px,30*py," Возраст: ",false,window,tocolor(255,255,255),nil,nil,nil) local editAge = dgs:dgsCreateEdit(200*px,360*py,400*px,30*py,"",false,window) dgs:dgsSetProperty(labelAge,"alignment",{"center"}, {"center"}) dgs:dgsSetProperty(editAge,"alignment",{"center"}, {"center"}) local labelCountry = dgs:dgsCreateLabel(200*px,410*py,400*px,30*py," Страна: ",false,window,tocolor(255,255,255),nil,nil,nil,tocolor(100,100,100,100)) local editCountry = dgs:dgsCreateEdit(200*px,430*py,400*px,30*py,"",false,window) dgs:dgsSetProperty(labelCountry,"alignment",{"center"}, {"center"}) dgs:dgsSetProperty(editCountry,"alignment",{"center"}, {"center"}) dgs:dgsWindowSetMovable(window,false) dgs:dgsWindowSetSizable(window,false) dgs:dgsWindowSetCloseButtonEnabled(window,false) dgs:dgsSetVisible(window,true) dgs:dgsSetVisible(window,true) showCursor(true) function openPanel() dgs:dgsSetVisible(window,true) showCursor(true) end function colsePanel() dgs:dgsSetVisible(window,false) showCursor(false) end local currentChose = "register" addEventHandler("onDgsMouseClick",root,function(btn,state) if btn == "left" and state == "down" then if source == buttonExecute then local firstName = dgs:dgsGetText(editFirstName) local lastName = dgs:dgsGetText(editLastName) local age = dgs:dgsGetText(editAge) local country = dgs:dgsGetText(editCountry) if not string.find(firstName,"%S") then outputChatBox("Name") return end if not string.find(lastName,"%S") then outputChatBox("LastName") return end if not string.find(age,"%d") then outputChatBox("Age") return end if not string.find(country,"%S") then outputChatBox("Country") return end triggerServerEvent("playerPassportEnter",localPlayer,firstName,lastName,age,country) end end end) If you do help me, please write this with explanations, thank you in advance! I LOVE YOU FORUM
  3. Good day, scriptwriters. I'm new to this business, so please don't swear for bad code. Tell me what I'm doing wrong? The first part of the code (the Army) works fine, and the second one every other time. I think too much elseif, the event is confused, I don't know how to optimize. Help. Screens: https://imgur.com/a/sSw81YI функция kek() ShowCursor(верно) dgs: dgsSetVisible(окно, true) dgs: dgsSetVisible(imgposition1, true) dgs: dgsSetVisible(imgposition2, true) окончание функция kek1() dgs: dgsSetVisible(окно,false) dgs: dgsSetVisible(imgposition1,false) dgs: dgsSetVisible(imgposition2,false) окончание Клавиша привязки ('1', 'down', kek) addEventHandler('onDgsMouseClick',root, функция (btn, состояние) ----------------Армия ------------------- если состояние == "вниз" и btn == "влево" и источник == btnArmy, то kek1() triggerEvent("Создать педаль", локальный проигрыватель) ShowCursor(верно) dgs: dgsSetVisible(но1,true) dgs: dgsSetVisible(но2,true) dgs: dgsSetVisible(но3,true) si = 1 если не si == 1, то si = 1 конец skinid1 = 179 setCameraMatrix(247.96488952637,1861.4558105469,14.794466018677,248.35562133789,1764.9252929688,-11.315200805664) если состояние == "вниз" и btn == "влево" и источник == но1 тогда si = si - 1 если si == 0, то si = 5 конец если состояние == "вниз" и btn == "влево" и источник == но2 тогда dgs: dgsSetVisible(но1,false) dgs: dgsSetVisible(но2,false) dgs: dgsSetVisible(но3,false) setElementData(локальный проигрыватель,"skinid1",skinid1) Запуск сервера событий("spawnPlayerArmy",LocalPlayer) Установить таргет камеры (LocalPlayer) ShowCursor(ложный) triggerEvent("Продавец", локальный проигрыватель) если состояние == "вниз" и btn == "влево" и источник == но3 тогда si = si + 1 если si == 6, то si = 1 конец если si == 1, то skinid1 = 179 setCameraMatrix(247.96488952637,1861.4558105469,14.794466018677,248.35562133789,1764.9252929688,-11.315200805664) если si == 2, то skinid1 = 285 setCameraMatrix(246.00991821289,1861.4471435547,14.794466018677,246.40065002441,1764.9166259766,-11.315200805664) -- outputChatBox ("Скин: = "..skinid) если еще si == 3, то skinid1 = 287 setCameraMatrix(243.98690795898,1861.4406738281,14.794466018677,244.37763977051,1764.91015625,-11.315200805664) --outputChatBox ("Скин: = "..skinid) в противном случае, если si == 4, то skinid1 = 73 setCameraMatrix(241.95097351074,1861.4321289063,14.794466018677,242.34170532227,1764.9016113281,-11.315200805664) --outputChatBox ("Скин: = "..skinid) если еще si == 5, то skinid1 = 191 setCameraMatrix(239.9241027832,1861.4228515625,14.794466018677,240.31483459473,1764.8923339844,-11.315200805664) --outputChatBox ("Скин: = "..skinid) -------------Террористы ------------- если состояние == "вниз" и btn == "влево" и источник == btnTerr, то kek1() ShowCursor(верно) dgs: dgsSetVisible(но4,true) dgs: dgsSetVisible(но5,true) dgs: dgsSetVisible(но6, true) ti = 1 если не ti == 1, то ti = 1 конец triggerEvent("PedCreateTerr", локальный проигрыватель) skinid1 = 28 setCameraMatrix(-274.44561767578,2588.4030761719,64.03636932373,-276.62969970703,2686.3229980469,43.863948822021) если состояние == "вниз" и btn == "влево" и источник == но4 тогда ti = ti - 1 если ti == 0, то ti = 5 конец если состояние == "вниз" и btn == "влево" и источник == но5 тогда dgs: dgsSetVisible(но4,false) dgs: dgsSetVisible(но5,false) dgs: dgsSetVisible(но6,false) setElementData(локальный проигрыватель,"skinid1",skinid1) triggerServerEvent("spawnPlayerTerr", локальный проигрыватель) Установить таргет камеры (LocalPlayer) ShowCursor(ложный) triggerEvent("PedDelTerr", локальный проигрыватель) если состояние == "вниз" и btn == "влево" и источник == но6 тогда ti = ti + 1 если ti == 6, то ti = 1 конец еще, если ti == 1, тогда skinid1 = 28 setCameraMatrix(-274.44561767578,2588.4030761719,64.03636932373,-276.62969970703,2686.3229980469,43.863948822021) еще если ti == 2, то skinid1 = 30 setCameraMatrix(-272.44989013672,2588.4465332031,64.03636932373,-274.63397216797,2686.3664550781,43.863948822021) -- outputChatBox ("Скин: = "..skinid) если еще ti == 3, то skinid1 = 126 setCameraMatrix(-270.45120239258,2588.4909667969,64.03636932373,-272.63528442383,2686.4108886719,43.863948822021) --outputChatBox ("Скин: = "..skinid) если еще ti == 4, то skinid1 = 93 setCameraMatrix(-268.44940185547,2588.5341796875,64.03636932373,-270.63348388672,2686.4541015625,43.863948822021) --outputChatBox ("Скин: = "..skinid) еще если ti == 5, то skinid1 = 150 setCameraMatrix(-266.46176147461,2588.5773925781,64.03636932373,-268.64584350586,2686.4973144531,43.863948822021) --outputChatBox ("Скин: = "..skinid) еще если ti == 6, то ti = ti - 1 окончание конец)
  4. Thisdp's DirectX Graphical User Interface System ( MTASA 2D+3D DxLIB ) This dxlib provide dx gui functions and events to make it easier to use and alternative to change the style more flexibly. Features: 1. Update Check(DGS will notice you if there is a higher version, and you can choose to ignore it or disable it in the config file) Update Command: "updatedgs" 2. Dx GUI Types: Basic: Window Edit Box Button Grid List Image Scroll Bar Scroll Pane Text Label Tab Panel Detect Area Radio Button Combo Box Check Box Memo 3D Interface 3D Text Browser Switch Button Selector Plugin: Media Browser Color Picker Mask Remote Image QRCode Blur Box Rounded Rectangle Nine Slice Scaling Object Preview Support Canvas Scroll Pane's 3D Effect 3. Edit/Memo rewrite ( You can no longer find the problems in dgs, the problems which exist in cegui) 4. Detect Area is efficient when checking whether your cursor is in a complicated shape. 5. Debug Mode , Command: "debugdgs" 6. You can apply shader to the dxgui ( Compatible with some resources like Objec tPreview ). 7. Include CMD, Command: "dgscmd" ( For more help, please input "help" in the CMD ) 8. Memo/Edit rewritten. 9. Object Oriented Programming Class. 10. Render Target Failure Check ( Warns when there's no enough video memory to create render target ). 11. DGS resembles cegui, you can find the similar feeling when scripting with dgs. 12. 48-hour-response service, your suggestions and bug report will be dealt with in 48 hours ( or less, like 12 hours ? ) 13. Custom Style system 14. Built-in shader plugin 15. More properties 16. Built in multi-language support 17. Simple GUI To DGS (G2D) Notice:Do not close your server or stop the script when it is updating. Wiki: https://wiki.multitheftauto.com/wiki/Dgs ( Still Working In Process ) Auto Completion For N++ (Thanks To Ahmed Ly): http://www.mediafire.com/file/m6dm7815d5dihax/Lua.zip Discord Server: https://discord.gg/QEs8q6W Download DGS : https://github.com/thisdp/dgs Notice: Need acl rights to call fetchRemote/getPlayerIP. If you want to sell your script which involves DGS, please exclude DGS from your price. HurtWorld Backpack Panel(Example) DGS Network Monitor(Built-in)
  5. Eu queria saber como eu instalo o resource dgs no meu servidor, eu preciso de conta no GitHub pra isso? como que faz para instalar ele?
  6. there is a function to login to account: function login(username, password) local player = client if not (does_account_exist(username)) then create_error_message_dialog("Аккаунта с таким логином не существует!") return; else local handle = dbQuery(function (handle) --callback for the query selecting the user by username local results = dbPoll(handle, -1) if (#results == 0) then outputChatBox("Login Failed!") --triggerClientEvent(player, "loginFailed") return end passwordVerify(password, results[1].password, {}, function(matches) -- callback function for the password verify if (matches) then -- Do anything you wish with the database result to log the player in with the rest of your scripts outputChatBox("Login Success!") --triggerClientEvent(player, "loginSuccess") else outputChatBox("Login Failed!") --triggerClientEvent(player, "loginFailed") end if (rememberMe) then local token = generateRandomToken() dbExec(function() --triggerClientEvent(player, "loginSuccess", token) end,mysqlHandle, "INSERT INTO `access_tokens` (`user_id`, `token`) VALUES ('"..tostring(results[1].id).."', '"..tostring(token).."')") end end) end, mysqlHandle, "SELECT * FROM `users` WHERE username = '"..username.."'") end end but when you call passwordVerify(), the results table for the username returns the correct username, and for the password it returns nil, how to fix this (if necessary, the password is encoded in the database) I also wanted to ask, there is a button in the form of a rectangle: local buttonAuth_round = dgs:dgsCreateRoundRect(30,false,tocolor(62,153,247)) local buttonAuth = dgs:dgsCreateImage(182,0,164,56,buttonAuth_round,false,loginButtons,tocolor(62,153,247)) local buttonAuth_text = dgs:dgsCreateLabel(57,18,50,20,'Войти', false, buttonAuth) There is an event handler: addEventHandler("onDgsMouseClick", buttonAuth, function() local login, password = dgs:dgsGetText(inputLogin_edit), dgs:dgsGetText(inputPass_edit) if not string.find(login, "%S") then return end if not string.find(password, "%S") then return end triggerServerEvent("playerLogin", getLocalPlayer(), login, password) end, false) But when you click on a button or any other dgs element (which is being processed) - it is triggered two times (simultaneously), how can this be fixed?
  7. Не могу понять как настроить скрипт Скрин кто поможет отдам этот скрипт бесплатно Кто сможет пошлите в Discord: Влад Ранециуй#3010 Там у меня что-то с DGS Связано но не пойму что
  8. Hi, sorry for bad english. I have a question about DGS. I create a window in which I create a button (buttonWindow) and add an event to it, but the function works even if you clicked on the window (wnd). wnd = dgsCreateWindow (...) buttonWindow = dgsCreateButton (...,wnd) addEventHandler ("onDgsMouseClick", buttonWindow, buttonWindowFunction) function buttonWindowFunction () ... end How can I fix this? Thank you in advance!
  9. Hello. (sry for english and stupid question) I created window and input field on DGS win = DGS:dgsDxCreateWindow(0.18, 0.27, 0.22, 0.3," ",true,0xFF000000,25,nil,0xFFFFFFFF,nil,0xFFFFFFFF,5,true) -- window emailBoxReg = DGS:dgsCreateEdit( 0.1, 0.36, 0.8, 0.1, "INPUT FIELD", true, win, 0xFF000000, 0.5, 0.5, nil, 0xFFEBEBEB, false) -- input field DGS:dgsDxGUISetVisible( winReg, true) -- show DGS:dgsDxWindowSetMovable(winReg, false) DGS:dgsDxWindowSetSizable(winReg, false) guiSetInputEnabled(true) -- input showCursor(true) -- cursor why if i click on input field, later click on window - next clicks everywhere not work?
  10. I would apperciate it very much if you could give some advice on DGS.
  11. Hello, why gui showing(hide also) all, and add all row???? DGS = exports.dgs function LGUI(player) if getLocalPlayer() == localPlayer then Login = DGS:dgsDxCreateEdit(0.16, 0.4, 0.20, 0.05, "", true) Pass = DGS:dgsDxCreateEdit(0.16, 0.47, 0.20, 0.05, "", true) DGS:dgsDxEditSetMasked(Pass, true ) LOGIN_BUTT = DGS:dgsDxCreateButton(0.20, 0.55, 0.1, 0.05, "Zaloguj", true) showCursor(true) showChat(false) end end addEventHandler("onClientResourceStart", root, LGUI) function Login_click() if source == LOGIN_BUTT then local TEXT_LOGIN = DGS:dgsDxGUIGetText(Login) local TEXT_PASS = DGS:dgsDxGUIGetText(Pass) triggerServerEvent("LOGIN_CLICK", root, TEXT_LOGIN, TEXT_PASS) end end addEventHandler ("onClientDgsDxMouseClick", root, Login_click) addEvent("LOGIN_TRUE", true) function Login() DGS:dgsDxGUISetVisible(Login, false) DGS:dgsDxGUISetVisible(Pass, false) DGS:dgsDxGUISetVisible(LOGIN_BUTT, false) triggerEvent("LOGGED", root) end addEventHandler("LOGIN_TRUE", root, Login) AND getSelected = 0 addEvent("LOGGED", true) function CHGUI() CH_GRID = DGS:dgsDxCreateGridList (346, 163, 433, 403, false ) CH_BUTT = DGS:dgsDxCreateButton(0.20, 0.55, 0.1, 0.05, "Wybierz postać", true) CH_GRID_CID = DGS:dgsDxGridListAddColumn(CH_GRID, "CID", 0.5 ) CH_GRID_NAME = DGS:dgsDxGridListAddColumn(CH_GRID, "Imie i nazwisko", 0.2) triggerServerEvent("GET_CH", root) end addEventHandler("LOGGED", root, CHGUI) addEvent("CH_INFO", true) function setCH(CHS,CH_CID, CH_NAME) for i,v in ipairs(CHS) do ROW_CH = DGS:dgsDxGridListAddRow(CH_GRID) SET_ROW_CID = DGS:dgsDxGridListSetItemText(CH_GRID, ROW_CH, CH_GRID_CID, CH_CID[i]) SET_ROW_NAME = DGS:dgsDxGridListSetItemText(CH_GRID, ROW_CH, CH_GRID_NAME, CH_NAME[i]) end end addEventHandler("CH_INFO", getLocalPlayer(), setCH) addEventHandler ( "onClientDgsDxMouseClick", root, function() if source == CH_GRID then Selected = DGS:dgsDxGridListGetSelectedItem(CH_GRID) getSelected = DGS:dgsDxGridListGetItemText(CH_GRID, Selected, CH_GRID_CID) end if source == CH_BUTT then if Selected == -1 or getSelected == 0 then outputChatBox("Nie wybrales postaci!") else triggerServerEvent("getCID", root, getSelected) end end end) addEvent("CH_SELECT", true) function hideCHGUI() DGS:dgsDxGUISetVisible(CH_GRID, false) DGS:dgsDxGUISetVisible(CH_BUTT, false) showCursor(false) showChat(true) end addEventHandler("CH_SELECT", root, hideCHGUI)
×
×
  • Create New...