Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Témák - SkooLleer

Oldalak: [1]
1
Segítségkérés / Social Gaming Mod probléma
« Dátum: 2016. November 05. - 17:36:16 »
Sziasztok!
Szeretném itthon megnézegetni a Social Gaming mod nagyját. Viszont bejelentkezés nélkül ez nem nagyon jön össze.
A problémám az lenne ugyanis, hogyha regisztrálni, illetve bejelentkezni szeretnék ,azonnal megjelenik egy piros \'ERROR\' felirat a login panel fölött.
A php fájlok a helyükön <-átírva a mysql, az mx_connection-ben átírva a mysql, illetve a php fájlok címe, illetve az api-ban is minden ami kell át van írva.
(Hibaüzenet nincs.)
Mi lehet még a probléma? Előre is köszönöm a válaszokat. :wave:
\'Nem,nem szeretnék szervert csinálni, ugyanis teljesen más a gondolkodásmódom.\'

2
Archívum / Villogó gif
« Dátum: 2014. Július 10. - 22:03:26 »
Sziasztok! Azt szeretném megtudni hogy hogyan lehet csinálni olyan szöveget ami villog le és fel mint a seemta illetve az AceMTA bal fenti oldalán található. Valaki esetleg tudja ?
Linkek:
http://forum.see-game.com/
http://acemta.hu/

3
Archívum / Automatikus Szeverüzenetek
« Dátum: 2014. Július 07. - 19:21:20 »
Sziasztok! Szeretnék egy olyan scriptet ami , automatikusan küldd szerverüzeneteket . Példa:
10 percenként
A rangokért /rangok !
Szóval valami ilyen scriptet szeretnék szerezni , találtam 2 ilyet viszont egyszerûen nem akarja kiírni a dolgokat :/

4
Archívum / Automatikus Gate
« Dátum: 2014. Július 05. - 13:04:52 »
Sziasztok!
Szeretném tõletek megkérdezni hogy ebbõl a script sorból hogy lehet azt kivenni hogy ne automatikusan csukódjon le a gate hanem manuálisan?
 

