Sprawdzi?em tak, jak ja to robi? przy swoich skryptach.
Wysz?o na to, ?e duty ~= false.
duty = false
isAdmin = true
nick = "Szydlo"
password = "qwerty"
function duty()
if duty == false then
print("1. duty == false")
if isAdmin == true then
print("1. isAdmin == true")
if nick == "Szydlo" and password == "qwerty" then
print("1. nick and password")
if duty == true then
print("1. duty == true")
else
duty = true
outputChatBox("Rozpoczo?e? prace jako ADMIN poprawnie!")
end
else
outputChatBox("Zly login lub haslo")
end
else
outputChatBox("Nie masz uprawnien!")
end
else
print("1. duty ~= false")
end
end
addCommandHandler("duty", duty)
Wynik: INFO: 1. duty ~= false
[ Dodano: 2017-10-26, 22:23 ]
Ja bym to zrobi? tak,
duty = false
isAdmin = true
nick = "Szydlo"
password = "qwerty"
function dutyGTAO(plr)
if duty == false then
if isAdmin == true then
if nick == 'Szydlo' and password == 'qwerty' then
duty = true
outputChatBox("Rozpocz?e? prace jako ADMIN poprawnie!", plr)
else
outputChatBox("Z?y login lub haslo", plr)
end
else
outputChatBox("Nie masz uprawnie?!", plr)
end
elseif duty == true then
outputChatBox("Zako?czy?e? prace jako ADMIN poprawnie!", plr)
duty = false
elseif duty ~= false and duty ~= true then
print("B??d: duty nie jest ani false, ani true")
end
end
addCommandHandler("testduty", dutyGTAO)
aczkolwiek zmieni?bym te zmienne na elementdaty lub co? innego.
Elemnet daty nie umiem, exporty nie umiem i interplateBetwen nie umiem. A na razie tylko to jest mi potrzebne. Wi?c m?g? by? przerobi? na element date?
Podpis
Aktualny najlepszy kontakt do mnie: Szydlo#8134 (Discord)
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