Jump to content

WcaleNieTenCoZawsze

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

WcaleNieTenCoZawsze's Achievements

Square

Square (6/54)

1

Reputation

  1. @Burak5312 I do not know if you know but this link does not work, so I ask if someone can send me maps Nie wiem czy wiesz ale ten link nie działa dlatego pytam czy ktoś może podesłać mi mapy
  2. Hello! Anyone have 1.2 r20 tactic maps? I will be grateful if someone has them and sends them because they are terribly hard to find on the Internet.
  3. @Hydra It's Work't local w, h = guiGetScreenSize () function glue(thePlayer, cmd) local tx, ty, tz = getWorldFromScreenPosition ( w/2, h/2, 50 ) local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, tx, ty, tz ) if hit then attachElements(theElement, theElementToAttach, posX, posY, posZ, rotX, rotY, rotZ) end end addCommandHandler("glue", glue)
  4. @Burak5312 Can you write a sample script so I know what to base on?
  5. How do I attach a player to a map element? So if I would, for example, stand on a lamp that was created with a map editor and after entering the command / glue, I would attach to it
  6. I don't really understand, can you help me, how do I add more characters to the lock?
  7. addEvent("core:spawnPlayer", true) addEventHandler("core:spawnPlayer", root, function() local pos=getElementData(source,"player:spawn") if not pos then return end fadeCamera(source, true) spawnPlayer(source, pos[1], pos[2], pos[3]) setCameraTarget(source,source) toggleControl(source,"fire", true) toggleControl(source,"aim_weapon", true) local load=loadPlayerData(source) if load then if string.find(getPlayerName(source), "=") then kickPlayer(source, "Znaki specialne typu [email protected]#$%^ Są zabronione!") else exports.VCSMTA_NOTIFICATION:outputDx(source, "Witamy na Vice MTA 2.0! Życzymy miłej gry!", "success") end setElementData(source,'HS_accountName',getPlayerName(source)); setElementData(source,"player:online",0) if getElementData(source,"player:premium") then local queryA=string.format("SELECT * FROM pystories_users WHERE id=%d AND premiumdate>NOW() LIMIT 1", getElementData(source,"player:sid")) local resultA=exports["DB2"]:pobierzWyniki(queryA) if (resultA) then end end triggerClientEvent(source,"core:blipyaut",root,source) end end) Hello, how can I add more locked characters in nickname here than just =?
  8. Error: https://imgur.com/JjjGaVl Hello, this error pops up in the login panel, but it does not provide the entire panel panel. Please correct any mistakes. Where is wrong code? c.lua function auth(username, password) if not username then responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A1]") return end if not password then responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A2]") return end local q = exports.["pystories-db"]:mysql_query("SELECT * FROM pystories_users WHERE login=? AND password=?", username, md5(password)) if #q > 1 then -- Znaleziono więcej niż 1 usera o podanej kombinacji loginu i hasła responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A3]") elseif #q < 1 then -- Nie znaleziono żadnego usera o podanej kombinacji loginu i hasła responseServerValue(source, "Taki użytkownik nie istnieje") else -- Jest tylko jeden user! Hura! local player = source if not player then return end setElementData(player, "player:sid", q[1].sid) if string.len(q[1].imie) < 3 then triggerClientEvent(player, "openAcc", player) return end local pos = split(q[1].position, ",") spawnPlayer(player, pos[1], pos[2], pos[3], pos[4], q[1].skin, pos[5], pos[6]) setCameraTarget(player, player) setElementHealth(player, q[1].health) -- Tutaj reszta ladowania się setElementData(player, "user:imie", q[1].imie) setElementData(player, "user:nazwisko", q[1].nazwisko) setElementData(player, "user:plec", q[1].plec) triggerClientEvent(player, "destroyLogin", player) end end addEvent("auth", true) addEventHandler("auth", getRootElement(), auth)
  9. Error: https://imgur.com/JjjGaVl Hello, this error pops up in the login panel, but it does not provide the entire panel panel. Please correct any mistakes. Where is wrong code? c.lua function auth(username, password) if not username then responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A1]") return end if not password then responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A2]") return end local q = exports.["pystories-db"]:mysql_query("SELECT * FROM pystories_users WHERE login=? AND password=?", username, md5(password)) if #q > 1 then -- Znaleziono więcej niż 1 usera o podanej kombinacji loginu i hasła responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A3]") elseif #q < 1 then -- Nie znaleziono żadnego usera o podanej kombinacji loginu i hasła responseServerValue(source, "Taki użytkownik nie istnieje") else -- Jest tylko jeden user! Hura! local player = source if not player then return end setElementData(player, "player:sid", q[1].sid) if string.len(q[1].imie) < 3 then triggerClientEvent(player, "openAcc", player) return end local pos = split(q[1].position, ",") spawnPlayer(player, pos[1], pos[2], pos[3], pos[4], q[1].skin, pos[5], pos[6]) setCameraTarget(player, player) setElementHealth(player, q[1].health) -- Tutaj reszta ladowania się setElementData(player, "user:imie", q[1].imie) setElementData(player, "user:nazwisko", q[1].nazwisko) setElementData(player, "user:plec", q[1].plec) triggerClientEvent(player, "destroyLogin", player) end end addEvent("auth", true) addEventHandler("auth", getRootElement(), auth) function register(username, password) if not username then responseServerValue(source,"Błąd rejestracji. Kod błędu [ERR_R1]") return end if not password then responseServerValue(source, "Błąd rejestracji. Kod błędu [ERR_R2]") return end local q1 = exports.["pystories-db"]:mysql_query("SELECT sid FROM pystories_users WHERE login=?", username) if not q1 then responseServerValue(source, "Błąd rejestracji. Kod błędu [ERR_R4]") return elseif #q1 > 0 then responseServerValue(source,"Podany login jest już w użyciu") return end local serial = getPlayerSerial(source) local q3 = exports.["pystories-db"]:mysql_query("INSERT INTO pystories_users SET login=?, password=?, serial=?, position=?", username, md5(password), serial, "175.04,-1912.49,13.56,188,0,0") -- Pozycja startu if q3 then responseServerValue(source, "Twoje konto zostało poprawnie utworzone \nMożesz się teraz zalogować i utworzyć swoją postać") else responseServerValue(source, "Błąd rejestracji. Kod błędu [ERR_R7]") end end addEvent("register", true) addEventHandler("register", getRootElement(), register) function accCreate(imie, nazwisko, plec, skin, username, password) local sid = getElementData(source, "player:sid") imie = string.lower(imie) nazwisko = string.lower(nazwisko) imie = imie:gsub("^%l", string.upper) nazwisko = nazwisko:gsub("^%l", string.upper) local q3 = exports.["pystories-db"]:mysql_query("SELECT imie AND nazwisko FROM accounts WHERE imie=? AND nazwisko=?", imie, nazwisko) if not q3 then responseServerValue(source, "Błąd rejestracji. Kod błędu [ERR_C1]") return elseif #q3 > 0 then responseServerValue(source, "Osoba o takim imieniu i nazwisku już istnieje") return end local q3 = exports.["pystories-db"]:mysql_query("UPDATE pystories_users SET imie=?, nazwisko=?, plec=?, skin=? WHERE sid=?", imie, nazwisko, plec, skin, sid) if q3 then auth(username, password) else responseServerValue(source,"Błąd rejestracji. Kod błędu [ERR_C2]") end end addEvent("accCreate", true) addEventHandler("accCreate", getRootElement(), accCreate) function quit(quitType) local sid = getElementData(source, "player:sid") local x,y,z = getElementPosition(source) local _,_,rz = getElementRotation(source) local int = getElementInterior(source) local dim = getElementDimension(source) local health = getElementHealth(source) local pos = string.format("%d, %d, %d, %d, %d, %d", x,y,z,rz,int,dim) local q = exports.["pystories-db"]:mysql_query("UPDATE pystories_users SET position=?, health=? WHERE sid=?", pos, health, sid) if not q then print("### [pystories_users] Błąd zapisu gracza o SID: "..sid) end end addEventHandler("onPlayerQuit", getRootElement(), quit) function responseServerValue(plr, msg) triggerClientEvent(plr, "loginMessage", plr, msg) end
×
×
  • Create New...