elseif (distance16<=1) and (open==false) then
   if (exports.global:hasItem(thePlayer, 64) or exports.global:hasItem(thePlayer, 108)) then
   open = true
    which = 16
   outputChatBox(\"Határ sorompó nyitva!!\", thePlayer, 0, 255, 0)
   moveObject(objGateh3, 1000, 50.324725799561, -1534.8117431641, 5.1300001907349, 0, -90, 0)
   setTimer(closePDSideGarageGate, 5000, 1, thePlayer)

 
Elõre is köszi!

5
Archívum / Adminszolgálati kép
« Dátum: 2014. Július 04. - 09:01:32 »
Sziasztok!
Szeretnék egy olyan scriptet találni hogy mikor egy adott admin , belép az adminszolgálatba , ne az legyen kinnt hogy milyen admin és stb.. hanem mondjuk egy képet betenni a scriptbe és mikor belép az admin szolgálatba a feje felett lesz a kép , ha pedig kilép eltûnik az adott kép.
Tudna erre nekem valaki egy megoldást?
Üdv.
Dávid

6
Archívum / Carshop-system resource
« Dátum: 2014. Július 03. - 10:26:37 »
Sziasztok! Lenne egy kérdésem a szerveremen van egy resource ami hibás , és nemtudom hogy mi lehet a hiba így gondoltam titeket kérdezlek meg ! Maga a script ez:
 

local mysql = exports.mysql
local priceCache = { }
local vehiclecount = { }
carshopPickup = createPickup(544.4990234375, -1292.7890625, 17.2421875, 3, 1239)
exports[\'anticheat-system\']:changeProtectedElementDataEx(carshopPickup, \"shopid\", 1, false)
boatshopPickup = createPickup(715.35546875, -1705.5791015625, 2.4296875, 3, 1239)
exports[\'anticheat-system\']:changeProtectedElementDataEx(boatshopPickup, \"shopid\", 2, false)
cheapcarshopPickup = createPickup( 2131.8115234375, -1151.3212890625, 24.060283660889, 3, 1239)
exports[\'anticheat-system\']:changeProtectedElementDataEx(cheapcarshopPickup, \"shopid\", 3, false)
function pickupUse(thePlayer)
if getElementData(source, \"shopid\") then
if getElementData(thePlayer, \"license.car\") == 1 then
   triggerClientEvent(thePlayer, \"showCarshopUI\", thePlayer, getElementData(source, \"shopid\"))
else
   outputChatBox(\"Csak jogosítvánnyal tudsz jármûvet venni.\", thePlayer, 255, 0, 0)
end
end
cancelEvent()
end
addEventHandler(\"onPickupHit\", getResourceRootElement(), pickupUse)
function test(thePlayer)
triggerClientEvent(thePlayer, \"showCarshopUI\", thePlayer, 4)
end
addCommandHandler(\"testgui\",test)
local function copy( t )
if type(t) == \'table\' then
local r = {}
for k, v in pairs( t ) do
   r[k] = copy( v )
end
return r
else
return t
end
end
local function countVehicles( )
vehiclecount = {}
for key, value in pairs( getElementsByType( \"vehicle\" ) ) do
if isElement( value ) then
   local model = getElementModel( value )
   if vehiclecount[ model ] then
      vehiclecount[ model ] = vehiclecount[ model ] + 1
   else
      vehiclecount[ model ] = 1
   end
end
end
end
 
function buildPriceCache(shopID)
priceCache[shopID] = { }
if tonumber(shopID) == 4 then
local activeShop = copy( g_shops[shopID] )
for key, value in ipairs( activeShop ) do
   if value[1] and value[2] and vehiclecount[ value[1] ] then
      priceCache[shopID][ value[1] ] = value[1]
   end
end
return
end
local activeShop = copy( g_shops[shopID] )
for key, value in ipairs( activeShop ) do
if value[1] and value[2] and vehiclecount[ value[1] ] then
   priceCache[shopID][ value[1] ] = value[2] + ( vehiclecount[ value[1] ] or 0 ) * 600
end
end
end
function buyCar(id, cost, col1, col2, x, y, z, rz, px, py, pz, prz, shopID)
countVehicles()
buildPriceCache(shopID)
--[[if not(priceCache[shopID][id]) then
exports.logs:logMessage(\"[CAR SHOP] \" .. getPlayerIP(client)..\" \\ \".. getPlayerName( client ) .. \"  tried to buy an \" .. getVehicleNameFromModel( id ) .. \" at an non existing shop for $\".. cost..\")\", 32)
return
end]]
--[[if not (priceCache[shopID][id] == cost) then
exports.logs:logMessage(\"[CAR SHOP] \" .. getPlayerIP(client)..\" \\ \" .. getPlayerName( client ) .. \"  tried to buy an \" .. getVehicleNameFromModel( id ) .. \" at shop \".. shopID ..\" for $\".. cost..\")\", 32)
return
end]]
if exports.global:hasMoney(client, cost) then
if not ( getElementData(client, \"loggedin\") == 1 ) then
   name = getPlayerName(client)
   exports.global:sendMessageToAdmins(\"\")
   return
end
if shopID == 4 then
   for key, value in pairs( getElementsByType( \"vehicle\" ) ) do
      if isElement( value ) then
         if getElementData(value, \"owner\") == getElementData(client, \"dbid\") then
            if getElementData(value, \"rent\") == 1 then
               outputChatBox(\"You are already renting a vehicle\",client,250,255,0)
               return
            end
         end
      end
   end
end
if exports.global:canPlayerBuyVehicle(client) then
   outputChatBox(\"Megvetted \" .. getVehicleNameFromModel(id) .. \" nevû kocsi \" .. cost .. \" FT-ért.\", client, 255, 194, 14)
   if shopID == 1 then
      outputChatBox(\"Sikeresen megvetted a kocsit! Ahoz, hogy ne tûnjön el parkold le a /park parancsal.\", client, 255, 194, 14)
      outputChatBox(\"\", client, 255, 0, 0)
   elseif shopID == 2 then
      outputChatBox(\"Sikeresen megvetted a kocsit! Ahoz, hogy ne tûnjön el parkold le a /park parancsal.\", client, 255, 194, 14)
      outputChatBox(\"\", client, 255, 0, 0)
   end
   outputChatBox(\"Ha nem parkolod le a kocsidat, akkor törlésre kerül.\", client, 255, 0, 0)
   outputChatBox(\"Nyomj \'k\'-t a kocsi kinyitásához.\", client, 255, 194, 14)
   makeCar(client, id, cost, col1, col2, x, y, z, rz, px, py, pz, prz,shopID)
else
   outputChatBox(\"Neked túl sok kocsid van.\", client, 255, 0, 0)
end
 
end
end
addEvent(\"buyCar\", true)
addEventHandler(\"buyCar\", getRootElement(), buyCar)
function tinyid( ) -- finds the smallest ID in the SQL instead of auto increment
local result = mysql:query_fetch_assoc(\"SELECT MIN(e1.id+1) AS nextID FROM vehicles AS e1 LEFT JOIN vehicles AS e2 ON e1.id +1 = e2.id WHERE e2.id IS NULL\")
if result then
local id = tonumber(result[\"nextID\"]) or 1
return id
end
return false
end
 
function makeCar(thePlayer, id, cost, col1, col2, x, y, z, rz, px, py, pz, prz, shopID,ids)
if not exports.global:takeMoney(thePlayer, cost) then
return
end
if not exports.global:canPlayerBuyVehicle(source) then
return
end
local rx = 0
local ry = 0
setElementPosition(thePlayer, px, py, pz)
setPedRotation(thePlayer, prz)
local username = getPlayerName(thePlayer)
local dbid = getElementData(thePlayer, \"dbid\")
local letter1 = string.char(math.random(65,90))
local letter2 = string.char(math.random(65,90))
local plate = letter1 .. letter2 .. math.random(0, 9) .. \" \" .. math.random(1000, 9999)
local locked = 0
local ids = tinyid()
 
local insertid = mysql:query_insert_free(\"INSERT INTO vehicles SET model=\'\" .. mysql:escape_string(id) .. \"\',id=\'\" .. mysql:escape_string(ids) .. \"\', x=\'\" .. mysql:escape_string(x) .. \"\', y=\'\" .. mysql:escape_string(y) .. \"\', z=\'\" .. mysql:escape_string(z) .. \"\', rotx=\'\" .. mysql:escape_string(rx) .. \"\', roty=\'\" .. mysql:escape_string(ry) .. \"\', rotz=\'\" .. mysql:escape_string(rz) .. \"\', color1=\'\" .. mysql:escape_string(col1) .. \"\', color2=\'\" .. mysql:escape_string(col2) .. \"\', faction=\'-1\', owner=\'\" .. mysql:escape_string(dbid) .. \"\', plate=\'\" .. mysql:escape_string(plate) .. \"\', currx=\'\" .. mysql:escape_string(x) .. \"\', curry=\'\" .. mysql:escape_string(y) .. \"\', currz=\'\" .. mysql:escape_string(z) .. \"\', currrx=\'0\', currry=\'0\', currrz=\'\" .. mysql:escape_string(rz) .. \"\', locked=\'\" .. mysql:escape_string(locked) .. \"\'\")
local rent
if (insertid) then
local veh = call( getResourceFromName( \"vehicle-system\" ), \"createShopVehicle\", insertid, id, x, y, z, 0, 0, rz, plate)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"fuel\", 100, false)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"Impounded\", 0)
setVehicleRespawnPosition(veh, x, y, z, 0, 0, rz)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"respawnposition\", {x, y, z, 0, 0, rz}, false)
setVehicleLocked(veh, false)
setVehicleColor(veh, col1, col2, col1, col2)
setVehicleOverrideLights(veh, 1)
setVehicleEngineState(veh, false)
setVehicleFuelTankExplodable(veh, false)
-- make sure it\'s an unique key
call( getResourceFromName( \"item-system\" ), \"deleteAll\", 3, insertid )
exports.global:giveItem( thePlayer, 3, insertid )
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"fuel\", 100, false)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"engine\", 0, false)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"oldx\", x, false)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"oldy\", y, false)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"oldz\", z, false)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"faction\", -1)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"owner\", dbid, false)
exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"job\", 0, false)
if shopID == 4 then
   rent = 1
   exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"rent\", 1, false)
   platetext = \"Rented\"..math.random(1,10000)..\"\"
   local query = mysql:query_free(\"UPDATE vehicles SET rent =\'\" .. mysql:escape_string(rent) .. \"\',plate=\'\" .. mysql:escape_string(platetext) .. \"\', rentcost=\'\" .. mysql:escape_string(cost) .. \"\' WHERE id=\'\" .. mysql:escape_string(insertid) .. \"\' LIMIT 1\")
else
   exports[\'anticheat-system\']:changeProtectedElementDataEx(veh, \"rent\", 0, false)
end
exports[\'vehicle-system\']:reloadVehicle(insertid)
if getVehicleType(veh) == \"Boat\" then
   exports.global:givePlayerAchievement(thePlayer, 27)
elseif shopID == 4 then
else
   exports.global:givePlayerAchievement(thePlayer, 17) -- my ride
end
exports.logs:logMessage(\"[CAR SHOP] \" .. getPlayerName( thePlayer ) .. \" bought car #\" .. insertid .. \" (\" .. getVehicleNameFromModel( id ) .. \")\", 9)
end
end

 
A probléma az hogy mikor egy ember odamegy venni autót , bármit mondjuk egy BMX et , kiírja hogy \"Neked túl sok kocsid van\" , pedig nincs is egyetlen jármûve sem az adott embernek . Így gondoltam ebben a kódban lehet a probléma . Véleményem szerint az lehet a probléma hogy nem adja át a mysql nek az adatot vagy nem veszi le ! Légyszives nézze át valaki sürgõs probléma lenne! Privátban is elfogadom a választ !
Üdv.
Dávid

7
Archívum / Notifications(infobox)
« Dátum: 2014. Július 02. - 17:54:32 »
Sziasztok!
Szeretném beüzemelni az infobox(notifications) plugint , viszont sehogy sem megy! Valaki segítene ebben?

8
Archívum / Infobox (notifications) probléma
« Dátum: 2014. Június 20. - 14:25:02 »
Sziasztok!
Tegnap kaptam nekem egy adminduty scriptet , amit köszönök is . Viszont egy problémám lenne hogy vagy nemtudom hogy hova kell behelyezni és hogyan , vagy valami a notifications resourceal van ... Bármilyen kódot rakok be a \"box_s.lua\" ba , egyszerûen nem mûködik . Példa :
 

function showBox(player, value, str)
if isElement(player) then
  triggerClientEvent(player, \"CreateBox\", getRootElement(), value, str)
end
function adminDuty(thePlayer, commandName)
if exports.global:isPlayerAdmin(thePlayer) then
  local adminduty = getElementData(thePlayer, \"adminduty\")
  local username = getPlayerName(thePlayer)
  local adminrang = exports.global:getPlayerAdminTitle(thePlayer)
  local playerName = getPlayerName(thePlayer)
  local pmid = getElementData(thePlayer, \"playerid\")
 
  if (adminduty==0) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 1)
   outputChatBox(\"\".. username .. \" adminszolgálatba lépett! /pm \".. pmid ..\" parancsal írhatsz neki.\", getRootElement(), 0, 255, 0)
   exports.infobox:showBox(root, \"info\", \"\".. username .. \" adminszolgálatba lépett! /pm \".. pmid ..\" parancsal írhatsz neki.\")
   
  elseif (adminduty==1) then
   exports[\'anticheat-system\']:changeProtectedElementDataEx(thePlayer, \"adminduty\", 0)
   outputChatBox(\"\".. username .. \" kilépett adminszolgálatból! Bármi gond van írj neki /reportban.\", getRootElement(), 255, 0, 0)
   exports.infobox:showBox(root, \"info\", \"\".. username .. \" kilépett adminszolgálatból! Bármi gond van írj neki /reportban.\")
  end
  mysql:query_free(\"UPDATE accounts SET adminduty=\" .. mysql:escape_string(getElementData(thePlayer, \"adminduty\")) .. \" WHERE id = \" .. mysql:escape_string(getElementData(thePlayer, \"gameaccountid\")) )
  exports.global:updateNametagColor(thePlayer)
end
end
addCommandHandler(\"adminduty\", adminDuty, false, false)

 
Ugye így helyeztem be a kódot amit küldtek , és semmi mûködés semmi .. megpróbáltam berakni a \"box_c.lua\" ba ott se mûködött. Az egyedüli parancs ami kiadott valamit az ez:
 

addCommandHandler(\"sb\",function()
showBox (\"info\",\"Just some information\")

 
És ennyi , a többit , bármit behelyeztem nem mûködött , illetve ezt is a \"box_c.lua\" ba helyeztem be és amikor beírtam ezt , akkor csak nekem adta ki az infoboxot..
Remélem hogy valaki tud segíteni! Akár privát üzenetben is várom a válaszokat!
Elõre is köszi!
Üdvözlettel
Dávid

9
Archívum / Notifications (infobox)
« Dátum: 2014. Június 14. - 13:54:31 »
Sziasztok!
Szeretném létrehozni azt a szerveremre hogyha egy admin beírja hogy /adminduty akkor kiírja az infobox hogy \"xy adminszolgálatba lépett.\" Az infobox resource az már megvan csak ez lenne a kérdésem hozzá , elõre is köszönöm.

10
Archívum / Infobox probléma
« Dátum: 2014. Május 31. - 10:28:14 »
Sziasztok!
Szeretnék tõletek segítséget kérni , van egy olyan nevezetû resource hogy \"infobox\" másnevén \"notifications\" amit megtaláltok ugye az mta oldalán.
Szóval azt szeretném beállítani hogy ha beírom pl azt hogy ./pill akkor kiírja hogy jelenleg afk vagyok , ez csak egy példa.
Maga a box_s.lua az így néz ki :
 

function showBox(player, value, str)
if isElement(player) then
triggerClientEvent(player, \"CreateBox\", getRootElement(), value, str)
end
end

 
Állítólag ide kell beszúrni pár sort-

11
Archívum / Admin rendszer probléma
« Dátum: 2014. Május 23. - 18:43:02 »
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]

Oldalak: [1]
SimplePortal 2.3.7 © 2008-2024, SimplePortal