Jump to content

GodOfPenguins

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by GodOfPenguins

  1. I think it was about a new gamemode, where players can together go through the storyline of GTA:SA
  2. Я не понимаю, зачем прописывать эти длинные проверки на наличие в группе? А что если потребуется сделать отдельную группу для модераторов? Переписывать каждый скрипт? Почему бы просто не использовать эту функцию - https://wiki.multitheftauto.com/wiki/HasObjectPermissionTo ?
  3. Resolved by reinstalling the videocard driver.
  4. How can I set the screen resolution to 1280x720 on a 5:4 display? DPI scalling does not help. In the settings there is no. (only square resolutions). If i set it in configuration file, the game resets the resolution to a minimum
  5. Tools for building buildings and interiors. For example, to be able to put a wall and stretch it (the wall models will spawn exactly one after another) etc.
  6. Why the table disappears after the cycle? Never this was not. shel = {} local shelPlaces = { [1] = { [1] = {x=0,y=0,z=0}, [2] = {x=0,y=0,z=0}, [3] = {x=0,y=0,z=0}, }, } function createShelters(gameId, players) local gameId = tonumber(gameId) shel[gameId] = {} for i=1,#shelPlaces do --outputDebugString("table "..shel[gameId]) shel[gameId][i] = { ["places"] = { [1] = {x=shelPlaces[i][1].x,y=shelPlaces[i][1].y,z=shelPlaces[i][1].z,["object"]="craftTable"}, }, } outputChatBox(shel[1][1]["places"][1]["object"]) -- WORKING for pI=2,#shelPlaces[i] do shel[gameId][i]["places"] = { [pI] = {x=shelPlaces[i][pI].x,y=shelPlaces[i][pI].y,z=shelPlaces[i][pI].z,["object"]=false}, } end end createCraftsTable(gameId) end addEventHandler("onGameStarted", root, createShelters) function createCraftsTable() --for i=1,10 do --for name,object in pairs(shel[gameId][i]) end function tempSpawn() spawnPlayer(source, 0,0,5) setCameraTarget(source, source) end addEventHandler("onPlayerLogin", root, tempSpawn) function startTest(pSource, command, gameId) triggerEvent("onGameStarted", root, gameId) end addCommandHandler("gameTest", startTest) function getGameInfo() outputChatBox(shel[1][1]["places"][1]["object"]) -- NOT WORKING end addCommandHandler("gInfo", getGameInfo)
  7. В чём проблема один раз подробно расписать, а не каждому по отдельности?
  8. Могу сразу сказать что вам не по карману разработка оригинального сервера с нуля. За такую плату вам максимум кто-нибудь скачает слитое/из компьюнити и пропишет автозагрузку в конфиг.
  9. Могу тебе дать совет: За 10 рублей за скрипт ты вряд ли найдёшь нормального скриптёра.
  10. Если есть умения и идеи для его переделки и достаточно денег для хорошего пиара, то я думаю можно любой сервер поднять и получить мани. Вопрос лишь в том, достаточно ли будет дохода, чтобы хотя бы покрыть расходы.
  11. В вики на странице каждой функции указан её тип: клиент (загружаются при входе на сервер игроку и выполняются на его компьютере), сервер (выполняются на стороне сервера) и shared (Общие функции, которые можно выполнять как на клиентской, так и на серверной стороне. Большинство таких функций могут иметь разный синтаксис для клиентской и серверной стороны.) Советую почитать основные статьи на вики: https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://wiki.multitheftauto.com/wiki/Introduction_to_Scripting_the_GUI https://wiki.multitheftauto.com/wiki/Resources
  12. Lua не требуется компилировать для работы. Но если потребуется (например вам нужно скинуть какой-либо скрипт другому человеку, но вы не хотите чтобы он видел код), то вот - https://luac.multitheftauto.com/
  13. "Why reinvent the bicycle", if the basic elements are already there? Personally, I do not like working with the GUI and it's much easier for me to use the finished dxlib.
  14. After last update. Deleting colorSchemeLoad did not help.
  15. Nothing. Memo still invisible. If enter a lot of characters horizontally, it starts to work, but if enter a lot of characters vertically, it broken.
  16. Why memo invisible? No errors function openSmsWindow(number) smartGUI.sms.smsLabel = DGS:dgsDxCreateLabel(0.05, 0.15, 1, 0.1, "Введите SMS для номера "..number.."", true, smartGUI.desktop, 0xFF000000) smartGUI.sms.memo = DGS:dgsDxCreateMemo(0.1, 0.3, 0.8, 0.4, "WHERE YOU?!", true, smartGUI.desktop, 0xFF0000FF, 1, 1, nil, 0xFFBFBFBF) end
  17. dgsDxEditSetMaxLength not work if paste text through dgsDxGUISetText
  18. You can make the flashing pipe (| - pipe) invisible when ReadOnly is true?
  19. DGS = exports.dgs addEventHandler("onClientResourceStart", resourceRoot, function() createBlip(2827.34, 1290.94, 10.76, 55, 2, 255, 0, 0, 255, 0, 250) carMarker = createMarker(2827.34, 1290.94, 9.6, "cylinder", 2.0, 0, 0, 255, 155) end ) carGUI = {} function markerTrigger(hitPlayer) if source == carMarker then showCursor(true) carGUI.win = DGS:dgsDxCreateWindow(0.75, 0.35, 0.25, 0.5, "Автомагазин", true) carGUI.window = DGS:dgsDxCreateTabPanel(0, 0, 1, 1, true, carGUI.win) carGUI.tab1 = DGS:dgsDxCreateTab("BMW", carGUI.window) carGUI.grid1 = DGS:dgsDxCreateGridList(0, 0, 1, 1, true, carGUI.tab1) carGUI.grid1Name = DGS:dgsDxGridListAddColumn(carGUI.grid1, "Название", 0.3) carGUI.grid1Price = DGS:dgsDxGridListAddColumn(carGUI.grid1, "Цена", 0.1) carGUI.tab2 = DGS:dgsDxCreateTab("VAZ", carGUI.window) carGUI.grid2 = DGS:dgsDxCreateGridList(0, 0, 1, 1, true, carGUI.tab2) carGUI.grid2Name = DGS:dgsDxGridListAddColumn(carGUI.grid2, "Название", 0.3) carGUI.grid2Price = DGS:dgsDxGridListAddColumn(carGUI.grid2, "Цена", 0.1) setCameraMatrix(2814.61, 1316.01, 10.75) --setElementDimension(localPlayer, 100) triggerServerEvent("onClientOpenCarShop", localPlayer) end end addEventHandler("onClientMarkerHit", getRootElement(), markerTrigger) cars = {} function addCarsToGrids(name, price, mark, model) cars.name = { price = tonumber(price), model = tonumber(model), name = name } if mark == "BMW" then local row = DGS:dgsDxGridListAddRow(carGUI.grid1) DGS:dgsDxGridListSetItemText(carGUI.grid1, row, carGUI.grid1Name, name) DGS:dgsDxGridListSetItemText(carGUI.grid1, row, carGUI.grid1Price, price) elseif mark == "VAZ" then local row = DGS:dgsDxGridListAddRow(carGUI.grid2) DGS:dgsDxGridListSetItemText(carGUI.grid2, row, carGUI.grid2Name, name) DGS:dgsDxGridListSetItemText(carGUI.grid2, row, carGUI.grid2Price, price) end end addEvent("getCar", true) addEventHandler("getCar", getRootElement(), addCarsToGrids) function clickTrigger(button, state) outputChatBox(source) if button == "left" and state == "up" then if source == carGUI.grid1 then local selected = DGS:dgsDxGridListGetSelectedItem(carGUI.grid1) if selected ~= -1 then if carGUI.buyButton == nil then carGUI.buyButton = DGS:dgsDxCreateButton(0.3, 0.7, 0.3, 0.15, "Купить", true) end local name = DGS:dgsDxGridListGetItemText(carGUI.grid1, selected, carGUI.grid1Name) if getElementType(car) == "vehicle" then blowVehicle(car, false) end car = createVehicle(cars.name.model, 2802.79, 1309.43, 10.89) --setElementDimension(car, 100) outputChatBox(cars.name.name) outputChatBox(cars.name.model) end elseif source == carGUI.grid2 then local selected = DGS:dgsDxGridListGetSelectedItem(carGUI.grid2) if selected ~= -1 then if carGUI.buyButton == nil then carGUI.buyButton = DGS:dgsDxCreateButton(0.3, 0.7, 0.3, 0.15, "Купить", true) end local name = DGS:dgsDxGridListGetItemText(carGUI.grid2, selected, carGUI.grid2Name) if getElementType(car) == "vehicle" then blowVehicle(car, false) end car = createVehicle(cars.name.model, 2802.79, 1309.43, 10.89) outputChatBox(cars.name.name) outputChatBox(cars.name.model) end end end end addEventHandler("onClientDgsDxMouseClick", getRootElement(), clickTrigger) function windowClosed() if source == carGUI.win then showCursor(false) setCameraTarget(localPlayer, localPlayer) setElementDimension(localPlayer, 0) destroyElement(carGUI.buyButton) end end addEventHandler("onClientDgsDxWindowClose", getRootElement(), windowClosed)
  20. Another problem with tab panel. If i create tab panel with 2 tabs and inside them gridlist then if I click on an row in gridlist in tab 1, DGS considers that I clicked on the row in the second tab.
  21. Can not write to the edit in the second tab, if the first tab has a edit in the same place
  22. function Call(Client, Command, Username, Password) local query = dbQuery(Connection, "SELECT * FROM users WHERE username = '"..Username.."' AND password = '"..Password.."';") local result = dbPoll(query, -1) if #result > 0 then -- Match found success for row, rowData in ipairs(result) do setElementData(Client, "id", tonumber(rowData['id'])) end end end
×
×
  • Create New...