Hej, szukam sposobu jak zakodować tak skrypt, żeby gracz w resource nie miał w pliku skryptu, nic. Tak jak jest to na większości serwerów, nie ma żadnego zakodowania typu .luac. Po prostu folder jest jakby pusty.
Mam logowanie, kt?re jest pod ACL a chcia?bym aby by?o pod pysa lub baze danych SQL.
Server.lua
[lua]function PlayerLogin(username, password, checksave)
if not (username == "") then
if not (password == "") then
local account = getAccount ( username, password )
if ( account ~= false ) then
if checksave == true then
triggerClientEvent(source, "saveLoginToXML", getRootElement(), username, password)
else
triggerClientEvent(source, "resetSaveXML", getRootElement(), username, password)
end
local chek = logIn(source, account, password)
if chek then
triggerClientEvent(source, "setLoginPanelVisible", getRootElement(), false)
else
triggerClientEvent(source, "showWarning", getRootElement(), 1, false, "Konto jest ju? zarejestrowane.")
end
else
triggerClientEvent(source, "showWarning", getRootElement(), 1, false, "B??d! Niepoprawne has?o lub login.")
triggerClientEvent(source, "showWarning", getRootElement(), 2, false, "B??d! Niepoprawne has?o lub login.")
end
else
triggerClientEvent(source, "showWarning", getRootElement(), 2, false, "Wpisz has?o")
end
else
triggerClientEvent(source, "showWarning", getRootElement(), 1, false, " Wpisz login")
end
end
addEvent("onRequestLogin", true)
addEventHandler(&qu...
[lua]local screenW, screenH = guiGetScreenSize()
local sx, sy = guiGetScreenSize()
local w, h=(sx/1680), (sy/1050)
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
local tabulator = false
local czcionka = dxCreateFont("f.ttf", 11*w)
local czcionka2 = dxCreateFont("f.ttf", 17*w)
local k = 1
local n = 13
local m = 13
if not czcionka then
czcionka = "default"
end
local zakladki = {
id = "ID",
name = "Nazwa",
reputation = "RP",
organization = "Organizacja",
uid = "UID",
ping = "Ping",
faction = "Frakcja",
forum = "mta-storiesrpg.pl"
}
local ss = 1
local tabulator=false
local ping = {}
function sort(op1, op2)
if isElement(op1) and isElement(op2) then
return getElementData(op1, "id") < getElementData(op2, "id")
end
end
function gui()
local players = {}
for i,v in ipairs(getElementsByType("player")) do
table.insert(players, v)
end
table.sort(players, sort)
Witajcie, nie wiem jak ustawi? zabieranie prawa jazdy na czas. Mam kompletny i autorski skrypt na prawo jazdy, ale nie umiem ustawi? tak, by mo?na by?o zabiera? je na czas.
Witam,
mam kod na tekst 3d, wszystko ?adnie dzia?a, tylko nie wiem jak zrobi?, aby tekst by? widoczny w maksymalnej odleg?o?ci 20m. W tym kodzie tekst wida? na ca?ej mapie
Bardzo prosz? o pomoc. Browce czekaj? .