Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-01-30, 23:15


TheMarcin450

Grafika/Lua






Wiek: 27
Na forum: 3589 dni
Posty: 20
Nick w MP: TheMarcin450

Piwa: 2094

Respekt: 90

Ostrzeżeń: 20%
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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-30, 23:48


awfesa







Wiek: 29
Na forum: 4705 dni
Posty: 563

Piwa: 223

Respekt: 280
Respekt: 280Respekt: 280Respekt: 280

Zobacz

if ile <= 10 and typ=="m" then 
outputChatBox("Minimum 10 minut"plr255255255)return 
end


Podpis

Cokolwiek robicie w swoim życiu, nie będzie to legendarne,
jeżeli wasi przyjaciele nie będą mogli tego zobaczyć.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-01, 22:15


TheMarcin450

Grafika/Lua






Wiek: 27
Na forum: 3589 dni
Posty: 20
Nick w MP: TheMarcin450

Piwa: 2094

Respekt: 90

Ostrzeżeń: 20%
Niestety, wywala b??d w konsoli

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-02, 01:13


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

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
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-03, 14:17


Cjalis







Wiek: 35
Na forum: 3543 dni
Posty: 26
Nick w MP: Cejot

Piwa: 36

Respekt: 70


if ile <= 10 and typ=="m" then 
outputChatBox("Minimum 10 minut"plr255255255) return 
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-03, 14:47


R3fr3Sh







Wiek: 27
Na forum: 4800 dni
Posty: 70

Piwa: 60

Respekt: 150
Respekt: 150Respekt: 150

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 :) "plr255255255) 
  return 
end 


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
TheMarcin450
Wysłany: 2017-02-11, 23:58


TheMarcin450

Grafika/Lua






Wiek: 27
Na forum: 3589 dni
Posty: 20
Nick w MP: TheMarcin450

Piwa: 2094

Respekt: 90

Ostrzeżeń: 20%
Dzi?ki masz piwo ;)

Postaw piwo autorowi tego posta
 

 
Tagi: minimalny :: czas
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku