Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 14/02/24 in all areas

  1. 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
    1 point
  2. 1 point
  3. https://ardicgaming.com/ https://forums.ardicgaming.com/ mtasa://164.132.200.104:22003
    1 point
  4. A quick update. So all in all. We are still up and functioning under the Liberty City universe, meanwhile in the background we are actively working on porting over to Los Santos. We shall be ready to go within 2 weeks or so. But for the guys who still want to get some roleplay in, we are still open for roleplay services. Check us out at the links below. Thank you guys for reading, and hope to see you guys in Los Santos pretty soon!! UCP: https://ardicgaming.com/ Forums: https://forums.ardicgaming.com/ Community Rules: https://wiki.ardicgaming.com/ Discord: https://ardicgaming.com/discord/ Server IP: mtasa://164.132.200.104:22003
    1 point
  5. Variety of roleplay scenes from different roleplayers on our server. UCP: https://ardicgaming.com/ Forums: https://forums.ardicgaming.com/ Community Rules: https://wiki.ardicgaming.com/ Discord: https://ardicgaming.com/discord/ Server IP: mtasa://164.132.200.104:22003 See you out there!
    1 point
  6. A Roleplay setting that this community has truly needed for a long time! Finally something fresh and unique and I absolutely love playing on the server, keep it up guys!
    1 point
  7. We are officially open again! Currently set in Modern day Liberty City! Feel free to join us today! Server IP: mtasa://164.132.200.104:22003 Team Speak: 164.132.200.104
    1 point
  8. We are hiring staff members! Check out our main discord for more information! https://ardicgaming.com/discord/
    1 point
  9. A quick reminded that our official forums are up and running again! https://forums.ardicgaming.com/topic/184-fresh-off-the-docks-welcome-to-liberty-city-our-dream-your-adventure/#comment-972
    1 point
  10. Hey guys - It has been a long time since we last posted or updated this thread. We are aware that the first page is filled with outdated information at this point, but we are happy to announce some new spicy information. The AGRP Staff team present to you guys, something new to the MTA-ROLEPLAY community; Source: Posted by - SonnyB Lead Administrator on ArdicGaming's offical discord, — 11/14/2023;
    1 point
×
×
  • Create New...