Cze??. Mam problem z systemem pm'ek, poniewa? dzia?a ju? /pmoff ale wiadomo?ci nie maj? spacji, czyli "/pm 1 jestem tu" wychodzi "(0): jestemtu". Wiecie co jest ?le? Stawiam
Ja w?a?nie nie wiem co jest ?le, bo kolega mi to wys?a?
[ Dodano: 2015-09-19, 12:38 ]
OK, dzia?a ale jeszcze taki problem. Jak wpisz? /pmoff to mam spam wiadomo?ci? "((Nie akceptujesz wiadomo?ci PM))" i tak samo jak wpisz? /pmon. W tym gdzie jest b??d??
function prywatneWiadomosci(plr, cmd, cel, ...)
if (#arg<=0 or (not cel)) then
outputChatBox("U?yj: /pm <nick/id> <tresc>", plr)
return
end
local target = findPlayer(plr, cel)
if (not target) then
outputChatBox("Nie znaleziono gracza o podanym ID/nicku!", plr)
return
end
local pwoff = getElementData(target, "pwoff")
if (pwoff) then
outputChatBox(getPlayerName(target).." nie akceptuje wiadomo?ci PW.", plr)
if (type(pwoff)=="string") then
outputChatBox("Pow?d: " .. pwoff, plr)
end
return
end
if getElementData(plr, "pwoff") then
outputChatBox("Posiadasz wy??czone odbieranie wiadomo?ci, ta osoba nie b?dzie mog?a Ci odpisa?.", plr)
end
local tresc = table.concat(arg, " ")
outputChatBox("<< #24BA02".. getPlayerName(plr) .."#FFF79C[".. getPlayerID(plr) .."]:#ffffff ".. tresc, target, 255, 255, 255, true )
outputChatBox(">> #24BA02".. getPlayerName(target) .."#FFF79C["..getPlayerID(target) .."]:#ffffff ".. tresc, plr, 255, 255, 255, true )
playSoundFrontEnd(target,12)
end
addCommandHandler("pm", prywatneWiadomosci)
addCommandHandler("pw", prywatneWiadomosci)
addCommandHandler("pmon", function(plr, cmd)
removeElementData(plr, "pwoff")
outputChatBox("(( Odbieranie wiadomo?ci w??czone. ))", plr)
return
end)
addCommandHandler("pmoff", function(plr, cmd, ...)
local powod = table.concat(arg, " ")
if (not powod or string.len(powod)<2) then powod = true end
setElementData(plr, "pwoff", powod)
outputChatBox("(( Odbieranie wiadomo?ci wy??czone. ))", plr)
return
end)
Zamie? sobie tw?j kod na ten Dzia?a na 100% testowa?em
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