Szerző Téma: Admin rendszer probléma  (Megtekintve 1581 alkalommal)

Admin rendszer probléma
« Dátum: 2014. május 23. - 18:43:02 »
0 Show voters
Sziasztok!
Letöltöttem régebben egy modot és szeretném beüzemelni most , de egy resource megakadályozza ezt!
Tulajdonképpen az a problémám hogy hiába írom be valamelyik parancsot , egyik se mûködik , mivel nem vagyok scripter ezért gondoltam itt kérdezem meg!
DebugScripttel próbálkoztam viszont nem adott ki hibát rá!

 mysql = exports.mysql
-- ADMIN HISTORY:
-- 0: jail
-- 1: kick
-- 2: ban
-- 3: forceapp
-- 4: warn
-- 5: auto-ban
--
function gotoxyz_func ( player, cmd, x, y, z )
setElementPosition ( player, tonumber(x), tonumber(y), tonumber(z) )
end
addCommandHandler ( \"gotoxyz\", gotoxyz_func )
local getPlayerName_ = getPlayerName
getPlayerName = function( ... )
s = getPlayerName_( ... )
return s and s:gsub( \"_\", \" \" ) or s
end
-- wardrobe temp fix..
function fixWardrobe(thePlayer)
if ( getElementData(thePlayer, \"loggedin\") == 1 ) then
local dimension = getElementDimension(thePlayer)
local interior = getElementInterior(thePlayer)
if ( dimension >= 65000 and interior == 14 ) then
   setElementPosition(thePlayer, 1520.0029296875, -1701.2421875, 13.546875)
   setPedRotation(thePlayer, 275.82971191406)
   setElementDimension(thePlayer, 0)
   setElementInterior(thePlayer, 0)
else
   outputChatBox(\"Nincs wardrobe bugod.\", thePlayer, 255, 0, 0)
end
else
outputChatBox(\"Nincs wardrobe bugod.\", thePlayer, 255, 0, 0)
end
end
addCommandHandler(\"fixwardrobe\", fixWardrobe)
function adminUncuff(thePlayer, commandName, targetPlayer)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      local username = getPlayerName(thePlayer)
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local restrain = getElementData(targetPlayer, \"restrain\")
         if (restrain==0) then
            outputChatBox(\"A játékos nincs lefogva.\", thePlayer, 255, 0, 0)
         else
            outputChatBox(targetPlayerName .. \": levetted róla a bilincset.\", thePlayer)
            outputChatBox(\"\" .. username .. \": levette rólad a bilincset.\", targetPlayer)
            toggleControl(targetPlayer, \"sprint\", true)
            toggleControl(targetPlayer, \"fire\", true)
            toggleControl(targetPlayer, \"jump\", true)
            toggleControl(targetPlayer, \"next_weapon\", true)
            toggleControl(targetPlayer, \"previous_weapon\", true)
            toggleControl(targetPlayer, \"accelerate\", true)
            toggleControl(targetPlayer, \"brake_reverse\", true)
            toggleControl(targetPlayer, \"aim_weapon\", true)
            toggleAllControls(targetPlayer, true,true,true)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrain\", 0)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedBy\")
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedObj\")
            exports.global:removeAnimation(targetPlayer)
            mysql:query_free(\"UPDATE characters SET cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) )
            exports[\'item-system\']:deleteAll(47, getElementData( targetPlayer, \"dbid\" ))
         end
      end
   end
end
end
end
end
addCommandHandler(\"auncuff\", adminUncuff, false, false)
--/AUNMASK
function adminUnmask(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      local username = getPlayerName(thePlayer)
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local gasmask = getElementData(targetPlayer, \"gasmask\")
         local mask = getElementData(targetPlayer, \"mask\")
         local helmet = getElementData(targetPlayer, \"helmet\")
         if (gasmask==1 or mask==1 or helmet==1) then
            local name = targetPlayerName:gsub(\"_\", \" \")
            setPlayerNametagText(targetPlayer, tostring(name))
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"gasmask\")
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"mask\")
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"helmet\")
            outputChatBox(\"Levetted a maszkot róla: \" .. name .. \".\", thePlayer, 255, 0, 0)
         else
            outputChatBox(\"A játékoson nincs MASK.\", thePlayer, 255, 0, 0)
         end
      end
   end
end
end
end
addCommandHandler(\"aunmask\", adminUnmask, false, false)
function asay(thePlayer, commandName, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /am [Admin Üzenet]\", thePlayer, 255, 194, 15)
else
   local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
   message = table.concat({...}, \" \")
   local playerName = getPlayerName(thePlayer)
   outputChatBox(adminrang .. \": \"  .. message, getRootElement(), 255, 128, 0,true)
end
end
end
addCommandHandler(\"asay\", asay, false, false)
function asayn(thePlayer, commandName, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /am [Admin Üzenet]\", thePlayer, 255, 194, 15)
else
   local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
   message = table.concat({...}, \" \")
   local playerName = getPlayerName(thePlayer)
   outputChatBox(adminrang .. \" \" .. playerName .. \": \" .. message, getRootElement(), 255, 0, 0,true)
end
end
end
addCommandHandler(\"asayn\", asayn, false, false)
function adminUnblindfold(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      local username = getPlayerName(thePlayer)
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local blindfolded = getElementData(targetPlayer, \"rblindfold\")
         if (blindfolded==0) then
            outputChatBox(\"A játékosnak nincs bekötve a szeme!\", thePlayer, 255, 0, 0)
         else
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"blindfold\")
            fadeCamera(targetPlayer, true)
            outputChatBox(\"Levetted \" .. targetPlayerName .. \"-rõl a kötést.\", thePlayer)
            mysql:query_free(\"UPDATE characters SET blindfold = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) )
         end
      end
   end
end
end
end
addCommandHandler(\"aunblindfold\", adminUnblindfold, false, false)
-- /MUTE
function mutePlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local muted = getElementData(targetPlayer, \"muted\")
         if (muted==0) then
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"muted\", 1)
            outputChatBox(targetPlayerName .. \" némítva lett az OOC-rõl.\", thePlayer, 255, 0, 0)
            outputChatBox(\"Némítva lettél az OOC-rõl \'\" .. getPlayerName(thePlayer) .. \"\' által.\", targetPlayer, 255, 0, 0)
         else
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"muted\", 0)
            outputChatBox(targetPlayerName .. \"-rõl levetted az OOC némítást.\", thePlayer, 0, 255, 0)
            outputChatBox(\"\'\" .. getPlayerName(thePlayer) .. \"\' levette rólad az OOC némítást.\", targetPlayer, 0, 255, 0)
         end
         mysql:query_free(\"UPDATE accounts SET muted=\" .. mysql:escape_string(getElementData(targetPlayer, \"muted\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(targetPlayer, \"gameaccountid\")) )
      end
   end
end
end
end
addCommandHandler(\"pmute\", mutePlayer, false, false)
-- /RESKICK
function resKick(thePlayer, commandName, amount)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (amount) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Játékosok száma amennyit kickelni akarsz]\", thePlayer, 255, 194, 14)
else
   amount = tonumber(amount)
   local playercount = getPlayerCount()
   if (amount>=playercount) then
      outputChatBox(\"Nincs elég játékos a kickeléshez. (Jelenleg \" .. playercount .. \" játékos online)\", thePlayer, 255, 0, 0)
   else
      local players = { }
      local count = 1
      for key, value in ipairs(exports.pool:getPoolElementsByType(\"player\")) do
         if not (exports.global:isPlayerAdmin(value)) and not exports.global:isPlayerScripter(value) then
            players[count] = value
            count = count + 1
            if (count==amount) then
               break
            end
         end
      end
      local kickcount = 0
      for key, value in ipairs(players) do
         if (kickcount<amount) then
            local luck = math.random(0, 1)
            if (luck==1) then
               kickPlayer(value, getRootElement(), \"Foglalt slot-ra csatlakoztál\")
               kickcount = kickcount + 1
            end
         end
      end
      outputChatBox(\"\" .. kickcount .. \"/\" .. amount .. \" játékos kickelve.\", thePlayer, 0, 255, 0)
   end
end
end
end
addCommandHandler(\"reskick\", resKick, false, false)
-- /DISARM
function disarmPlayer(thePlayer, commandName, targetPlayer)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isEgyesAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         exports.global:takeAllWeapons(targetPlayer)
         outputChatBox(targetPlayerName .. \" lefegyverezve.\", thePlayer, 255, 194, 14)
         exports.logs:logMessage(\"[/DISARM] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" disarmed \".. targetPlayerName , 4)
      end
   end
end
end
end
end
addCommandHandler(\"disarm\", disarmPlayer, false, false)
-- forceapp
function forceApplication(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [indok]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if not (targetPlayer) then
   elseif exports.global:isPlayerAdmin(targetPlayer) then
      outputChatBox(\"Nem-nem.\", thePlayer, 255, 0, 0)
   else
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         local reason = table.concat({...}, \" \")
         local id = getElementData(targetPlayer, \"gameaccountid\")
         local username = getElementData(thePlayer, \"gameaccountusername\")
         mysql:query_free(\"UPDATE accounts SET appstate = 2, apphandler=\'\" .. mysql:escape_string(username) .. \"\', appreason=\'\" .. mysql:escape_string(reason) .. \"\', appdatetime = NOW() + INTERVAL 1 DAY WHERE id=\'\" .. mysql:escape_string(id) .. \"\'\")
         outputChatBox(targetPlayerName .. \" was forced to re-write their application.\", thePlayer, 255, 194, 14)
         local port = getServerPort()
         local password = getServerPassword()
         local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
         exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" sent \" .. targetPlayerName .. \" back to the application stage.\")
         local res = mysql:query_free(\'INSERT INTO adminhistory (user_char, user, admin_char, admin, hiddenadmin, action, duration, reason) VALUES (\"\' .. mysql:escape_string(getPlayerName(targetPlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(targetPlayer, \"gameaccountid\") or 0)) .. \',\"\' .. mysql:escape_string(getPlayerName(thePlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(thePlayer, \"gameaccountid\") or 0)) .. \',0,3,0,\"\' .. mysql:escape_string(reason) .. \'\")\' )
         redirectPlayer(targetPlayer, \"server.mta.vg\", port, password)
      end
   end
end
end
end
addCommandHandler(\"forceapp\", forceApplication, false, false)
-- /CK
function ckPlayer(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Karakter halál indoka]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         info = table.concat({...}, \" \")
         local query = mysql:query_free(\"UPDATE characters SET cked=\'1\', ck_info=\'\" .. mysql:escape_string(tostring(info)) .. \"\' WHERE id = \" .. mysql:escape_string(getElementData(targetPlayer, \"dbid\")))
         local x, y, z = getElementPosition(targetPlayer)
         local skin = getPedSkin(targetPlayer)
         local rotation = getPedRotation(targetPlayer)
         call( getResourceFromName( \"realism-system\" ), \"addCharacterKillBody\", x, y, z, rotation, skin, getElementData(targetPlayer, \"dbid\"), targetPlayerName, getElementInterior(targetPlayer), getElementDimension(targetPlayer), getElementData(targetPlayer, \"age\"), getElementData(targetPlayer, \"race\"), getElementData(targetPlayer, \"weight\"), getElementData(targetPlayer, \"height\"), getElementData(targetPlayer, \"chardescription\"), info, getElementData(targetPlayer, \"gender\"))
         -- send back to change char screen
         local id = getElementData(targetPlayer, \"gameaccountid\")
         showCursor(targetPlayer, false)
         triggerEvent(\"sendAccounts\", targetPlayer, targetPlayer, id, true)
         exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"loggedin\", 0, false)
         outputChatBox(\"\" .. getPlayerName(thePlayer) .. \" karakter halált osztott ki rád.\", targetPlayer, 255, 194, 14)
         showChat(targetPlayer, false)
         outputChatBox(\"Karakter halált osztottál ki rá: \".. targetPlayerName ..\".\", thePlayer, 255, 194, 1, 14)
         exports.logs:logMessage(\"[/CK] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" CK\'ED \".. targetPlayerName , 4)
         exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"dbid\", 0)
      end
   end
end
end
end
addCommandHandler(\"ck\", ckPlayer)
-- /UNCK
function unckPlayer(thePlayer, commandName, ...)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Játékos teljes neve]\", thePlayer, 255, 194, 14)
else
   local targetPlayer = table.concat({...}, \"_\")
   local result = mysql:query(\"SELECT id FROM characters WHERE charactername=\'\" .. mysql:escape_string(tostring(targetPlayer)) .. \"\' AND cked > 0\")
   if (mysql:num_rows(result)>1) then
      outputChatBox(\"Túl sok találat - A találatok szûkítéséhez írd be a játékos nevét részletesebben.\", thePlayer, 255, 0, 0)
   elseif (mysql:num_rows(result)==0) then
      outputChatBox(\"A játékos nem létezik vagy nem osztottak ki rá karakter halált.\", thePlayer, 255, 0, 0)
   else
      local row = mysql:fetch_assoc(result)
      local dbid = tonumber(row[\"id\"]) or 0
      mysql:query_free(\"UPDATE characters SET cked=\'0\' WHERE id = \" .. dbid .. \" LIMIT 1\")
      -- delete all peds for him
      for key, value in pairs( getElementsByType( \"ped\" ) ) do
         if isElement( value ) and getElementData( value, \"ckid\" ) then
            if getElementData( value, \"ckid\" ) == dbid then
               destroyElement( value )
            end
         end
      end
      outputChatBox(targetPlayer .. \" karakter halála feloldva.\", thePlayer, 0, 255, 0)
      exports.logs:logMessage(\"[/uNCK] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" UNCK\'ED \".. targetPlayer , 4)
   end
   mysql:free_result(result)
end
end
end
addCommandHandler(\"unck\", unckPlayer)
-- /BURY
function buryPlayer(thePlayer, commandName, ...)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Játékos teljes neve]\", thePlayer, 255, 194, 14)
else
   local targetPlayer = table.concat({...}, \"_\")
   local result = mysql:query(\"SELECT id, cked FROM characters WHERE charactername=\'\" .. mysql:escape_string(tostring(targetPlayer)) .. \"\'\")
   if (mysql:num_rows(result)>1) then
      outputChatBox(\"Túl sok találat - A találatok szûkítéséhez írd be a játékos nevét részletesebben.\", thePlayer, 255, 0, 0)
   elseif (mysql:num_rows(result)==0) then
      outputChatBox(\"A játékos nem létezik.\", thePlayer, 255, 0, 0)
   else
      local row = mysql:fetch_assoc(result)
      local dbid = tonumber(row[\"id\"]) or 0
      local cked = tonumber(row[\"cked\"]) or 0
      if cked == 0 then
         outputChatBox(\"A játékoson nincs karakter halál.\", thePlayer, 255, 0, 0)
      elseif cked == 2 then
         outputChatBox(\"A játékos már el van temetve.\", thePlayer, 255, 0, 0)
      else
         mysql:query_free(\"UPDATE characters SET cked=\'2\' WHERE id = \" .. dbid .. \" LIMIT 1\")
         -- delete all peds for him
         for key, value in pairs( getElementsByType( \"ped\" ) ) do
            if isElement( value ) and getElementData( value, \"ckid\" ) then
               if getElementData( value, \"ckid\" ) == dbid then
                  destroyElement( value )
               end
            end
         end
         outputChatBox(targetPlayer .. \" eltemetve.\", thePlayer, 0, 255, 0)
         exports.logs:logMessage(\"[/bURY] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" buried \".. targetPlayer , 4)
      end
   end
   mysql:free_result(result)
end
end
end
addCommandHandler(\"bury\", buryPlayer)
-- /FRECONNECT
function forceReconnect(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         outputChatBox(\"Játékos \'\" .. targetPlayerName .. \"\' újracsatlakoztatva.\", thePlayer, 255, 0, 0)
         local port = getServerPort()
         local password = getServerPassword()
         redirectPlayer(targetPlayer, \"91.82.84.190:22031\", port, password) --ezt módosítani!!!
         exports.logs:logMessage(\"[/FRECONNECT] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" reconnected \".. targetPlayerName , 4)
      end
   end
end
end
end
-- addCommandHandler(\"freconnect\", forceReconnect, false, false)
-- /GIVEGUN
function givePlayerGun(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isSuperAdmin(thePlayer)) then
local args = {...}
if not (targetPlayer) or (#args < 1) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Fegyver ID / Név] [Töltény]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local weapon = tonumber(args[1])
      local ammo = #args ~= 1 and tonumber(args[#args]) or 1
      if not weapon then -- weapon is specified as name
         local weaponEnd = #args
         repeat
            weapon = getWeaponIDFromName(table.concat(args, \" \", 1, weaponEnd))
            weaponEnd = weaponEnd - 1
         until weapon or weaponEnd == -1
         if weaponEnd == -1 then
            outputChatBox(\"Helytelen fegyver név.\", thePlayer, 255, 0, 0)
            return
         elseif weaponEnd == #args - 1 then
            ammo = 1
         end
      elseif not getWeaponNameFromID(weapon) then
         outputChatBox(\"Helytelen fegyver ID.\", thePlayer, 255, 0, 0)
      end
      local logged = getElementData(targetPlayer, \"loggedin\")
      local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         exports.global:takeWeapon(targetPlayer, weapon)
         local give = exports.global:giveWeapon(targetPlayer, weapon, ammo, true)
         if not (give) then
            outputChatBox(\"Helytelen fegyver ID.\", thePlayer, 255, 0, 0)
         else
            outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott egy \" .. getWeaponNameFromID(weapon) .. \"-et \" .. ammo .. \" tölténnyel.\", thePlayer, 0, 255, 0)
            exports.logs:logMessage(getPlayerName(thePlayer):gsub(\"_\", \" \") .. \" gave \" .. targetPlayerName .. \" a \" .. getWeaponNameFromID(weapon) .. \" with \" .. ammo .. \" Ammo.\", 22)
            if (hiddenAdmin==0) then
               local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
               exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" adott \" .. targetPlayerName .. \"-ank egy \" .. getWeaponNameFromID(weapon) .. \"-et \" .. ammo .. \" tölténnyel.\")
            end
         end
      end
   end
end
end
end
addCommandHandler(\"givegun\", givePlayerGun, false, false)
-- /GIVEITEM
function givePlayerItem(thePlayer, commandName, targetPlayer, itemID, ...)
if (getElementData( thePlayer, \"adminlevel\" ) > 3) then
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (itemID) or not (...) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Tárgy ID] [Tárgy értéke]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      itemID = tonumber(itemID)
      local itemValue = table.concat({...}, \" \")
      itemValue = tonumber(itemValue) or itemValue
      if ( itemID == 74 or itemID == 75 or itemID == 78 ) and not exports.global:isPlayerScripter( thePlayer ) and not exports.global:isPlayerHeadAdmin( thePlayer) then
         -- nuthin
      elseif ( itemID == 84 ) and not exports.global:isPlayerLeadAdmin( thePlayer ) then
      elseif (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         local name = call( getResourceFromName( \"item-system\" ), \"getItemName\", itemID )
         if itemID > 0 and name and name ~= \"?\" then
            local success, reason = exports.global:giveItem(targetPlayer, itemID, itemValue)
            if success then
               outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott egy \" .. name .. \"-t ezzel az értékkel \" .. itemValue .. \".\", thePlayer, 0, 255, 0)
               exports.logs:logMessage(getPlayerName(thePlayer):gsub(\"_\", \" \") .. \" gave \" .. targetPlayerName .. \" a \" .. name .. \" with value \" .. itemValue, 13)
               if itemID == 2 or itemID == 17 then
                  triggerClientEvent(targetPlayer, \"updateHudClock\", targetPlayer)
               end
            else
               outputChatBox(\"Nem tudom odaadni \" .. targetPlayerName .. \"-nek a \" .. name .. \"-t: \" .. tostring(reason), thePlayer, 255, 0, 0)
            end
         else
            outputChatBox(\"Helytelen Tárgy ID.\", thePlayer, 255, 0, 0)
         end
      end
   end
end
end
end
end
addCommandHandler(\"giveitem\", givePlayerItem, false, false)
-- /TAKEITEM
function takePlayerItem(thePlayer, commandName, targetPlayer, itemID, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (itemID) or not (...) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Tárgy ID] [Tárgy értéke]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      itemID = tonumber(itemID)
      local itemValue = table.concat({...}, \" \")
      itemValue = tonumber(itemValue) or itemValue
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         if exports.global:hasItem(targetPlayer, itemID, itemValue) then
            outputChatBox(\"Elvetted a \" .. itemID .. \"-t tõle: \" .. targetPlayerName .. \".\", thePlayer, 0, 255, 0)
            exports.global:takeItem(targetPlayer, itemID, itemValue)
            if itemID == 2 or itemID == 17 then
               triggerClientEvent(targetPlayer, \"updateHudClock\", targetPlayer)
            end
         else
            outputChatBox(\"A játékosnak nincs meg ez a tárgy!\", thePlayer, 255, 0, 0)
         end
      end
   end
end
end
end
addCommandHandler(\"takeitem\", takePlayerItem, false, false)
-- /SETHP
function setPlayerHealth(thePlayer, commandName, targetPlayer, health)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isFoAdmin(thePlayer)) then
if not tonumber(health) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Élet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      if tonumber( health ) < getElementHealth( targetPlayer ) and getElementData( thePlayer, \"adminlevel\" ) < getElementData( targetPlayer, \"adminlevel\" ) then
         outputChatBox(\"Nah.\", thePlayer, 255, 0, 0)
      elseif not setElementHealth(targetPlayer, tonumber(health)) then
         outputChatBox(\"Helytelen élet érték.\", thePlayer, 255, 0, 0)
      else
         outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott \" .. health .. \" életet.\", thePlayer, 0, 255, 0)
         triggerEvent(\"onPlayerHeal\", targetPlayer, true)
         exports.logs:logMessage(\"[/sETHP] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" set \".. targetPlayerName .. \" to \" .. health , 4)
         exports.global:sendMessageToAdmins(\"Játékos \" .. targetPlayerName .. \" kapott \" .. health .. \" életet \".. getPlayerName(thePlayer) ..\" által.\", 255, 255, 0)
      end
   end
end
end
end
end
addCommandHandler(\"sethp\", setPlayerHealth, false, false)
-- /SETARMOR
function setPlayerArmour(thePlayer, commandName, targetPlayer, armor)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isFoAdmin(thePlayer)) then
if not (armor) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Armor]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (tostring(type(tonumber(armor))) == \"number\") then
         local setArmor = setPedArmor(targetPlayer, tonumber(armor))
         outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott  \" .. armor .. \" páncélt.\", thePlayer, 0, 255, 0)
         exports.logs:logMessage(\"[/sETARMOR] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" set \".. targetPlayerName .. \" his armor to \" .. armor , 4)
         exports.global:sendMessageToAdmins(\"Játékos \" .. targetPlayerName .. \" kapott \" .. armor .. \" páncélt \".. getPlayerName(thePlayer) ..\" által.\", 255, 255, 0)
      else
         outputChatBox(\"Helytelen páncél érték.\", thePlayer, 255, 0, 0)
      end
   end
end
end
end
end
addCommandHandler(\"setarmor\", setPlayerArmour, false, false)
-- /SETPLAYERSKIN
function setPlayerSkinCmd(thePlayer, commandName, targetPlayer, skinID)
if (exports.global:isFoAdmin(thePlayer)) then
if not (skinID) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [skin ID]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (tostring(type(tonumber(skinID))) == \"number\") then
         local fat = getPedStat(targetPlayer, 21)
         local muscle = getPedStat(targetPlayer, 23)
         setPedStat(targetPlayer, 21, 0)
         setPedStat(targetPlayer, 23, 0)
         local skin = setElementModel(targetPlayer, tonumber(skinID))
         setPedStat(targetPlayer, 21, fat)
         setPedStat(targetPlayer, 23, muscle)
         if not (skin) then
            outputChatBox(\"Helytelen skin ID.\", thePlayer, 255, 0, 0)
         else
            outputChatBox(\"Játékos \" .. targetPlayerName .. \" kinézete megváltoztatva erre: \" .. skinID .. \".\", thePlayer, 0, 255, 0)
            mysql:query_free(\"UPDATE characters SET skin = \" .. mysql:escape_string(skinID) .. \" WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) )
            exports.logs:logMessage(\"[/sETSKIN] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" set \".. targetPlayerName .. \" his skin to \"..skinID , 4)
         end
      else
         outputChatBox(\"Helytelen skin ID.\", thePlayer, 255, 0, 0)
      end
   end
end
end
end
addCommandHandler(\"setskin\", setPlayerSkinCmd, false, false)
 
function weatherall(thePlayer, commandName, IdoJaras)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (IdoJaras) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [idõjárás]\", thePlayer, 255, 194, 14)
else
   setWeather (IdoJaras)
end
end
end
addCommandHandler(\"weatherall\", weatherall, false, false)
function setIdo(thePlayer, commandName, Ido)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (Ido) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Óra]\", thePlayer, 255, 194, 14)
else
   setTime (Ido,0)
end
end
end
addCommandHandler(\"settime\", setIdo, false, false)
-- /CHANGENAME
function asetPlayerName(thePlayer, commandName, targetPlayer, ...)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (...) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Játékos új neve]\", thePlayer, 255, 194, 14)
else
   local newName = table.concat({...}, \"_\")
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      if newName == targetPlayerName then
         outputChatBox( \"A játékos már ezt a nevet viseli.\", thePlayer, 255, 0, 0)
      else
         local dbid = getElementData(targetPlayer, \"dbid\")
         local result = mysql:query(\"SELECT charactername FROM characters WHERE charactername=\'\" .. mysql:escape_string(newName) .. \"\' AND id != \" .. mysql:escape_string(dbid))
         if (mysql:num_rows(result)>0) then
            outputChatBox(\"Ez a név már használatban.\", thePlayer, 255, 0, 0)
         else
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"legitnamechange\", 1)
            local name = setPlayerName(targetPlayer, tostring(newName))
            if (name) then
               if getPlayerNametagText(targetPlayer) ~= \"Unknown Person\" then
                  setPlayerNametagText(targetPlayer, tostring(newName):gsub(\"_\", \" \"))
               end
               exports[\'cache\']:clearCharacterName( dbid )
               mysql:query_free(\"UPDATE characters SET charactername=\'\" .. mysql:escape_string(newName) .. \"\' WHERE id = \" .. mysql:escape_string(dbid))
               local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
               if (hiddenAdmin==0) then
                  local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
                  exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" megváltoztatta \" .. targetPlayerName .. \" nevét erre: \" .. newName .. \".\")
               end
               outputChatBox(\"Megváltoztattad \" .. targetPlayerName .. \" nevét erre: \" .. tostring(newName) .. \".\", thePlayer, 0, 255, 0)
               exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"legitnamechange\", 0)
               exports.logs:logMessage(\"[/CHANGENAME] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" changed \".. targetPlayerName .. \" TO \".. tostring(newName) , 4)
               triggerClientEvent(targetPlayer, \"updateName\", targetPlayer, getElementData(targetPlayer, \"dbid\"))
            else
               outputChatBox(\"Játékosnak nem sikerült megváltoztatni a nevét.\", thePlayer, 255, 0, 0)
            end
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"legitnamechange\", 0)
         end
         mysql:free_result(result)
      end
   end
end
end
end
end
addCommandHandler(\"changename\", asetPlayerName, false, false)
-- /HIDEADMIN
function hideAdmin(thePlayer, commandName)
if exports.global:isHarmasAdmin(thePlayer) then
local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
if (hiddenAdmin==0) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"hiddenadmin\", 1)
   outputChatBox(\"Rejtett admin szolgálatba léptél.\", thePlayer, 255, 194, 14)
elseif (hiddenAdmin==1) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"hiddenadmin\", 0)
   outputChatBox(\"Kiléptél rejtett admin szolgálatból.\", thePlayer, 255, 194, 14)
end
exports.global:updateNametagColor(thePlayer)
mysql:query_free(\"UPDATE accounts SET hiddenadmin=\" .. mysql:escape_string(getElementData(thePlayer, \"hiddenadmin\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(thePlayer, \"gameaccountid\")) )
end
end
addCommandHandler(\"hideadmin\", hideAdmin, false, false)
-- /SLAP
function slapPlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isKettesAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local thePlayerPower = exports.global:getPlayerAdminLevel(thePlayer)
      local targetPlayerPower = exports.global:getPlayerAdminLevel(targetPlayer)
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (targetPlayerPower > thePlayerPower) then -- Check the admin isn\'t slapping someone higher rank them him
         outputChatBox(\"Nem tudod felpofozni ezt a játékost! Magosabb az Admin rangja mint a tied.\", thePlayer, 255, 0, 0)
      else
         local x, y, z = getElementPosition(targetPlayer)
         if (isPedInVehicle(targetPlayer)) then
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"realinvehicle\", 0, false)
            removePedFromVehicle(targetPlayer)
         end
         setElementPosition(targetPlayer, x, y, z+15)
         local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
         if (hiddenAdmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" felpofozta \" .. targetPlayerName .. \".\")
            exports.logs:logMessage(\"[/sLAP] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" slapped \".. targetPlayerName , 4)
            triggerEvent(\"removeTintName\", targetPlayer)
         end
      end
   end
end
end
end
addCommandHandler(\"slap\", slapPlayer, false, false)
-- /HUGESLAP
function hugeSlapPlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isHarmasAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local thePlayerPower = exports.global:getPlayerAdminLevel(thePlayer)
      local targetPlayerPower = exports.global:getPlayerAdminLevel(targetPlayer)
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (targetPlayerPower > thePlayerPower) then -- Check the admin isn\'t slapping someone higher rank them him
         outputChatBox(\"Nem tudod felpofozni ezt a játékost! Magosabb az Admin rangja mint a tied.\", thePlayer, 255, 0, 0)
      else
         local x, y, z = getElementPosition(targetPlayer)
         if (isPedInVehicle(targetPlayer)) then
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"realinvehicle\", 0, false)
            removePedFromVehicle(targetPlayer)
         end
         setElementPosition(targetPlayer, x, y, z+50)
         local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
         if (hiddenAdmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" hatalmas pofont adott neki: \" .. targetPlayerName .. \".\")
            exports.logs:logMessage(\"[/HUGESLAP] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" slapped \".. targetPlayerName , 4)
            triggerEvent(\"removeTintName\", targetPlayer)
         end
      end
   end
end
end
end
addCommandHandler(\"hugeslap\", hugeSlapPlayer, false, false)
-- HEADS Hidden OOC
function hiddenOOC(thePlayer, commandName, ...)
local logged = getElementData(thePlayer, \"loggedin\")
if (exports.global:isPlayerHeadAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Message]\", thePlayer, 255, 194, 14)
else
   local players = exports.pool:getPoolElementsByType(\"player\")
   local message = table.concat({...}, \" \")
   for index, arrayPlayer in ipairs(players) do
      local logged = getElementData(arrayPlayer, \"loggedin\")
      if (logged==1) and getElementData(arrayPlayer, \"globalooc\") == 1 then
         outputChatBox(\"(( Rejtett Admin: \" .. message .. \" ))\", arrayPlayer, 255, 255, 255)
      end
   end
end
end
end
addCommandHandler(\"ho\", hiddenOOC, false, false)
-- RECON
function reconPlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   local rx = getElementData(thePlayer, \"reconx\")
   local ry = getElementData(thePlayer, \"recony\")
   local rz = getElementData(thePlayer, \"reconz\")
   local reconrot = getElementData(thePlayer, \"reconrot\")
   local recondimension = getElementData(thePlayer, \"recondimension\")
   local reconinterior = getElementData(thePlayer, \"reconinterior\")
   if not (rx) or not (ry) or not (rz) or not (reconrot) or not (recondimension) or not (reconinterior) then
      outputChatBox(\"Példa: /\" .. commandName .. \" [Névrészlet]\", thePlayer, 255, 194, 14)
   else
      detachElements(thePlayer)
      setElementPosition(thePlayer, rx, ry, rz)
      setPedRotation(thePlayer, reconrot)
      setElementDimension(thePlayer, recondimension)
      setElementInterior(thePlayer, reconinterior)
      setCameraInterior(thePlayer, reconinterior)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconx\", nil)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recony\", nil, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconz\", nil, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconrot\", nil, false)
      setCameraTarget(thePlayer, thePlayer)
      setElementAlpha(thePlayer, 255)
      outputChatBox(\"Recon kikapcsolva.\", thePlayer, 255, 194, 14)
   end
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         setElementAlpha(thePlayer, 0)
         if ( not getElementData(thePlayer, \"reconx\") or getElementData(thePlayer, \"reconx\") == true ) and not getElementData(thePlayer, \"recony\") then
            local x, y, z = getElementPosition(thePlayer)
            local rot = getPedRotation(thePlayer)
            local dimension = getElementDimension(thePlayer)
            local interior = getElementInterior(thePlayer)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconx\", x)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recony\", y, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconz\", z, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconrot\", rot, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recondimension\", dimension, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconinterior\", interior, false)
         end
         setPedWeaponSlot(thePlayer, 0)
         local playerdimension = getElementDimension(targetPlayer)
         local playerinterior = getElementInterior(targetPlayer)
         setElementDimension(thePlayer, playerdimension)
         setElementInterior(thePlayer, playerinterior)
         setCameraInterior(thePlayer, playerinterior)
         local x, y, z = getElementPosition(targetPlayer)
         setElementPosition(thePlayer, x - 10, y - 10, z - 5)
         local success = attachElements(thePlayer, targetPlayer, -10, -10, -5)
         if not (success) then
            success = attachElements(thePlayer, targetPlayer, -5, -5, -5)
            if not (success) then
               success = attachElements(thePlayer, targetPlayer, 5, 5, -5)
            end
         end
         if not (success) then
            outputChatBox(\"Nem sikerült kapcsolódni a játékoshoz.\", thePlayer, 0, 255, 0)
         else
            setCameraTarget(thePlayer, targetPlayer)
            outputChatBox(\"Admin TV: Most \" .. targetPlayerName .. \"-t figyeled.\", thePlayer, 0, 255, 0)
            local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
            if hiddenAdmin == 0 then
               local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
               exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" Admin TV-zi \" .. targetPlayerName .. \"-t.\")
            end
         end
      end
   end
end
end
end
addCommandHandler(\"recon\", reconPlayer, false, false)
function fuckRecon(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
local rx = getElementData(thePlayer, \"reconx\")
local ry = getElementData(thePlayer, \"recony\")
local rz = getElementData(thePlayer, \"reconz\")
local reconrot = getElementData(thePlayer, \"reconrot\")
local recondimension = getElementData(thePlayer, \"recondimension\")
local reconinterior = getElementData(thePlayer, \"reconinterior\")
detachElements(thePlayer)
setCameraTarget(thePlayer, thePlayer)
setElementAlpha(thePlayer, 255)
if rx and ry and rz then
   setElementPosition(thePlayer, rx, ry, rz)
   if reconrot then
      setPedRotation(thePlayer, reconrot)
   end
   if recondimension then
      setElementDimension(thePlayer, recondimension)
   end
   if reconinterior then
         setElementInterior(thePlayer, reconinterior)
         setCameraInterior(thePlayer, reconinterior)
   end
end
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconx\")
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recony\")
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconz\")
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconrot\")
outputChatBox(\"Admin TV kikapcsolva.\", thePlayer, 255, 194, 14)
end
end
addCommandHandler(\"fuckrecon\", fuckRecon, false, false)
addCommandHandler(\"stoprecon\", fuckRecon, false, false)
--pm
function PMNeki(thePlayer, commandName, targetPlayer, ...)
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Névrészlet] [szöveg]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local blokkolva = getElementData(targetPlayer, \"pmblocked\")
      if not(blokkolva == 1) then
         szoveg = table.concat({...}, \" \")
         if (exports.global:isPlayerAdmin(targetPlayer) == true and getElementData(targetPlayer, \"adminduty\") == 1) or (exports.global:isPlayerAdmin(thePlayer)) then
            local rejtettadmin = getElementData(thePlayer, \"hiddenadmin\")
            local playerName = getPlayerName(thePlayer)
            local targetName = getPlayerName(targetPlayer)
            local idje = tonumber(getElementData(thePlayer, \"playerid\"))
            -- local idje2 = tonumber(getElementData(targetPlayer, \"playerid\"))
            outputChatBox(\"[PM neked, Admin IDje: \"..idje..\"] \" .. playerName .. \": \" .. szoveg, targetPlayer, 154, 205, 50)
            outputChatBox(\"[PM tõled] \" .. targetName .. \": \" .. szoveg, thePlayer, 154, 205, 50)
         else
            outputChatBox(\"(( Csak szolgálatban levõ adminnak írhatsz PM-et! ))\", thePlayer, 255, 0, 0)
         end
      else
         outputChatBox(\"(( Ez az adminisztrátor letiltotta a PM-eket! ))\", thePlayer, 255, 0, 0)
      end
   end
end
end
addCommandHandler(\"pm\", PMNeki, false, false)
--vá
function ValaszNeki(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Névrészlet] [szöveg]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      szoveg = table.concat({...}, \" \")
      if (exports.global:isPlayerAdmin(targetPlayer) ~= true) then
         local rejtettadmin = getElementData(thePlayer, \"hiddenadmin\")
         local playerName = getPlayerName(thePlayer)
         if (rejtettadmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            --outputChatBox(\"Válaszod neki: \" .. targetPlayerName .. \": \" .. szoveg, thePlayer, 255, 255, 0)
            outputChatBox(adminTitle .. playerName .. \": \" .. szoveg, targetPlayer, 154, 205, 50)
         else
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            --outputChatBox(\"Válaszod neki: \" .. targetPlayerName .. \": \" .. szoveg, thePlayer, 255, 255, 0)
            outputChatBox(adminTitle .. \": \" .. szoveg, targetPlayer, 154, 205, 50)
         end
         exports.global:sendMessageToAdmins(playerName .. \" válaszolt neki: \" .. targetPlayerName, 255, 255, 0)
         exports.global:sendMessageToAdmins(\"Szöveg: \" .. szoveg, 255, 255, 0)
         -- outputChatBox(\"[\".. targetPlayerName ..\"] válaszod: \".. szoveg, thePlayer, 255, 255, 0)
      else
         outputChatBox(\"(( Másik adminnak nem tudsz válaszolni. ))\", thePlayer, 255, 0, 0)
      end
   end
end
end
end
addCommandHandler(\"vá\", ValaszNeki, false, false)
addCommandHandler(\"válasz\", ValaszNeki, false, false)
function jatekoskirugas(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / Névrészlet] [indok]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      szoveg = table.concat({...}, \" \")
      local playerName = getPlayerName(thePlayer)
      outputChatBox(\"Kick: \" .. playerName .. \" kickelte \" .. targetPlayerName .. \"-t.\", getRootElement(), 255, 0, 51)
      outputChatBox(\"Kick: Indok: \" .. szoveg .. \".\", getRootElement(), 255, 0, 51)
      kickPlayer(targetPlayer, thePlayer, szoveg)
      exports.logs:logMessage(\"[/KICK] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" kicked \".. targetPlayerName ..\" (\".. reason ..\")\" , 4)
   end
end
end
end
addCommandHandler(\"pkick\", jatekoskirugas, false, false)
addCommandHandler(\"kick\", jatekoskirugas, false, false)
-- BAN
function banAPlayer(thePlayer, commandName, targetPlayer, hours, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (hours) or (tonumber(hours)<0) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [NÉV / ID] [Óraszám, 0 = örök] [oka]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   hours = tonumber(hours)
   if not (targetPlayer) then
   elseif (hours>168) then
      outputChatBox(\"Max 7 nap. (168 óra).\", thePlayer, 255, 194, 14)
   else
      local thePlayerPower = exports.global:getPlayerAdminLevel(thePlayer)
      local targetPlayerPower = exports.global:getPlayerAdminLevel(targetPlayer)
      reason = table.concat({...}, \" \")
      if (targetPlayerPower <= thePlayerPower) then -- Check the admin isn\'t banning someone higher rank them him
         local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
         local playerName = getPlayerName(thePlayer)
         local accountID = getElementData(targetPlayer, \"gameaccountid\")
         local seconds = ((hours*60)*60)
         local rhours = hours
         -- text value
         if (hours==0) then
            hours = \"Örök\"
         elseif (hours==1) then
            hours = \"1 óra\"
         else
            hours = hours .. \" óra\"
         end
         reason = reason .. \" (\" .. hours .. \")\"
         mysql:query_free(\'INSERT INTO adminhistory (user_char, user, admin_char, admin, hiddenadmin, action, duration, reason) VALUES (\"\' .. mysql:escape_string(getPlayerName(targetPlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(targetPlayer, \"gameaccountid\") or 0)) .. \',\"\' .. mysql:escape_string(getPlayerName(thePlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(thePlayer, \"gameaccountid\") or 0)) .. \',\' .. mysql:escape_string(hiddenAdmin) .. \',2,\' .. mysql:escape_string(rhours) .. \',\"\' .. mysql:escape_string(reason) .. \'\")\' )
         -- if (hiddenAdmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            -- exports.global:sendMessageToAdmins(\"AdmBan: \" .. adminTitle .. \" \" .. playerName .. \" kitiltotta \" .. targetPlayerName .. \". (\" .. hours .. \")\")
            -- exports.global:sendMessageToAdmins(\"AdmBan: Oka: \" .. reason .. \".\")
            outputChatBox(\"AdmBan: \" .. adminTitle .. \" \" .. playerName .. \" kitiltotta \" .. targetPlayerName .. \". (\" .. hours .. \")\", getRootElement(), 255, 0, 51)
            outputChatBox(\"AdmBan: Oka: \" .. reason .. \".\", getRootElement(), 255, 0, 51)
            local ban = banPlayer(targetPlayer,false, false,true, thePlayer, reason, seconds)
            mysql:query_free(\"UPDATE accounts SET banned=\'1\', banned_reason=\'\" .. mysql:escape_string(reason) .. \"\', banned_by=\'\" .. mysql:escape_string(playerName) .. \"\' WHERE id=\'\" .. mysql:escape_string(accountID) .. \"\'\")
         -- elseif (hiddenAdmin==1) then
            outputChatBox(\"AdmBan: Rejtett Admin kitiltotta \" .. targetPlayerName .. \". (\" .. hours .. \")\", getRootElement(), 255, 0, 51)
            outputChatBox(\"AdmBan: Oka: \" .. reason, getRootElement(), 255, 0, 51)
            outputChatBox(\"AdmBan: Idõ: \" .. hours .
[code]
« Utoljára szerkesztve: 2014. május 23. - 19:05:14 írta SkooLleer »

Admin rendszer probléma
« Válasz #1 Dátum: 2014. május 23. - 18:58:14 »
0 Show voters
Ami ezt meg akadályoza akkor miért nem szeded ki azt? Illetve tedd ki a
[code][ /code]

 tagot!

Admin rendszer probléma
« Válasz #2 Dátum: 2014. május 23. - 19:06:36 »
0 Show voters
Csak ugye nemtudom miaz ! :3

Admin rendszer probléma
« Válasz #3 Dátum: 2014. május 23. - 18:43:02 »
0 Show voters
Sziasztok!
Letöltöttem régebben egy modot és szeretném beüzemelni most , de egy resource megakadályozza ezt!
Tulajdonképpen az a problémám hogy hiába írom be valamelyik parancsot , egyik se mûködik , mivel nem vagyok scripter ezért gondoltam itt kérdezem meg!
DebugScripttel próbálkoztam viszont nem adott ki hibát rá!

 mysql = exports.mysql
-- ADMIN HISTORY:
-- 0: jail
-- 1: kick
-- 2: ban
-- 3: forceapp
-- 4: warn
-- 5: auto-ban
--
function gotoxyz_func ( player, cmd, x, y, z )
setElementPosition ( player, tonumber(x), tonumber(y), tonumber(z) )
end
addCommandHandler ( \"gotoxyz\", gotoxyz_func )
local getPlayerName_ = getPlayerName
getPlayerName = function( ... )
s = getPlayerName_( ... )
return s and s:gsub( \"_\", \" \" ) or s
end
-- wardrobe temp fix..
function fixWardrobe(thePlayer)
if ( getElementData(thePlayer, \"loggedin\") == 1 ) then
local dimension = getElementDimension(thePlayer)
local interior = getElementInterior(thePlayer)
if ( dimension >= 65000 and interior == 14 ) then
   setElementPosition(thePlayer, 1520.0029296875, -1701.2421875, 13.546875)
   setPedRotation(thePlayer, 275.82971191406)
   setElementDimension(thePlayer, 0)
   setElementInterior(thePlayer, 0)
else
   outputChatBox(\"Nincs wardrobe bugod.\", thePlayer, 255, 0, 0)
end
else
outputChatBox(\"Nincs wardrobe bugod.\", thePlayer, 255, 0, 0)
end
end
addCommandHandler(\"fixwardrobe\", fixWardrobe)
function adminUncuff(thePlayer, commandName, targetPlayer)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      local username = getPlayerName(thePlayer)
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local restrain = getElementData(targetPlayer, \"restrain\")
         if (restrain==0) then
            outputChatBox(\"A játékos nincs lefogva.\", thePlayer, 255, 0, 0)
         else
            outputChatBox(targetPlayerName .. \": levetted róla a bilincset.\", thePlayer)
            outputChatBox(\"\" .. username .. \": levette rólad a bilincset.\", targetPlayer)
            toggleControl(targetPlayer, \"sprint\", true)
            toggleControl(targetPlayer, \"fire\", true)
            toggleControl(targetPlayer, \"jump\", true)
            toggleControl(targetPlayer, \"next_weapon\", true)
            toggleControl(targetPlayer, \"previous_weapon\", true)
            toggleControl(targetPlayer, \"accelerate\", true)
            toggleControl(targetPlayer, \"brake_reverse\", true)
            toggleControl(targetPlayer, \"aim_weapon\", true)
            toggleAllControls(targetPlayer, true,true,true)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrain\", 0)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedBy\")
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"restrainedObj\")
            exports.global:removeAnimation(targetPlayer)
            mysql:query_free(\"UPDATE characters SET cuffed = 0, restrainedby = 0, restrainedobj = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) )
            exports[\'item-system\']:deleteAll(47, getElementData( targetPlayer, \"dbid\" ))
         end
      end
   end
end
end
end
end
addCommandHandler(\"auncuff\", adminUncuff, false, false)
--/AUNMASK
function adminUnmask(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      local username = getPlayerName(thePlayer)
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local gasmask = getElementData(targetPlayer, \"gasmask\")
         local mask = getElementData(targetPlayer, \"mask\")
         local helmet = getElementData(targetPlayer, \"helmet\")
         if (gasmask==1 or mask==1 or helmet==1) then
            local name = targetPlayerName:gsub(\"_\", \" \")
            setPlayerNametagText(targetPlayer, tostring(name))
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"gasmask\")
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"mask\")
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"helmet\")
            outputChatBox(\"Levetted a maszkot róla: \" .. name .. \".\", thePlayer, 255, 0, 0)
         else
            outputChatBox(\"A játékoson nincs MASK.\", thePlayer, 255, 0, 0)
         end
      end
   end
end
end
end
addCommandHandler(\"aunmask\", adminUnmask, false, false)
function asay(thePlayer, commandName, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /am [Admin Üzenet]\", thePlayer, 255, 194, 15)
else
   local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
   message = table.concat({...}, \" \")
   local playerName = getPlayerName(thePlayer)
   outputChatBox(adminrang .. \": \"  .. message, getRootElement(), 255, 128, 0,true)
end
end
end
addCommandHandler(\"asay\", asay, false, false)
function asayn(thePlayer, commandName, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /am [Admin Üzenet]\", thePlayer, 255, 194, 15)
else
   local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
   message = table.concat({...}, \" \")
   local playerName = getPlayerName(thePlayer)
   outputChatBox(adminrang .. \" \" .. playerName .. \": \" .. message, getRootElement(), 255, 0, 0,true)
end
end
end
addCommandHandler(\"asayn\", asayn, false, false)
function adminUnblindfold(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      local username = getPlayerName(thePlayer)
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local blindfolded = getElementData(targetPlayer, \"rblindfold\")
         if (blindfolded==0) then
            outputChatBox(\"A játékosnak nincs bekötve a szeme!\", thePlayer, 255, 0, 0)
         else
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"blindfold\")
            fadeCamera(targetPlayer, true)
            outputChatBox(\"Levetted \" .. targetPlayerName .. \"-rõl a kötést.\", thePlayer)
            mysql:query_free(\"UPDATE characters SET blindfold = 0 WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) )
         end
      end
   end
end
end
end
addCommandHandler(\"aunblindfold\", adminUnblindfold, false, false)
-- /MUTE
function mutePlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         local muted = getElementData(targetPlayer, \"muted\")
         if (muted==0) then
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"muted\", 1)
            outputChatBox(targetPlayerName .. \" némítva lett az OOC-rõl.\", thePlayer, 255, 0, 0)
            outputChatBox(\"Némítva lettél az OOC-rõl \'\" .. getPlayerName(thePlayer) .. \"\' által.\", targetPlayer, 255, 0, 0)
         else
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"muted\", 0)
            outputChatBox(targetPlayerName .. \"-rõl levetted az OOC némítást.\", thePlayer, 0, 255, 0)
            outputChatBox(\"\'\" .. getPlayerName(thePlayer) .. \"\' levette rólad az OOC némítást.\", targetPlayer, 0, 255, 0)
         end
         mysql:query_free(\"UPDATE accounts SET muted=\" .. mysql:escape_string(getElementData(targetPlayer, \"muted\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(targetPlayer, \"gameaccountid\")) )
      end
   end
end
end
end
addCommandHandler(\"pmute\", mutePlayer, false, false)
-- /RESKICK
function resKick(thePlayer, commandName, amount)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (amount) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Játékosok száma amennyit kickelni akarsz]\", thePlayer, 255, 194, 14)
else
   amount = tonumber(amount)
   local playercount = getPlayerCount()
   if (amount>=playercount) then
      outputChatBox(\"Nincs elég játékos a kickeléshez. (Jelenleg \" .. playercount .. \" játékos online)\", thePlayer, 255, 0, 0)
   else
      local players = { }
      local count = 1
      for key, value in ipairs(exports.pool:getPoolElementsByType(\"player\")) do
         if not (exports.global:isPlayerAdmin(value)) and not exports.global:isPlayerScripter(value) then
            players[count] = value
            count = count + 1
            if (count==amount) then
               break
            end
         end
      end
      local kickcount = 0
      for key, value in ipairs(players) do
         if (kickcount<amount) then
            local luck = math.random(0, 1)
            if (luck==1) then
               kickPlayer(value, getRootElement(), \"Foglalt slot-ra csatlakoztál\")
               kickcount = kickcount + 1
            end
         end
      end
      outputChatBox(\"\" .. kickcount .. \"/\" .. amount .. \" játékos kickelve.\", thePlayer, 0, 255, 0)
   end
end
end
end
addCommandHandler(\"reskick\", resKick, false, false)
-- /DISARM
function disarmPlayer(thePlayer, commandName, targetPlayer)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isEgyesAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         exports.global:takeAllWeapons(targetPlayer)
         outputChatBox(targetPlayerName .. \" lefegyverezve.\", thePlayer, 255, 194, 14)
         exports.logs:logMessage(\"[/DISARM] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" disarmed \".. targetPlayerName , 4)
      end
   end
end
end
end
end
addCommandHandler(\"disarm\", disarmPlayer, false, false)
-- forceapp
function forceApplication(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [indok]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if not (targetPlayer) then
   elseif exports.global:isPlayerAdmin(targetPlayer) then
      outputChatBox(\"Nem-nem.\", thePlayer, 255, 0, 0)
   else
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         local reason = table.concat({...}, \" \")
         local id = getElementData(targetPlayer, \"gameaccountid\")
         local username = getElementData(thePlayer, \"gameaccountusername\")
         mysql:query_free(\"UPDATE accounts SET appstate = 2, apphandler=\'\" .. mysql:escape_string(username) .. \"\', appreason=\'\" .. mysql:escape_string(reason) .. \"\', appdatetime = NOW() + INTERVAL 1 DAY WHERE id=\'\" .. mysql:escape_string(id) .. \"\'\")
         outputChatBox(targetPlayerName .. \" was forced to re-write their application.\", thePlayer, 255, 194, 14)
         local port = getServerPort()
         local password = getServerPassword()
         local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
         exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" sent \" .. targetPlayerName .. \" back to the application stage.\")
         local res = mysql:query_free(\'INSERT INTO adminhistory (user_char, user, admin_char, admin, hiddenadmin, action, duration, reason) VALUES (\"\' .. mysql:escape_string(getPlayerName(targetPlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(targetPlayer, \"gameaccountid\") or 0)) .. \',\"\' .. mysql:escape_string(getPlayerName(thePlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(thePlayer, \"gameaccountid\") or 0)) .. \',0,3,0,\"\' .. mysql:escape_string(reason) .. \'\")\' )
         redirectPlayer(targetPlayer, \"server.mta.vg\", port, password)
      end
   end
end
end
end
addCommandHandler(\"forceapp\", forceApplication, false, false)
-- /CK
function ckPlayer(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Karakter halál indoka]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         info = table.concat({...}, \" \")
         local query = mysql:query_free(\"UPDATE characters SET cked=\'1\', ck_info=\'\" .. mysql:escape_string(tostring(info)) .. \"\' WHERE id = \" .. mysql:escape_string(getElementData(targetPlayer, \"dbid\")))
         local x, y, z = getElementPosition(targetPlayer)
         local skin = getPedSkin(targetPlayer)
         local rotation = getPedRotation(targetPlayer)
         call( getResourceFromName( \"realism-system\" ), \"addCharacterKillBody\", x, y, z, rotation, skin, getElementData(targetPlayer, \"dbid\"), targetPlayerName, getElementInterior(targetPlayer), getElementDimension(targetPlayer), getElementData(targetPlayer, \"age\"), getElementData(targetPlayer, \"race\"), getElementData(targetPlayer, \"weight\"), getElementData(targetPlayer, \"height\"), getElementData(targetPlayer, \"chardescription\"), info, getElementData(targetPlayer, \"gender\"))
         -- send back to change char screen
         local id = getElementData(targetPlayer, \"gameaccountid\")
         showCursor(targetPlayer, false)
         triggerEvent(\"sendAccounts\", targetPlayer, targetPlayer, id, true)
         exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"loggedin\", 0, false)
         outputChatBox(\"\" .. getPlayerName(thePlayer) .. \" karakter halált osztott ki rád.\", targetPlayer, 255, 194, 14)
         showChat(targetPlayer, false)
         outputChatBox(\"Karakter halált osztottál ki rá: \".. targetPlayerName ..\".\", thePlayer, 255, 194, 1, 14)
         exports.logs:logMessage(\"[/CK] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" CK\'ED \".. targetPlayerName , 4)
         exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"dbid\", 0)
      end
   end
end
end
end
addCommandHandler(\"ck\", ckPlayer)
-- /UNCK
function unckPlayer(thePlayer, commandName, ...)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Játékos teljes neve]\", thePlayer, 255, 194, 14)
else
   local targetPlayer = table.concat({...}, \"_\")
   local result = mysql:query(\"SELECT id FROM characters WHERE charactername=\'\" .. mysql:escape_string(tostring(targetPlayer)) .. \"\' AND cked > 0\")
   if (mysql:num_rows(result)>1) then
      outputChatBox(\"Túl sok találat - A találatok szûkítéséhez írd be a játékos nevét részletesebben.\", thePlayer, 255, 0, 0)
   elseif (mysql:num_rows(result)==0) then
      outputChatBox(\"A játékos nem létezik vagy nem osztottak ki rá karakter halált.\", thePlayer, 255, 0, 0)
   else
      local row = mysql:fetch_assoc(result)
      local dbid = tonumber(row[\"id\"]) or 0
      mysql:query_free(\"UPDATE characters SET cked=\'0\' WHERE id = \" .. dbid .. \" LIMIT 1\")
      -- delete all peds for him
      for key, value in pairs( getElementsByType( \"ped\" ) ) do
         if isElement( value ) and getElementData( value, \"ckid\" ) then
            if getElementData( value, \"ckid\" ) == dbid then
               destroyElement( value )
            end
         end
      end
      outputChatBox(targetPlayer .. \" karakter halála feloldva.\", thePlayer, 0, 255, 0)
      exports.logs:logMessage(\"[/uNCK] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" UNCK\'ED \".. targetPlayer , 4)
   end
   mysql:free_result(result)
end
end
end
addCommandHandler(\"unck\", unckPlayer)
-- /BURY
function buryPlayer(thePlayer, commandName, ...)
if (exports.global:isPlayerLeadAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Játékos teljes neve]\", thePlayer, 255, 194, 14)
else
   local targetPlayer = table.concat({...}, \"_\")
   local result = mysql:query(\"SELECT id, cked FROM characters WHERE charactername=\'\" .. mysql:escape_string(tostring(targetPlayer)) .. \"\'\")
   if (mysql:num_rows(result)>1) then
      outputChatBox(\"Túl sok találat - A találatok szûkítéséhez írd be a játékos nevét részletesebben.\", thePlayer, 255, 0, 0)
   elseif (mysql:num_rows(result)==0) then
      outputChatBox(\"A játékos nem létezik.\", thePlayer, 255, 0, 0)
   else
      local row = mysql:fetch_assoc(result)
      local dbid = tonumber(row[\"id\"]) or 0
      local cked = tonumber(row[\"cked\"]) or 0
      if cked == 0 then
         outputChatBox(\"A játékoson nincs karakter halál.\", thePlayer, 255, 0, 0)
      elseif cked == 2 then
         outputChatBox(\"A játékos már el van temetve.\", thePlayer, 255, 0, 0)
      else
         mysql:query_free(\"UPDATE characters SET cked=\'2\' WHERE id = \" .. dbid .. \" LIMIT 1\")
         -- delete all peds for him
         for key, value in pairs( getElementsByType( \"ped\" ) ) do
            if isElement( value ) and getElementData( value, \"ckid\" ) then
               if getElementData( value, \"ckid\" ) == dbid then
                  destroyElement( value )
               end
            end
         end
         outputChatBox(targetPlayer .. \" eltemetve.\", thePlayer, 0, 255, 0)
         exports.logs:logMessage(\"[/bURY] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" buried \".. targetPlayer , 4)
      end
   end
   mysql:free_result(result)
end
end
end
addCommandHandler(\"bury\", buryPlayer)
-- /FRECONNECT
function forceReconnect(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         outputChatBox(\"Játékos \'\" .. targetPlayerName .. \"\' újracsatlakoztatva.\", thePlayer, 255, 0, 0)
         local port = getServerPort()
         local password = getServerPassword()
         redirectPlayer(targetPlayer, \"91.82.84.190:22031\", port, password) --ezt módosítani!!!
         exports.logs:logMessage(\"[/FRECONNECT] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" reconnected \".. targetPlayerName , 4)
      end
   end
end
end
end
-- addCommandHandler(\"freconnect\", forceReconnect, false, false)
-- /GIVEGUN
function givePlayerGun(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isSuperAdmin(thePlayer)) then
local args = {...}
if not (targetPlayer) or (#args < 1) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Fegyver ID / Név] [Töltény]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local weapon = tonumber(args[1])
      local ammo = #args ~= 1 and tonumber(args[#args]) or 1
      if not weapon then -- weapon is specified as name
         local weaponEnd = #args
         repeat
            weapon = getWeaponIDFromName(table.concat(args, \" \", 1, weaponEnd))
            weaponEnd = weaponEnd - 1
         until weapon or weaponEnd == -1
         if weaponEnd == -1 then
            outputChatBox(\"Helytelen fegyver név.\", thePlayer, 255, 0, 0)
            return
         elseif weaponEnd == #args - 1 then
            ammo = 1
         end
      elseif not getWeaponNameFromID(weapon) then
         outputChatBox(\"Helytelen fegyver ID.\", thePlayer, 255, 0, 0)
      end
      local logged = getElementData(targetPlayer, \"loggedin\")
      local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         exports.global:takeWeapon(targetPlayer, weapon)
         local give = exports.global:giveWeapon(targetPlayer, weapon, ammo, true)
         if not (give) then
            outputChatBox(\"Helytelen fegyver ID.\", thePlayer, 255, 0, 0)
         else
            outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott egy \" .. getWeaponNameFromID(weapon) .. \"-et \" .. ammo .. \" tölténnyel.\", thePlayer, 0, 255, 0)
            exports.logs:logMessage(getPlayerName(thePlayer):gsub(\"_\", \" \") .. \" gave \" .. targetPlayerName .. \" a \" .. getWeaponNameFromID(weapon) .. \" with \" .. ammo .. \" Ammo.\", 22)
            if (hiddenAdmin==0) then
               local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
               exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" adott \" .. targetPlayerName .. \"-ank egy \" .. getWeaponNameFromID(weapon) .. \"-et \" .. ammo .. \" tölténnyel.\")
            end
         end
      end
   end
end
end
end
addCommandHandler(\"givegun\", givePlayerGun, false, false)
-- /GIVEITEM
function givePlayerItem(thePlayer, commandName, targetPlayer, itemID, ...)
if (getElementData( thePlayer, \"adminlevel\" ) > 3) then
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (itemID) or not (...) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Tárgy ID] [Tárgy értéke]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      itemID = tonumber(itemID)
      local itemValue = table.concat({...}, \" \")
      itemValue = tonumber(itemValue) or itemValue
      if ( itemID == 74 or itemID == 75 or itemID == 78 ) and not exports.global:isPlayerScripter( thePlayer ) and not exports.global:isPlayerHeadAdmin( thePlayer) then
         -- nuthin
      elseif ( itemID == 84 ) and not exports.global:isPlayerLeadAdmin( thePlayer ) then
      elseif (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         local name = call( getResourceFromName( \"item-system\" ), \"getItemName\", itemID )
         if itemID > 0 and name and name ~= \"?\" then
            local success, reason = exports.global:giveItem(targetPlayer, itemID, itemValue)
            if success then
               outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott egy \" .. name .. \"-t ezzel az értékkel \" .. itemValue .. \".\", thePlayer, 0, 255, 0)
               exports.logs:logMessage(getPlayerName(thePlayer):gsub(\"_\", \" \") .. \" gave \" .. targetPlayerName .. \" a \" .. name .. \" with value \" .. itemValue, 13)
               if itemID == 2 or itemID == 17 then
                  triggerClientEvent(targetPlayer, \"updateHudClock\", targetPlayer)
               end
            else
               outputChatBox(\"Nem tudom odaadni \" .. targetPlayerName .. \"-nek a \" .. name .. \"-t: \" .. tostring(reason), thePlayer, 255, 0, 0)
            end
         else
            outputChatBox(\"Helytelen Tárgy ID.\", thePlayer, 255, 0, 0)
         end
      end
   end
end
end
end
end
addCommandHandler(\"giveitem\", givePlayerItem, false, false)
-- /TAKEITEM
function takePlayerItem(thePlayer, commandName, targetPlayer, itemID, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (itemID) or not (...) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Tárgy ID] [Tárgy értéke]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      itemID = tonumber(itemID)
      local itemValue = table.concat({...}, \" \")
      itemValue = tonumber(itemValue) or itemValue
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (logged==1) then
         if exports.global:hasItem(targetPlayer, itemID, itemValue) then
            outputChatBox(\"Elvetted a \" .. itemID .. \"-t tõle: \" .. targetPlayerName .. \".\", thePlayer, 0, 255, 0)
            exports.global:takeItem(targetPlayer, itemID, itemValue)
            if itemID == 2 or itemID == 17 then
               triggerClientEvent(targetPlayer, \"updateHudClock\", targetPlayer)
            end
         else
            outputChatBox(\"A játékosnak nincs meg ez a tárgy!\", thePlayer, 255, 0, 0)
         end
      end
   end
end
end
end
addCommandHandler(\"takeitem\", takePlayerItem, false, false)
-- /SETHP
function setPlayerHealth(thePlayer, commandName, targetPlayer, health)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isFoAdmin(thePlayer)) then
if not tonumber(health) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Élet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      if tonumber( health ) < getElementHealth( targetPlayer ) and getElementData( thePlayer, \"adminlevel\" ) < getElementData( targetPlayer, \"adminlevel\" ) then
         outputChatBox(\"Nah.\", thePlayer, 255, 0, 0)
      elseif not setElementHealth(targetPlayer, tonumber(health)) then
         outputChatBox(\"Helytelen élet érték.\", thePlayer, 255, 0, 0)
      else
         outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott \" .. health .. \" életet.\", thePlayer, 0, 255, 0)
         triggerEvent(\"onPlayerHeal\", targetPlayer, true)
         exports.logs:logMessage(\"[/sETHP] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" set \".. targetPlayerName .. \" to \" .. health , 4)
         exports.global:sendMessageToAdmins(\"Játékos \" .. targetPlayerName .. \" kapott \" .. health .. \" életet \".. getPlayerName(thePlayer) ..\" által.\", 255, 255, 0)
      end
   end
end
end
end
end
addCommandHandler(\"sethp\", setPlayerHealth, false, false)
-- /SETARMOR
function setPlayerArmour(thePlayer, commandName, targetPlayer, armor)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isFoAdmin(thePlayer)) then
if not (armor) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Armor]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (tostring(type(tonumber(armor))) == \"number\") then
         local setArmor = setPedArmor(targetPlayer, tonumber(armor))
         outputChatBox(\"Játékos \" .. targetPlayerName .. \" kapott  \" .. armor .. \" páncélt.\", thePlayer, 0, 255, 0)
         exports.logs:logMessage(\"[/sETARMOR] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" set \".. targetPlayerName .. \" his armor to \" .. armor , 4)
         exports.global:sendMessageToAdmins(\"Játékos \" .. targetPlayerName .. \" kapott \" .. armor .. \" páncélt \".. getPlayerName(thePlayer) ..\" által.\", 255, 255, 0)
      else
         outputChatBox(\"Helytelen páncél érték.\", thePlayer, 255, 0, 0)
      end
   end
end
end
end
end
addCommandHandler(\"setarmor\", setPlayerArmour, false, false)
-- /SETPLAYERSKIN
function setPlayerSkinCmd(thePlayer, commandName, targetPlayer, skinID)
if (exports.global:isFoAdmin(thePlayer)) then
if not (skinID) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [skin ID]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (tostring(type(tonumber(skinID))) == \"number\") then
         local fat = getPedStat(targetPlayer, 21)
         local muscle = getPedStat(targetPlayer, 23)
         setPedStat(targetPlayer, 21, 0)
         setPedStat(targetPlayer, 23, 0)
         local skin = setElementModel(targetPlayer, tonumber(skinID))
         setPedStat(targetPlayer, 21, fat)
         setPedStat(targetPlayer, 23, muscle)
         if not (skin) then
            outputChatBox(\"Helytelen skin ID.\", thePlayer, 255, 0, 0)
         else
            outputChatBox(\"Játékos \" .. targetPlayerName .. \" kinézete megváltoztatva erre: \" .. skinID .. \".\", thePlayer, 0, 255, 0)
            mysql:query_free(\"UPDATE characters SET skin = \" .. mysql:escape_string(skinID) .. \" WHERE id = \" .. mysql:escape_string(getElementData( targetPlayer, \"dbid\" )) )
            exports.logs:logMessage(\"[/sETSKIN] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" set \".. targetPlayerName .. \" his skin to \"..skinID , 4)
         end
      else
         outputChatBox(\"Helytelen skin ID.\", thePlayer, 255, 0, 0)
      end
   end
end
end
end
addCommandHandler(\"setskin\", setPlayerSkinCmd, false, false)
 
function weatherall(thePlayer, commandName, IdoJaras)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (IdoJaras) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [idõjárás]\", thePlayer, 255, 194, 14)
else
   setWeather (IdoJaras)
end
end
end
addCommandHandler(\"weatherall\", weatherall, false, false)
function setIdo(thePlayer, commandName, Ido)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (Ido) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Óra]\", thePlayer, 255, 194, 14)
else
   setTime (Ido,0)
end
end
end
addCommandHandler(\"settime\", setIdo, false, false)
-- /CHANGENAME
function asetPlayerName(thePlayer, commandName, targetPlayer, ...)
if (getElementData( thePlayer, \"adminlevel\" ) > 1 and not (getElementData( thePlayer, \"adminlevel\" ) == 1)) then
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (...) or not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet] [Játékos új neve]\", thePlayer, 255, 194, 14)
else
   local newName = table.concat({...}, \"_\")
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      if newName == targetPlayerName then
         outputChatBox( \"A játékos már ezt a nevet viseli.\", thePlayer, 255, 0, 0)
      else
         local dbid = getElementData(targetPlayer, \"dbid\")
         local result = mysql:query(\"SELECT charactername FROM characters WHERE charactername=\'\" .. mysql:escape_string(newName) .. \"\' AND id != \" .. mysql:escape_string(dbid))
         if (mysql:num_rows(result)>0) then
            outputChatBox(\"Ez a név már használatban.\", thePlayer, 255, 0, 0)
         else
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"legitnamechange\", 1)
            local name = setPlayerName(targetPlayer, tostring(newName))
            if (name) then
               if getPlayerNametagText(targetPlayer) ~= \"Unknown Person\" then
                  setPlayerNametagText(targetPlayer, tostring(newName):gsub(\"_\", \" \"))
               end
               exports[\'cache\']:clearCharacterName( dbid )
               mysql:query_free(\"UPDATE characters SET charactername=\'\" .. mysql:escape_string(newName) .. \"\' WHERE id = \" .. mysql:escape_string(dbid))
               local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
               if (hiddenAdmin==0) then
                  local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
                  exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" megváltoztatta \" .. targetPlayerName .. \" nevét erre: \" .. newName .. \".\")
               end
               outputChatBox(\"Megváltoztattad \" .. targetPlayerName .. \" nevét erre: \" .. tostring(newName) .. \".\", thePlayer, 0, 255, 0)
               exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"legitnamechange\", 0)
               exports.logs:logMessage(\"[/CHANGENAME] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" changed \".. targetPlayerName .. \" TO \".. tostring(newName) , 4)
               triggerClientEvent(targetPlayer, \"updateName\", targetPlayer, getElementData(targetPlayer, \"dbid\"))
            else
               outputChatBox(\"Játékosnak nem sikerült megváltoztatni a nevét.\", thePlayer, 255, 0, 0)
            end
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"legitnamechange\", 0)
         end
         mysql:free_result(result)
      end
   end
end
end
end
end
addCommandHandler(\"changename\", asetPlayerName, false, false)
-- /HIDEADMIN
function hideAdmin(thePlayer, commandName)
if exports.global:isHarmasAdmin(thePlayer) then
local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
if (hiddenAdmin==0) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"hiddenadmin\", 1)
   outputChatBox(\"Rejtett admin szolgálatba léptél.\", thePlayer, 255, 194, 14)
elseif (hiddenAdmin==1) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"hiddenadmin\", 0)
   outputChatBox(\"Kiléptél rejtett admin szolgálatból.\", thePlayer, 255, 194, 14)
end
exports.global:updateNametagColor(thePlayer)
mysql:query_free(\"UPDATE accounts SET hiddenadmin=\" .. mysql:escape_string(getElementData(thePlayer, \"hiddenadmin\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(thePlayer, \"gameaccountid\")) )
end
end
addCommandHandler(\"hideadmin\", hideAdmin, false, false)
-- /SLAP
function slapPlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isKettesAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local thePlayerPower = exports.global:getPlayerAdminLevel(thePlayer)
      local targetPlayerPower = exports.global:getPlayerAdminLevel(targetPlayer)
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (targetPlayerPower > thePlayerPower) then -- Check the admin isn\'t slapping someone higher rank them him
         outputChatBox(\"Nem tudod felpofozni ezt a játékost! Magosabb az Admin rangja mint a tied.\", thePlayer, 255, 0, 0)
      else
         local x, y, z = getElementPosition(targetPlayer)
         if (isPedInVehicle(targetPlayer)) then
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"realinvehicle\", 0, false)
            removePedFromVehicle(targetPlayer)
         end
         setElementPosition(targetPlayer, x, y, z+15)
         local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
         if (hiddenAdmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" felpofozta \" .. targetPlayerName .. \".\")
            exports.logs:logMessage(\"[/sLAP] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" slapped \".. targetPlayerName , 4)
            triggerEvent(\"removeTintName\", targetPlayer)
         end
      end
   end
end
end
end
addCommandHandler(\"slap\", slapPlayer, false, false)
-- /HUGESLAP
function hugeSlapPlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isHarmasAdmin(thePlayer)) then
if not (targetPlayer) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / NévRészlet]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local thePlayerPower = exports.global:getPlayerAdminLevel(thePlayer)
      local targetPlayerPower = exports.global:getPlayerAdminLevel(targetPlayer)
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      elseif (targetPlayerPower > thePlayerPower) then -- Check the admin isn\'t slapping someone higher rank them him
         outputChatBox(\"Nem tudod felpofozni ezt a játékost! Magosabb az Admin rangja mint a tied.\", thePlayer, 255, 0, 0)
      else
         local x, y, z = getElementPosition(targetPlayer)
         if (isPedInVehicle(targetPlayer)) then
            exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"realinvehicle\", 0, false)
            removePedFromVehicle(targetPlayer)
         end
         setElementPosition(targetPlayer, x, y, z+50)
         local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
         if (hiddenAdmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" hatalmas pofont adott neki: \" .. targetPlayerName .. \".\")
            exports.logs:logMessage(\"[/HUGESLAP] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" slapped \".. targetPlayerName , 4)
            triggerEvent(\"removeTintName\", targetPlayer)
         end
      end
   end
end
end
end
addCommandHandler(\"hugeslap\", hugeSlapPlayer, false, false)
-- HEADS Hidden OOC
function hiddenOOC(thePlayer, commandName, ...)
local logged = getElementData(thePlayer, \"loggedin\")
if (exports.global:isPlayerHeadAdmin(thePlayer)) then
if not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Message]\", thePlayer, 255, 194, 14)
else
   local players = exports.pool:getPoolElementsByType(\"player\")
   local message = table.concat({...}, \" \")
   for index, arrayPlayer in ipairs(players) do
      local logged = getElementData(arrayPlayer, \"loggedin\")
      if (logged==1) and getElementData(arrayPlayer, \"globalooc\") == 1 then
         outputChatBox(\"(( Rejtett Admin: \" .. message .. \" ))\", arrayPlayer, 255, 255, 255)
      end
   end
end
end
end
addCommandHandler(\"ho\", hiddenOOC, false, false)
-- RECON
function reconPlayer(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) then
   local rx = getElementData(thePlayer, \"reconx\")
   local ry = getElementData(thePlayer, \"recony\")
   local rz = getElementData(thePlayer, \"reconz\")
   local reconrot = getElementData(thePlayer, \"reconrot\")
   local recondimension = getElementData(thePlayer, \"recondimension\")
   local reconinterior = getElementData(thePlayer, \"reconinterior\")
   if not (rx) or not (ry) or not (rz) or not (reconrot) or not (recondimension) or not (reconinterior) then
      outputChatBox(\"Példa: /\" .. commandName .. \" [Névrészlet]\", thePlayer, 255, 194, 14)
   else
      detachElements(thePlayer)
      setElementPosition(thePlayer, rx, ry, rz)
      setPedRotation(thePlayer, reconrot)
      setElementDimension(thePlayer, recondimension)
      setElementInterior(thePlayer, reconinterior)
      setCameraInterior(thePlayer, reconinterior)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconx\", nil)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recony\", nil, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconz\", nil, false)
      exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconrot\", nil, false)
      setCameraTarget(thePlayer, thePlayer)
      setElementAlpha(thePlayer, 255)
      outputChatBox(\"Recon kikapcsolva.\", thePlayer, 255, 194, 14)
   end
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local logged = getElementData(targetPlayer, \"loggedin\")
      if (logged==0) then
         outputChatBox(\"A játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0)
      else
         setElementAlpha(thePlayer, 0)
         if ( not getElementData(thePlayer, \"reconx\") or getElementData(thePlayer, \"reconx\") == true ) and not getElementData(thePlayer, \"recony\") then
            local x, y, z = getElementPosition(thePlayer)
            local rot = getPedRotation(thePlayer)
            local dimension = getElementDimension(thePlayer)
            local interior = getElementInterior(thePlayer)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconx\", x)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recony\", y, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconz\", z, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconrot\", rot, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recondimension\", dimension, false)
            exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconinterior\", interior, false)
         end
         setPedWeaponSlot(thePlayer, 0)
         local playerdimension = getElementDimension(targetPlayer)
         local playerinterior = getElementInterior(targetPlayer)
         setElementDimension(thePlayer, playerdimension)
         setElementInterior(thePlayer, playerinterior)
         setCameraInterior(thePlayer, playerinterior)
         local x, y, z = getElementPosition(targetPlayer)
         setElementPosition(thePlayer, x - 10, y - 10, z - 5)
         local success = attachElements(thePlayer, targetPlayer, -10, -10, -5)
         if not (success) then
            success = attachElements(thePlayer, targetPlayer, -5, -5, -5)
            if not (success) then
               success = attachElements(thePlayer, targetPlayer, 5, 5, -5)
            end
         end
         if not (success) then
            outputChatBox(\"Nem sikerült kapcsolódni a játékoshoz.\", thePlayer, 0, 255, 0)
         else
            setCameraTarget(thePlayer, targetPlayer)
            outputChatBox(\"Admin TV: Most \" .. targetPlayerName .. \"-t figyeled.\", thePlayer, 0, 255, 0)
            local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
            if hiddenAdmin == 0 then
               local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
               exports.global:sendMessageToAdmins(\"AdmCmd: \" .. tostring(adminTitle) .. \" \" .. getPlayerName(thePlayer) .. \" Admin TV-zi \" .. targetPlayerName .. \"-t.\")
            end
         end
      end
   end
end
end
end
addCommandHandler(\"recon\", reconPlayer, false, false)
function fuckRecon(thePlayer, commandName, targetPlayer)
if (exports.global:isPlayerAdmin(thePlayer)) then
local rx = getElementData(thePlayer, \"reconx\")
local ry = getElementData(thePlayer, \"recony\")
local rz = getElementData(thePlayer, \"reconz\")
local reconrot = getElementData(thePlayer, \"reconrot\")
local recondimension = getElementData(thePlayer, \"recondimension\")
local reconinterior = getElementData(thePlayer, \"reconinterior\")
detachElements(thePlayer)
setCameraTarget(thePlayer, thePlayer)
setElementAlpha(thePlayer, 255)
if rx and ry and rz then
   setElementPosition(thePlayer, rx, ry, rz)
   if reconrot then
      setPedRotation(thePlayer, reconrot)
   end
   if recondimension then
      setElementDimension(thePlayer, recondimension)
   end
   if reconinterior then
         setElementInterior(thePlayer, reconinterior)
         setCameraInterior(thePlayer, reconinterior)
   end
end
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconx\")
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"recony\")
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconz\")
exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"reconrot\")
outputChatBox(\"Admin TV kikapcsolva.\", thePlayer, 255, 194, 14)
end
end
addCommandHandler(\"fuckrecon\", fuckRecon, false, false)
addCommandHandler(\"stoprecon\", fuckRecon, false, false)
--pm
function PMNeki(thePlayer, commandName, targetPlayer, ...)
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Névrészlet] [szöveg]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      local blokkolva = getElementData(targetPlayer, \"pmblocked\")
      if not(blokkolva == 1) then
         szoveg = table.concat({...}, \" \")
         if (exports.global:isPlayerAdmin(targetPlayer) == true and getElementData(targetPlayer, \"adminduty\") == 1) or (exports.global:isPlayerAdmin(thePlayer)) then
            local rejtettadmin = getElementData(thePlayer, \"hiddenadmin\")
            local playerName = getPlayerName(thePlayer)
            local targetName = getPlayerName(targetPlayer)
            local idje = tonumber(getElementData(thePlayer, \"playerid\"))
            -- local idje2 = tonumber(getElementData(targetPlayer, \"playerid\"))
            outputChatBox(\"[PM neked, Admin IDje: \"..idje..\"] \" .. playerName .. \": \" .. szoveg, targetPlayer, 154, 205, 50)
            outputChatBox(\"[PM tõled] \" .. targetName .. \": \" .. szoveg, thePlayer, 154, 205, 50)
         else
            outputChatBox(\"(( Csak szolgálatban levõ adminnak írhatsz PM-et! ))\", thePlayer, 255, 0, 0)
         end
      else
         outputChatBox(\"(( Ez az adminisztrátor letiltotta a PM-eket! ))\", thePlayer, 255, 0, 0)
      end
   end
end
end
addCommandHandler(\"pm\", PMNeki, false, false)
--vá
function ValaszNeki(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [Névrészlet] [szöveg]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      szoveg = table.concat({...}, \" \")
      if (exports.global:isPlayerAdmin(targetPlayer) ~= true) then
         local rejtettadmin = getElementData(thePlayer, \"hiddenadmin\")
         local playerName = getPlayerName(thePlayer)
         if (rejtettadmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            --outputChatBox(\"Válaszod neki: \" .. targetPlayerName .. \": \" .. szoveg, thePlayer, 255, 255, 0)
            outputChatBox(adminTitle .. playerName .. \": \" .. szoveg, targetPlayer, 154, 205, 50)
         else
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            --outputChatBox(\"Válaszod neki: \" .. targetPlayerName .. \": \" .. szoveg, thePlayer, 255, 255, 0)
            outputChatBox(adminTitle .. \": \" .. szoveg, targetPlayer, 154, 205, 50)
         end
         exports.global:sendMessageToAdmins(playerName .. \" válaszolt neki: \" .. targetPlayerName, 255, 255, 0)
         exports.global:sendMessageToAdmins(\"Szöveg: \" .. szoveg, 255, 255, 0)
         -- outputChatBox(\"[\".. targetPlayerName ..\"] válaszod: \".. szoveg, thePlayer, 255, 255, 0)
      else
         outputChatBox(\"(( Másik adminnak nem tudsz válaszolni. ))\", thePlayer, 255, 0, 0)
      end
   end
end
end
end
addCommandHandler(\"vá\", ValaszNeki, false, false)
addCommandHandler(\"válasz\", ValaszNeki, false, false)
function jatekoskirugas(thePlayer, commandName, targetPlayer, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [iD / Névrészlet] [indok]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   if targetPlayer then
      szoveg = table.concat({...}, \" \")
      local playerName = getPlayerName(thePlayer)
      outputChatBox(\"Kick: \" .. playerName .. \" kickelte \" .. targetPlayerName .. \"-t.\", getRootElement(), 255, 0, 51)
      outputChatBox(\"Kick: Indok: \" .. szoveg .. \".\", getRootElement(), 255, 0, 51)
      kickPlayer(targetPlayer, thePlayer, szoveg)
      exports.logs:logMessage(\"[/KICK] \" .. getElementData(thePlayer, \"gameaccountusername\") .. \"/\".. getPlayerName(thePlayer) ..\" kicked \".. targetPlayerName ..\" (\".. reason ..\")\" , 4)
   end
end
end
end
addCommandHandler(\"pkick\", jatekoskirugas, false, false)
addCommandHandler(\"kick\", jatekoskirugas, false, false)
-- BAN
function banAPlayer(thePlayer, commandName, targetPlayer, hours, ...)
if (exports.global:isPlayerAdmin(thePlayer)) then
if not (targetPlayer) or not (hours) or (tonumber(hours)<0) or not (...) then
   outputChatBox(\"Példa: /\" .. commandName .. \" [NÉV / ID] [Óraszám, 0 = örök] [oka]\", thePlayer, 255, 194, 14)
else
   local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
   hours = tonumber(hours)
   if not (targetPlayer) then
   elseif (hours>168) then
      outputChatBox(\"Max 7 nap. (168 óra).\", thePlayer, 255, 194, 14)
   else
      local thePlayerPower = exports.global:getPlayerAdminLevel(thePlayer)
      local targetPlayerPower = exports.global:getPlayerAdminLevel(targetPlayer)
      reason = table.concat({...}, \" \")
      if (targetPlayerPower <= thePlayerPower) then -- Check the admin isn\'t banning someone higher rank them him
         local hiddenAdmin = getElementData(thePlayer, \"hiddenadmin\")
         local playerName = getPlayerName(thePlayer)
         local accountID = getElementData(targetPlayer, \"gameaccountid\")
         local seconds = ((hours*60)*60)
         local rhours = hours
         -- text value
         if (hours==0) then
            hours = \"Örök\"
         elseif (hours==1) then
            hours = \"1 óra\"
         else
            hours = hours .. \" óra\"
         end
         reason = reason .. \" (\" .. hours .. \")\"
         mysql:query_free(\'INSERT INTO adminhistory (user_char, user, admin_char, admin, hiddenadmin, action, duration, reason) VALUES (\"\' .. mysql:escape_string(getPlayerName(targetPlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(targetPlayer, \"gameaccountid\") or 0)) .. \',\"\' .. mysql:escape_string(getPlayerName(thePlayer)) .. \'\",\' .. mysql:escape_string(tostring(getElementData(thePlayer, \"gameaccountid\") or 0)) .. \',\' .. mysql:escape_string(hiddenAdmin) .. \',2,\' .. mysql:escape_string(rhours) .. \',\"\' .. mysql:escape_string(reason) .. \'\")\' )
         -- if (hiddenAdmin==0) then
            local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
            -- exports.global:sendMessageToAdmins(\"AdmBan: \" .. adminTitle .. \" \" .. playerName .. \" kitiltotta \" .. targetPlayerName .. \". (\" .. hours .. \")\")
            -- exports.global:sendMessageToAdmins(\"AdmBan: Oka: \" .. reason .. \".\")
            outputChatBox(\"AdmBan: \" .. adminTitle .. \" \" .. playerName .. \" kitiltotta \" .. targetPlayerName .. \". (\" .. hours .. \")\", getRootElement(), 255, 0, 51)
            outputChatBox(\"AdmBan: Oka: \" .. reason .. \".\", getRootElement(), 255, 0, 51)
            local ban = banPlayer(targetPlayer,false, false,true, thePlayer, reason, seconds)
            mysql:query_free(\"UPDATE accounts SET banned=\'1\', banned_reason=\'\" .. mysql:escape_string(reason) .. \"\', banned_by=\'\" .. mysql:escape_string(playerName) .. \"\' WHERE id=\'\" .. mysql:escape_string(accountID) .. \"\'\")
         -- elseif (hiddenAdmin==1) then
            outputChatBox(\"AdmBan: Rejtett Admin kitiltotta \" .. targetPlayerName .. \". (\" .. hours .. \")\", getRootElement(), 255, 0, 51)
            outputChatBox(\"AdmBan: Oka: \" .. reason, getRootElement(), 255, 0, 51)
            outputChatBox(\"AdmBan: Idõ: \" .. hours .
[code]
« Utoljára szerkesztve: 2014. május 23. - 19:05:14 írta SkooLleer »

Admin rendszer probléma
« Válasz #4 Dátum: 2014. május 23. - 18:58:14 »
0 Show voters
Ami ezt meg akadályoza akkor miért nem szeded ki azt? Illetve tedd ki a
[code][ /code]

 tagot!

Admin rendszer probléma
« Válasz #5 Dátum: 2014. május 23. - 19:06:36 »
0 Show voters
Csak ugye nemtudom miaz ! :3

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal