Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: zapisie
1. pętla w zapisie logów
witam robi mi si? p?tla w mysql zapisywaniu nie wiem jak to rozwi?za? je?li jest tyle os?b na duty tyle razy zapisuje si? text w mysql a nie 1 rekord kod : [lua]
addCommandHandler('e', function(plr,cmd, ...)
local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
if not getElementData(plr,"admin") then return end
if getElementData(plr,"admin") then
local ranga = test
if not ... then
local x = getElementData(plr,"ekipaoff")
if x == false then
exports["noti"]:noti("Wy??czy?e? czat ekipy",plr)
setElementData(plr,"ekipaoff",true)
end
if x == true then
exports["noti"]:noti("W??czy?e? czat ekipy",plr)
setElementData(plr,"ekipaoff",false)
end
return end
if ... then
if getElementData(plr,"ekipaoff") == true then exports["noti"]:noti("Posiadasz wy??czone wiadomo?ci tego czatu, nie mo?esz na nim pisa?!", plr) return end
local msg=table.concat({...}, " ")
if (getAdmin(plr,4)) then
ranga = "CEO"
end
if (getAdmin(plr,3)) then
ranga = "Starszy Administrator"
end
if (getAdmin(plr,2)) then
ranga = "Administrator"
end
if (getAdmin(plr,1)) then
ranga = "Support"
en...
2. Jak operować na danym zapisie czasu
Hmm jak operowa? zapisem czasu z mysql w lua? W mysql zapis mam taki: 2017-03-21 oraz 2017-03-28 wi?c jak takie co? od siebie odj??? Pr?bowa?em to normalnie odj?? to wyskakuje b??d ?e pr?buj? operowa? na stringach, bo wiadomo s? my?lniki w tym zapisie.