Wysłany: 2017-01-30, 23:15
TheMarcin450
Grafika/Lua
Wiek: 27 Na forum: 3590 dni Posty: 20
Nick w MP: TheMarcin450
Piwa : 2094
Witam! Mam problem tego typu i? chc? doda? zabezpieczenie do tego skryptu, polegaj?ce na tym ?e minimalny czas uwi?zienia to 10 minut.
Wklei?em co? takiego, lecz teraz wog?le nie mo?na uwi?zi? nikogo gdy typ to minuta.
Cytat: if #ile <= 10 and typ=="m" then
outputChatBox("Minimum 10 minut", plr, 255, 255, 255)return
end
Tutaj reszta kodu:
Cytat: function ajotceju(plr,cmd,cel,ile,typ,...)
if exports["dutyadmin"]:getAdmin(plr, 4) then
if not cel or not ile or not typ or not ... then
outputChatBox("U?ycie: /aj <gracz/ID> <czas> <m/h/d/y> <pow?d>", plr, 255, 255, 255)
return
end
local zaco=table.concat({...}, " ")
local target=exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("Nie znaleziono podanego gracza.", plr, 255, 255, 255)
return
end
if #ile <= 10 and typ=="m" then
outputChatBox("Minimum 10 minut ", plr, 255, 255, 255)return
end
cela=1
if typ=="m" or typ=="h" or typ=="d" or typ=="y" then
exports["ogrpg-db"]:dbSet("INSERT INTO admin_logs_cmd (uid,moderator,cmd) VALUES (?,?,?)", getElementData(plr,"player:uid"), getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), "?agier "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."")
removePedFromVehicle(plr)
if typ=="m" then
exports["ogrpg-db"]:dbSet("INSERT INTO aj (Serial,Termin,Cela,Powod) VALUES (?,NOW() + INTERVAL minute,??,?)", getPlayerSerial(target), ile,cela, zaco)
triggerClientEvent(root, "admin:rendering", root, "* "..getPlayerName2(target).."("..getElementData(target,"id")..") zosta? uwi?ziony w ?agrze na: "..ile.." minut! Od: "..getPlayerName2(plr).." | "..zaco.."")
end
if typ=="d" then
exports["ogrpg-db"]:dbSet("INSERT INTO aj (Serial,Termin,Cela,Powod) VALUES (?,NOW() + INTERVAL day,??,?)", getPlayerSerial(target), ile,cela, zaco)
triggerClientEvent(root, "admin:rendering", root, "* "..getPlayerName2(target).."("..getElementData(target,"id")..") zosta? uwi?ziony w ?agrze na: "..ile.." dni! Od: "..getPlayerName2(plr).." | "..zaco.."")
end
if typ=="h" then
exports["ogrpg-db"]:dbSet("INSERT INTO aj (Serial,Termin,Cela,Powod) VALUES (?,NOW() + INTERVAL hour,??,?)", getPlayerSerial(target), ile,cela, zaco)
triggerClientEvent(root, "admin:rendering", root, "* "..getPlayerName2(target).."("..getElementData(target,"id")..") zosta? uwi?ziony w ?agrze na: "..ile.." godzin! Od: "..getPlayerName2(plr).." | "..zaco.."")
end
if typ=="y" then
exports["ogrpg-db"]:dbSet("INSERT INTO aj (Serial,Termin,Cela,Powod) VALUES (?,NOW() + INTERVAL year,??,?)", getPlayerSerial(target), ile,cela, zaco)
triggerClientEvent(root, "admin:rendering", root, "* "..getPlayerName2(target).."("..getElementData(target,"id")..") zosta? uwi?ziony w ?agrze na: "..ile.." lat! Od: "..getPlayerName2(plr).." | "..zaco.."")
end
sprawdz(target)
sprawdzczas(target)
removePedFromVehicle(target)
end
end
end
addCommandHandler("aj", ajotceju)
Wysłany: 2017-01-30, 23:48
awfesa
Wiek: 29 Na forum: 4705 dni Posty: 563
Piwa : 223
Zobacz
if ile <= 10 and typ == "m" then
outputChatBox ( "Minimum 10 minut" , plr , 255 , 255 , 255 )return
end
Podpis
Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Wysłany: 2017-02-01, 22:15
TheMarcin450
Grafika/Lua
Wiek: 27 Na forum: 3590 dni Posty: 20
Nick w MP: TheMarcin450
Piwa : 2094
Niestety, wywala b??d w konsoli
Wysłany: 2017-02-02, 01:13
mixLoLmix2
Programista
Wiek: 35 Na forum: 4113 dni Posty: 454
Nick w MP: TomeQmix
Piwa : 1915
A moze powiedz jaki
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Wysłany: 2017-02-03, 14:17
Cjalis
Wiek: 35 Na forum: 3543 dni Posty: 26
Nick w MP: Cejot
Piwa : 36
if ile <= 10 and typ == "m" then
outputChatBox ( "Minimum 10 minut" , plr , 255 , 255 , 255 ) return
end
Wysłany: 2017-02-03, 14:47
R3fr3Sh
Wiek: 27 Na forum: 4800 dni Posty: 70
Piwa : 60
B??d pewnie brzmia? tak "Attempt to compare string value with a number!"
if typ == "m" and tonumber ( ile ) and tonumber ( ile ) <= 10 then
outputChatBox ( "Minimum 10 minut :) " , plr , 255 , 255 , 255 )
return
end
Więcej szczegółów
Wystawiono 1 piw(a):TheMarcin450
Wysłany: 2017-02-11, 23:58
TheMarcin450
Grafika/Lua
Wiek: 27 Na forum: 3590 dni Posty: 20
Nick w MP: TheMarcin450
Piwa : 2094
Dzi?ki masz piwo
Tagi: minimalny :: czas
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: