addCommandHandler(\"ban\",function(playerSource,commandName,targetPlayer,ttime,...)if getElementData(playerSource, \"acc.adminLevel\") >= 3 then local ttime = tonumber ( ttime ) if targetPlayer and ttime then local targetPlayer, targetPlayerName = exports[\'nl_system\']:findPlayerByPartialNick(thePlayer,targetPlayerNick,nil,1) local pSerialC = getPlayerSerial(targetPlayer) local duration = (ttime*60)*60 local reason = table.concat({...}, \" \") local adminName = getPlayerAdminName(playerSource) local time = getRealTime() local hours = time.hour local minutes = time.minut date = string.format(\"%04d.%02d.%02d\", time.year + 1900, time.month + 1, time.monthday ) if ttime == 0 then dbExec(connection ,\"INSERT INTO bans SET accountID=?, bannedBy=?, timeZone=?, playerSerial=?, reason = ?, playername=?,Date=?\",getElementData(targetPlayer, \"acc.accountID\"), adminName ,23414590357, pSerialC, reason,targetPlayerName,date) else dbExec(connection ,\"INSERT INTO bans SET accountID=?, bannedBy=?, timeZone=?, playerSerial=?, reason = ?, playername=?,Date=?\",getElementData(targetPlayer, \"acc.accountID\"), adminName ,getRealTime()[\"timestamp\"]+duration, pSerialC, reason,targetPlayerName,date) end if ttime == 0 then text = \"Örök\" else text = ttime .. \" óra\" end kickPlayer (targetPlayer, adminName, reason ) outputChatBox(\"BAN - \"..adminName .. \" kitiltotta \".. targetPlayerName ..\" játékost.\",root,225, 0, 0,true) outputChatBox(\"BAN - Kitiltás ideje: \" .. text .. \" - Indok: \" .. reason .. \"\",root,225, 0, 0,true) else outputChatBox (\"Használat:#ffffff /\" .. commandName .. \" [iD] [óra (0 - örök)] [indok]\", playerSource,141,177,61,true) endendend)addCommandHandler(\"kick\",function(playerSource,cmd, player,...)if getElementData(playerSource,\"acc.adminLevel\") >= 8 then local Text = table.concat({...},\" \") if player and (Text or Text ~= \"\") then local targetPlayer, targetPlayerName = exports[\'nl_system\']:findPlayerByPartialNick(thePlayer,targetPlayerNick,nil,1) kickPlayer ( targetPlayer, playerSource, Text ) else outputChatBox(\"#ffffff/\".. cmd ..\" [Név] [szöveg]\", playerSource,166,196,103,true) endendend)
Üdv!Valamiért nem akar müködni a kick/ban parancs, az ugyan ezen alapuló unban parancs azonban működik szóval nem értem mi lehet a gondjaA megadott admin level szint is meg volt adva.(Igen, a lent látható script egy más által készített script, ezért a fejemet ne vegyétek)Előre is köszönöm a segítséget!Script: addCommandHandler(\"ban\",function(playerSource,commandName,targetPlayer,ttime,...)if getElementData(playerSource, \"acc.adminLevel\") >= 3 then local ttime = tonumber ( ttime ) if targetPlayer and ttime then local targetPlayer, targetPlayerName = exports[\'nl_system\']:findPlayerByPartialNick(thePlayer,targetPlayerNick,nil,1) local pSerialC = getPlayerSerial(targetPlayer) local duration = (ttime*60)*60 local reason = table.concat({...}, \" \") local adminName = getPlayerAdminName(playerSource) local time = getRealTime() local hours = time.hour local minutes = time.minut date = string.format(\"%04d.%02d.%02d\", time.year + 1900, time.month + 1, time.monthday ) if ttime == 0 then dbExec(connection ,\"INSERT INTO bans SET accountID=?, bannedBy=?, timeZone=?, playerSerial=?, reason = ?, playername=?,Date=?\",getElementData(targetPlayer, \"acc.accountID\"), adminName ,23414590357, pSerialC, reason,targetPlayerName,date) else dbExec(connection ,\"INSERT INTO bans SET accountID=?, bannedBy=?, timeZone=?, playerSerial=?, reason = ?, playername=?,Date=?\",getElementData(targetPlayer, \"acc.accountID\"), adminName ,getRealTime()[\"timestamp\"]+duration, pSerialC, reason,targetPlayerName,date) end if ttime == 0 then text = \"Örök\" else text = ttime .. \" óra\" end kickPlayer (targetPlayer, adminName, reason ) outputChatBox(\"BAN - \"..adminName .. \" kitiltotta \".. targetPlayerName ..\" játékost.\",root,225, 0, 0,true) outputChatBox(\"BAN - Kitiltás ideje: \" .. text .. \" - Indok: \" .. reason .. \"\",root,225, 0, 0,true) else outputChatBox (\"Használat:#ffffff /\" .. commandName .. \" [iD] [óra (0 - örök)] [indok]\", playerSource,141,177,61,true) endendend)addCommandHandler(\"kick\",function(playerSource,cmd, player,...)if getElementData(playerSource,\"acc.adminLevel\") >= 8 then local Text = table.concat({...},\" \") if player and (Text or Text ~= \"\") then local targetPlayer, targetPlayerName = exports[\'nl_system\']:findPlayerByPartialNick(thePlayer,targetPlayerNick,nil,1) kickPlayer ( targetPlayer, playerSource, Text ) else outputChatBox(\"#ffffff/\".. cmd ..\" [Név] [szöveg]\", playerSource,166,196,103,true) endendend)
<group name=\"Admin\"> <acl name=\"Moderator\"></acl> <acl name=\"SuperModerator\"></acl> <acl name=\"Admin\"></acl> <acl name=\"RPC\"></acl> <object name=\"resource.*\"></object> </group><acl name=\"Admin\"><right name=\"function.kickPlayer\" access=\"true\" />(és még tovább a többi...) </acl>