Jump to content

FlorinSzasz

Members
  • Posts

    142
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by FlorinSzasz

  1. Serial Anti - Cheat e o resură menită să prindă o porțiune din jucătorii care își schimbă contul sau serialul și nu prezintă suficientă experientă in ași ascunde bine urmele. Resursa beneficiază de - o baza de date unde sunt salvați toți jucătorii care se loghează cel puțin o data pe server. - resursa detecteaza daca incerci sa te loghezi de pe un alt pc la un cont creat - verifica daca sunt alte conturi cu același serial - verifica daca cumva serialul tau corespunde cu cel salvat in baza de date - verifica daca exista un fisier salvat pe pc-ul tau cu un serial daca nu exista acel fisier dar esti in baza de date nu poti sa te loghezi daca owner-ul nu te scoate din baza de date a resursei - daca acel fisier salvat pe pc-ul tau este modificat resursa observa si din nou nu poti sa te loghezi pe server fara ca owner-ul sa te scoată din baza de date. - daca serverul comunica cu clientul pentru a observa daca acel fisier exista la tine în pc ca si pe server iar serverul nu primeste un raspuns nu ai acces la contul la care doresti sa te conectezi - resursa ofera comanda /removeaccount [accountname] (utilizabila doar de un admin) -> comanda este folosita pentru a sterge un cont din baza de date a resursei in cazul in care schimbi pc-ul sau reinstalezi windows-ul si pierzi acel fisier din pc si doresti sa te conectezi la un cont existent. Link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18932
  2. Salut tuturor! Zilele astea am avut o idee pentru un topic care as spune eu ca e interesanta. Adresez aceasta intrebare tuturor celor care au deschis un server la care au lucrat sau celor care lucreaza la un server care la un moment dat ne va reprezenta in lista de servere intr-un fel sau altul. Si intrebare sta asa: "" Care este motivatia care va tine prezenti in acel proiect si va mana zi de zi, saptamana de saptamana sa il terminati si la momentul potrivit sa il urcati pe host? "" *Spre exemplu pentru mine a fost simplu sunt multe servere care au ce imi doresc dar nu au tot ce as vrea eu. Si am decis sa fac ceva de manuta mea, in general prefer sa fac lucruri cu mana mea, sa privesc inapoi si sa spun ,,i did that, then i can do something harder and harder until i need to learn the next chapter to level up ''. ** Sunt curios de experinetele voastre si de motivatia voastra.
  3. Hi guys! I want to ask why did i got/ or not banned on discord or is some sort of a discord bug because mta server is gone from the list. Yesterday i was active in the morning reading some messages later in the day i got a discord email that suspicious activity is taking place on my account so i did change my pass and when i got into my account i saw that some people got some spam messages like 2-3 and i guess some went to mta server because i was muted from the moment i did login for 24h. I did not send spam messages myself because i was not even on when they were sent. I use malwarebytes but i did not get any result of a virus or something. I guess some bot got into my account in some way or another. I wonder if am banned can i appeal that? ( i cant get into the server because it says that the server link expired)
  4. Well there are C# / C++ injectors or there are injectors for every game as we see in last few years a lot of online games that i play got cheats which were not a thing back in time so all you can do is fix or secure your scripts and make an anti-cheat for your server because to keep an anti-cheat up to date is a lot of work. But if you have your own one that does not need new updates every day/week only once at a certain time.
  5. You could use this resource is old but good and it works i used it when i was a beginner in scripting. https://www.youtube.com/watch?v=kazisZj-E98 https://forum.multitheftauto.com/topic/23029-rel-house-system-sql/ https://community.multitheftauto.com/index.php?p=resources&s=details&id=727
  6. Niște afiramții/formulări ce pot fi utile când dorim să aflăm informații legate de un anumit tabel sau coloane ce corespund unui tabel dintr-o bază de date. --- varianta MySQL local rez = dbPoll(dbQuery(connection,"SELECT table_name FROM information_schema.tables WHERE table_schema = '"..name.."';"),-1) -- inlocuiți name cu numele bazei de date de la care doriți să aflați informații legate de tabele -- rez o sa returneze un tabel cu denumirile tabelelor din baza de date pe care ați asociat-o cu variabila name for k,v in pairs(rez) do outputDebugString(v.table_name) end local rez = dbPoll(dbQuery(connection,"SELECT COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '"..table.."' ORDER BY ORDINAL_POSITION"),-1) -- selectam denumirea coloanelor si tipul datelor pentru tabela aflata sub variabila table for k,v in pairs(rez) do outputDebugString(v.COLUMN_NAME) outputDebugString(v.DATA_TYPE) end ---------------------- -- Pentru SQLite local rez = dbPoll(dbQuery(connection,"SELECT name FROM sqlite_master WHERE type='table';"),-1) -- aici nu mai aveti nevoie de denumirea bazei de date deoarece se returneaza tabelele din baza de date la care sunteti conectat. for k,v in pairs(rez) do if v.name ~= "sqlite_sequence" then outputDebugString(v.name) end end local rez = dbPoll(dbQuery(connection,"PRAGMA table_info("..tostring(table)..")"),-1) -- selectam date legate de coloane -- table este denumirea tabelului de la care dorim sa aflam date legate de coloane. for k,v in pairs(rez) do outputDebugString(v.name) outputDebugString(v.type) end
  7. Update 1.2 și 1.2.1 Update-ul 1.2 este dbFrame varianta pentru MySQL iar 1.2.1 este noul update pentru dbFrame pe SQLite. Ambele cuprind funcția nouă pentru drop table, optimizări au fost aduse codului. Din acest update nu mai este nevoie de restart dupa crearea unei baze de date mai mult decat atât totul se va face acum din panel, fără a mai fi nevoie de comenziile /GUIcreatetable /GUIinsert etc.
  8. This can be an option but it may look ugly even with the right color. https://wiki.multitheftauto.com/wiki/DxDrawLine3D
  9. This should help you https://wiki.multitheftauto.com/wiki/SetColShapeSize
  10. local result = dbPoll(dq,250) -- this should --be like this local result = dbPoll(dq,-1) --Also is result[1]["password"] encrypted? when you insert it into the database? passwordVerify(pass,result[1]["password"]) --------------------------------------------------- addEvent("login", true) addEventHandler("login", root, function (user, pass) local serial = getPlayerSerial(client) local dq = dbQuery(db, "SELECT * FROM accounts WHERE serial=?", serial) local result = dbPoll(dq,-1) if (#result > 0) then if user == result[1]["username"] then if (passwordVerify(pass,result[1]["password"])) then print("Sikeres bejelentkezés!") else print("Hibás jelszó!") end else print("Felhasználónév nem található!") end else print("Sikertelen bejelentkezés!") end end)
  11. i think there is full gamemode to look at which might make the things more complicated :)) thats why we dont get any lines of code.
  12. Update 1.1 Update de securitate orice panel poate fi accesat doar de un admin în cazul în care nu folosiți un acl.xml custom altfel intervine nevoia unor modificări suplimentare.
  13. he means the interiors table structure like what columns and data type do you have and so on.
  14. Update 1.02 niște buguri legate de funcțiile updateTable/InsertIntoTable au fost fixate și niște erori client side!
  15. UPDATE 1.01 au fost rezolvate niște buguri legate de funcția SelectFromTable() https://community.multitheftauto.com/index.php?p=resources&s=details&id=18897 Mai jos este prezentat un exemplu practic de utilizare a celor 3 funcții exportate! --Example -- create the first db or second or third ... you know -- restart the resource -- create a table for one of your databases ---my id of db is 1 (your id can be 2 or 3 it depends on how many dbs you have created and which one you want to use) ---my table name is tutorial -- username is column of reference when i select and update data! addEventHandler ('onPlayerLogin',getRootElement(),function (_,theCurrentAccount) local acc_name = getAccountName(getPlayerAccount(source)) if acc_name then -- db id 1 / table tutorial / column username / and we look for username account name! rezult = exports["dbFrame"]:SelectFromTable(1,"tutorial","username",acc_name) if rezult then for k,v in ipairs(rezult) do setPedArmor(source,v.armour) setPlayerMoney(source,v.money) setElementModel(source,v.model) end else exports["dbFrame"]:InsertIntoTable(1,"tutorial",acc_name,"username",acc_name) end end end) addEventHandler("onPlayerQuit",getRootElement(),function() local acc_name = getAccountName(getPlayerAccount(source)) if acc_name then exports["dbFrame"]:updateTable(1,"tutorial","username",acc_name,"armour,money,model",getPedArmor(source),getPlayerMoney(source),getElementModel(source)) end end)
  16. DBFrame este o resursă dedicată celor care nu au experiență în utilizarea bazelor de date sau celor care doresc o abordare diferită în utilizarea acestora. Resursa oferă un panel pentru: - inserare in tabel - update de tabel - creare de tabel - ștergerea unui rând din tabel - crearea de baze de date - pentru a vizualiza bazele de date existente - pentru a vedea denumirea coloanelor dintr-un tabel și tipul de date pe care îl reprezintă Bonus funcții exportate: updateTable() InsertIntoTable() SelectFromTable() // Funcțiie sunt explicate mai detaliat in documentul info.txt din arhiva unde sunt regăsite resursele. Link -> https://community.multitheftauto.com/index.php?p=resources&s=details&id=18897
  17. Interesting, i never had this problem. You need to add this in registerWindow function toggleControl("chatbox",false) And also add this into your dgs mouse click EventHandler function. if source == buttonExecute then -- after this line of code add the line of code i wrote below toggleControl("chatbox",true) I also want to say there is no stupidity you just want to do to much to fast, take your time and read the wiki and topics on forum. With the time you will learn faster or slower it doesnt matter, if you put a little bit of work you will learn something today, something tomorrow and so on. https://forum.multitheftauto.com/forum/123-tutorials/ https://www.youtube.com/@ngear2872/videos
  18. Client Side we have to do this Also you dont need openPanel or closePanel functions you can delete this functions and in first part of the script put all things in a function like i did. local playerPassportEdit = createMarker(-712.9, 962.5, 12.3-1.7,"cylinder",2.0,255,0,0,104) local on = 0 function registerWindow() if on == 1 then return end on = 1 window = dgs:dgsCreateWindow(((sw-800)/2)*px,((sh-600)/2)*py,800*px,600*py,"Паспорт",false) 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)) labelFirstName = dgs:dgsCreateLabel(200*px,200*py,400*px,30*py," Имя: ",false,window) 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"}) labelLastName = dgs:dgsCreateLabel(200*px,270*py,400*px,30*py," Фамилия: ",false,window) 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"}) labelAge = dgs:dgsCreateLabel(200*px,340*py,400*px,30*py," Возраст: ",false,window,tocolor(255,255,255),nil,nil,nil) 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"}) 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)) 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) showCursor(true) end function passportRegister ( hitPlayer, matchingDimension ) if hitPlayer == localPlayer and source == playerPassportEdit then registerWindow() end end addEventHandler ( "onClientMarkerHit", getResourceRootElement(), passportRegister ) --------- here we need to add somehting --- 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) -- also here we need this dgs:dgsSetVisible(window,false) showCursor(false) on = 0 end end end)
  19. Data from db is static it wont change unless you want to update it. It will be always the same because players cant make any changes. If you mean you can edit the client side memo you can do this to disable that. https://wiki.multitheftauto.com/wiki/DgsMemoSetReadOnly -- client side -- you look after this line of code local CountryInfo = dgs:dgsCreateMemo(10,100,150,25,"Страна: "..rezult[1]['Country'].."",false,passport_info) --after this line you add this lines of code dgsMemoSetReadOnly(firstNameInfo,true) dgsMemoSetReadOnly(lirstNameInfo,true) dgsMemoSetReadOnly(ageInfo,true) dgsMemoSetReadOnly(CountryInfo,true)
  20. 1. To close your panel with Close button you have to use the dgs event like you did before. 2. You cant edit the data from db without a db browser or an update statement. 3.You get the data and send it to client on the marker hit event. 4. If you want to get the data from db on another function or event you can but you need to have the player who triggers that event. -- client side --a) --remove ,,local,, before the button local closeButton = dgs:dgsCreateButton(325*px,530*py,150*px,40*py,"Close",false,passport_info,nil,nil,nil,nil,nil,nil,tocolor(255,0,0),tocolor(100,0,0),tocolor(255,0,0)) -- you should have this -- closeButton = dgs:dgsCreateButton(325*px,530*py,150*px,40*py,"Close",false,passport_info,nil,nil,nil,nil,nil,nil,tocolor(255,0,0),tocolor(100,0,0),tocolor(255,0,0)) -- b) addEventHandler("onDgsMouseClick",root,function(btn,state) if btn == "left" and state == "down" then if source == closeButton then showCursor(false) dgs:dgsSetVisible(passport_info,false) on = 0 end end end) -- server side -- if you changed the column names in your db you have to replace them in the query and insert statement -- old local query = dbQuery(connect,"SELECT * FROM Users WHERE firstname=? OR lastname=? OR accountName=?",tostring(firstname),tostring(lastname),acc_name) -- new local query = dbQuery(connect,"SELECT * FROM Users WHERE FirstName=? OR LastName=? OR accountName=?",tostring(firstname),tostring(lastname),acc_name) --- also this -- old dbExec(connect,"INSERT INTO Users (accountName,firstname,lastname,age,country) VALUES(?,?,?,?,?)",acc_name,firstname,lastname,age,country) -- new dbExec(connect,"INSERT INTO Users (accountName,FirstName,LastName,Age,Country) VALUES(?,?,?,?,?)",acc_name,firstname,lastname,age,country)
  21. Server side you have to add this - > local connect = dbConnect("sqlite","Passport.db") -- we create the db -- then we create a table dbExec(connect,"CREATE TABLE IF NOT EXISTS passport (id INTEGER PRIMARY KEY AUTOINCREMENT,accountName TEXT,firstname TEXT,lastname TEXT,age INTEGER,country TEXT)") -- we add the server side event addEvent("playerPassportEnter",true) addEventHandler("playerPassportEnter",getRootElement(),function(firstname,lastname,age,country) if client then -- check if data is from client you use always client when you bring data from clinet local acc_name = getAccountName(getPlayerAccount(client)) -- get the player account name local query = dbQuery(connect,"SELECT * FROM passport WHERE firstname=? OR lastname=? OR accountName=?",tostring(firstname),tostring(lastname),acc_name) local rezult = dbPoll(query,-1) -- we select the data and then get the rezult if #rezult > 0 then -- we check if the rezult table has some data with this player account outputChatBox("[PASSPORT] This firstname or lastname is used or you already created a passport!",client,104,255,104) else -- if we dont have any data with this player we add a passport! dbExec(connect,"INSERT INTO passport (accountName,firstname,lastname,age,country) VALUES(?,?,?,?,?)",acc_name,firstname,lastname,age,country) outputChatBox("[PASSPORT] New passport has been created successfully!",client,104,255,104) end end end) -- you put your x,y,z coordinates where your marker is or where you want to create the marker -- local viewPassport = createMarker(2865.15063,-1989.56226,11.10156-1.7,"cylinder",2.0,104,255,104,104) addEventHandler('onMarkerHit',getResourceRootElement(),function(hitElement,matchingDimension) if getElementType(hitElement) == 'player' then -- check if the element which hits the marker is a player if source == viewPassport then -- we check if we hit our marker and not another marker local acc_name = getAccountName(getPlayerAccount(hitElement)) local query = dbQuery(connect,"SELECT * FROM passport WHERE accountName=?",acc_name) -- we select the data from db local rezult = dbPoll(query,-1) if #rezult > 0 then -- if we have data we sent it to client triggerClientEvent("viewPassport",hitElement,rezult) else -- if we do not have data we write a message to player outputChatBox("[PASSPORT] You dont have a passport, to see a passport you need to create one first!",hitElement,104,255,104) end end end end) Client Side we have to add this -> local on = 0 addEvent("viewPassport",true) addEventHandler("viewPassport",getRootElement(),function(rezult) if on == 1 then return outputChatBox("[PASSPORT] Your passport window is open already!",104,250,104) end on = 1 window = guiCreateWindow((sw-400)/2,(sh-400)/2,300,200,"Passport Data") guiWindowSetMovable(window,false) guiWindowSetSizable(window,false) passport_info = guiCreateMemo(10,20,380,275,"FirstName: "..rezult[1]['firstname'].."\nLastName: "..rezult[1]['lastname'].."\nAge: "..rezult[1]['age'].."\nCountry: "..rezult[1]['country'].."",false,window) guiMemoSetReadOnly(passport_info,true) close_passport = guiCreateButton(10,170,380,125,"CLOSE",false,window) showCursor(true) addEventHandler("onClientGUIClick",close_passport,close_pass,false) end) close_pass = function(button,state) if (button == "left") and (state == "up") then showCursor(false) guiSetVisible(window,false) on = 0 end end Sure on client side you can create with dgs what i made like the window,button and the memo the way you want. I used the normal gui because i am used to it and i dont use any library. Also a link to sqlite browser to check if your table is created and data is inserted into the table. https://sqlitebrowser.org/dl/
  22. Well if you have a checkpoint marker and there is not a big building around you will see a big part of the marker but if you use any other marker your object alpha should be as low as possible to see the marker.
  23. From what i know a marker is always visible. A marker is not visible if u set the alpha to 0 or you make the marker visible to a certain element or you change the marker dimension.
  24. If i am correct you should stop the server and you should open acl.xml and there look for loadstring permission and change true with false for every class.
  25. Well you have to do it like this addCommandHandler('getdata',function(player,commandName) local playersData = {} local accounts = getAccounts() if player then for k,account in ipairs(accounts) do playersData[k] = getAccountData(account,"acc:nickname") end outputChatBox(tostring(inspect(playersData)),player) end end,false,false)
×
×
  • Create New...