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 - samu126
Oldalak: [1]
1
« Dátum: 2018. június 27. - 19:39:58 »
Existence RolePlay SQL táblázat Ha valakinek megvan, légyszi küldje el, végre megcsináltam hogy menjen, de sql táblázatot sehol nem találok. Remélem megvan valakinek.
2
« Dátum: 2018. június 25. - 15:30:25 »
HL MTA - Bugtalan mod Az lenne a kérdésem, hogy HL MTA-ból létezik-e bugtalan mód, vagy csak kevés buggal rendelkező mod-e? Már az egész netet átkutattam, de mindegyik csak 100millió hibával van. Meg az lenne, hogyha bármelyik ilyen nagyobb,híresebb módot berakok, csatlakozni akarok, csak kiírja hogy csatlakozva, de csak fekete kép, nem tölt semmit le. Ezt tudom, az én hibámból van, de valaki segítene hogy lehet ezt kiküszöbölni?
3
« Dátum: 2018. június 24. - 20:52:17 »
External modot használok, elkezdtem csinálni az első frakciót, leakartam rakni a duty helyet, beírtam a koordinátákat, dimenzió,interiort helyesen, de amikor restartolom, akkor semmi sincs ott, nincs ott az a ruha jel, amibe beleállsz, és akkor írhatod be a /duty parancsot. HIBAKÓD: (Konzol) [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:155: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:191: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:244: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:300: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:339: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:393: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:432: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] script:
local con = exports.mta_connection:getConnection() --local msDutyPlace = createColSphere(362.12805175781, 173.2332611084, 1008.3828125, 3) --setElementInterior(msDutyPlace, 3) --setElementDimension(msDutyPlace, 1845) --local sheriffDutyPlace = createColSphere(262.29479980469, 109.41187286377, 1004.6171875, 3) --setElementInterior(sheriffDutyPlace, 10) --setElementDimension(sheriffDutyPlace, 62) local pdDutyPlace = createColSphere(1585.3444824219, -1677.7734375, 5.8969912528992, 1) setElementInterior(pdDutyPlace, 0) setElementDimension(pdDutyPlace, 0) --local fbiDutyPlace = createColSphere(273.33767700195, 118.5910949707, 1004.6171875, 3)------- --setElementInterior(fbiDutyPlace, 10) --setElementDimension(fbiDutyPlace, 4) --local mechanicDutyPlace = createColSphere(1599.3013916016, -2135.5134277344, 13.893982887268, 3) ---- --setElementInterior(mechanicDutyPlace, 0) --setElementDimension(mechanicDutyPlace, 0) --local taxDutyPlace = createColSphere(-2032.5036621094, -116.89626312256, 1035.171875, 3) --setElementInterior(taxDutyPlace, 3) --setElementDimension(taxDutyPlace, 81) --local swatDutyPlace = createColSphere(273.90167236328, 122.02119445801, 1004.6171875, 3)--- --setElementInterior(swatDutyPlace, 10) --setElementDimension(swatDutyPlace, 4) --local govDutyPlace = createColSphere(348.69982910156, 158.87745666504, 1014.1875, 3) --setElementInterior(govDutyPlace, 3) --setElementDimension(govDutyPlace, 1365) local dutyFactions = { [1]=true, -- [4]=true, -- [9]=true, -- [10]=true, -- [12]=true, -- [33]=true, -- [13]=true, -- [29]=true, } local factionNames = { [1]=\"Rendőrség\", -- [4]=\"Mentőszolgálat\", -- [9]=\"NNI\", -- [10]=\"TEK\", -- [11]=\"Szerelő\", -- [33]=\"FBI\", -- [13]=\"Taxi\", -- [29]=\"Önkormányzat\", } function sendGroupMessage(factionid, msg) for k, v in ipairs(getElementsByType(\"player\")) do if exports.exg_dashboard:isPlayerInFaction(v, tonumber(factionid)) then outputChatBox(\"#F9BF3B[\" .. factionNames[factionid] .. \"]#ffffff \" .. msg, v, 255, 255, 255, true) end end end addEvent(\"sendGroupMessage\", true) addEventHandler(\"sendGroupMessage\", root, sendGroupMessage) function sendGroupMessageWithoutPlayer(player, factionid, msg) for k, v in ipairs(getElementsByType(\"player\")) do if exports.exg_dashboard:isPlayerInFaction(v, factionid) and getPlayerName(v) ~= getPlayerName(player) then outputChatBox(\"#F9BF3B[\" .. factionNames[factionid] .. \"]#ffffff \" .. msg, v, 255, 255, 255, true) end end end local pdArrestPlace = createColSphere(217.57298278809, 114.57052612305, 999.015625, 5) setElementInterior(pdArrestPlace, 10) setElementDimension(pdArrestPlace, 4) local sheriffArrestPlace = createColSphere(217.57298278809, 114.57052612305, 999.015625, 5) setElementInterior(sheriffArrestPlace, 10) setElementDimension(sheriffArrestPlace, 62) local swatArrestPlace = createColSphere(197.94653320313, 179.14588928223, 1003.0299072266, 5) setElementInterior(swatArrestPlace, 3) setElementDimension(swatArrestPlace, 73) local fbiArrestPlace = createColSphere(197.94653320313, 179.14588928223, 1003.0299072266, 5) setElementInterior(fbiArrestPlace, 3) setElementDimension(fbiArrestPlace, 73) function dutyPlayers(thePlayer, commandName) local duty = getElementData(thePlayer, \"char:duty\") or false --if getElementData(thePlayer, \"duty:dutys\") == true then outputChatBox(\"#dc143c[Hiba]:#ffffff Csak 1 percenként tudsz szolgálatba lépni/kilépni a szolgálatból.\", thePlayer, 255, 255, 255, true) return end exports.mta_item:RemovePlayerDutyItems(thePlayer) if isElementWithinColShape(thePlayer, pdDutyPlace) and getElementDimension(thePlayer) == getElementDimension(pdDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 7) and dutyFactions[7] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 7 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_7\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 7) sendGroupMessage(7, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 150, 1) -- Deagle töltény (5x9mm) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 20, 1, 1, 1) -- Gumibot exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs setPeArmor(thePlayer, 100) setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(7, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) setPedArmor(thePlayer, 0) exports.mta_item:RemovePlayerDutyItems(thePlayer) end end end if isElementWithinColShape(thePlayer, msDutyPlace) and getElementDimension(thePlayer) == getElementDimension(msDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, and dutyFactions[8] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 8 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_8\") or 0 if not duty then --outputChatBox(\"#0094ff[Mentőszolgálat]:#ffffff Sikeresen szolgálatba léptél.\", thePlayer, 255, 255, 255, true) exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) else --outputChatBox(\"#0094ff[Mentőszolgálat]:#ffffff Sikeresen kiléptél a szolgálatból.\", thePlayer, 255, 255, 255, true) exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end --ITT TALÁLHATÓ AZ EGY ILYEN HIBA: if isElementWithinColShape(thePlayer, sheriffDutyPlace) and getElementDimension(thePlayer) == getElementDimension(sheriffDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 300) and dutyFactions[300] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 300 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_300\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 300) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 20, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 23, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 28, 1, 120, 1) exports.mta_item:giveItem(thePlayer, 31, 1, 90, 1) setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) exports.mta_item:RemovePlayerDutyItems(thePlayer) setPedArmor(thePlayer, 0) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, swatDutyPlace) and getElementDimension(thePlayer) == getElementDimension(swatDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 10) and dutyFactions[10] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 10 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_10\") or 96 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 10) sendGroupMessage(10, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) for _, stat in ipairs({ 69 ,78 , 79 }) do setPedStat(thePlayer, stat, 1000) end exports.mta_item:giveItem(thePlayer, 15, 1, 1, 1) -- M4 exports.mta_item:giveItem(thePlayer, 29, 1, 300, 1) -- M4 töltény exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs exports.mta_item:giveItem(thePlayer, 41, 1, 1, 1) -- Pajzs exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 100, 1) -- Deagle töltény setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(10, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) exports.mta_item:RemovePlayerDutyItems(thePlayer) setPedArmor(thePlayer, 0) for _, stat in ipairs({ 69 ,78 , 79 }) do setPedStat(thePlayer, stat, 0) end end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, mechanicDutyPlace) and getElementDimension(thePlayer) == getElementDimension(mechanicDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 11) and dutyFactions[11] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 11 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_11\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 11) sendGroupMessage(11, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(11, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, fbiDutyPlace) and getElementDimension(thePlayer) == getElementDimension(fbiDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 9) and dutyFactions[9] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 9 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_9\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 9) sendGroupMessage(33, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs exports.mta_item:giveItem(thePlayer, 24, 1, 1, 1) -- MP5 exports.mta_item:giveItem(thePlayer, 30, 1, 150, 1) -- MP5 töltény exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 50, 1) -- Deagle töltény exports.mta_item:giveItem(thePlayer, 130, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 131, 1, 1, 1) -- Sokkoló setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) exports.mta_item:RemovePlayerDutyItems(thePlayer) setPedArmor(thePlayer, 0) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, taxDutyPlace) and getElementDimension(thePlayer) == getElementDimension(taxDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 13) and dutyFactions[13] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 13 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_13\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 13) sendGroupMessage(13, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(13, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, govDutyPlace) and getElementDimension(thePlayer) == getElementDimension(govDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 29) and dutyFactions[29] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 29 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_29\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 29) sendGroupMessage(29, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs exports.mta_item:giveItem(thePlayer, 110, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 20, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 100, 1) -- Deagle töltény setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(29, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end end addCommandHandler(\"duty\", dutyPlayers, false, false) function gyogyit(thePlayer, commandName, targetPlayer) if exports.exg_dashboard:isPlayerInFaction(thePlayer, then if getElementData(thePlayer, \"char:dutyfaction\") ~= 8 then outputChatBox(\"#dc143c[Hiba]:#ffffff Nem vagy szolgálatban.\", thePlayer, 255, 255, 255, true) return end if not (targetPlayer) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) local cost = 50 if thePlayer == targetPlayer then outputChatBox(\"#dc143c[Hiba]:#ffffff Magadat nem tudod meggyógyítani.\", thePlayer, 255, 255, 255, true) return end if distance <= 4 and int == tint and tdim == dim then if (targetPlayer) then setElementHealth(targetPlayer, 100) sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" meggyógyította \" .. targetPlayerName:gsub(\"_\",\" \") .. \" játékost.\") setPedHeadless(targetPlayer, false) toggleAllControls(targetPlayer, true, true, false) toggleControl(targetPlayer, \'forwards\', true) toggleControl(targetPlayer, \'left\', true) toggleControl(targetPlayer, \'right\', true) toggleControl(targetPlayer, \'backwards\', true) toggleControl(targetPlayer, \'enter_passenger\', true) toggleControl(targetPlayer, \'enter_exit\', true) toggleControl(targetPlayer, \'aim_weapon\', true) toggleControl(targetPlayer, \'jump\', true) toggleControl(targetPlayer, \'fire\', true) exports.mta_notifications:createNotification(thePlayer, \"Sikeresen meggyógyítottad a sérültet\", 4) setElementData(targetPlayer, \"char:money\", getElementData(targetPlayer, \"char:money\")-cost) exports[\"exg_dashboard\"]:giveGroupBalance(8, cost) exports.mta_notifications:createNotification(targetPlayer, \"Egy mentős meggyógyított téged.\", 4) exports.mta_chat:sendLocalMeAction(thePlayer, \"meggyógyította \" .. targetPlayerName:gsub(\"_\",\" \") .. \" -t.\") outputChatBox(\"#1E8BC3[Információ]:#ffffff A gyógyítás #7cc576\" .. cost .. \"$#ffffff -ba került.\", targetPlayer, 255, 255, 255, true) end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end addCommandHandler(\"gyogyit\", gyogyit, false, false) local mutetpos = createColSphere(1176.16015625, -1308.5034179688, 13.987363815308, 5) function mutet(thePlayer, commandName, targetPlayer) if exports.exg_dashboard:isPlayerInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then if not (targetPlayer) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) if (targetPlayer) then if isPedInVehicle(targetPlayer) then removePedFromVehicle(targetPlayer) end if isElementWithinColShape(targetPlayer, mutetpos) and isElementWithinColShape(thePlayer, mutetpos) then fadeCamera(targetPlayer, false, 1.5) setElementFrozen(targetPlayer, true) setTimer( function() triggerClientEvent(targetPlayer, \"mutetStart\", targetPlayer, targetPlayer) end, 3500, 1) sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" műtőbe helyezte \" .. targetPlayerName:gsub(\"_\",\" \") ..\" játékost.\") setTimer( function() fadeCamera(targetPlayer, true, 2.5) end, 3500, 1) end end end end end addCommandHandler(\"mutet\", mutet, false, false) local myMarker = createMarker ( 1183.4505615234, -1317.5316162109, 13.575407028198-0.9, \"cylinder\", 1, 255, 255, 0, 170 ) function checkMedicals(hitplayer, dimension) if isElement(hitplayer) and getElementType(hitplayer) == \"player\" and not isPedInVehicle(hitplayer) then local count = 0 for k, v in ipairs(getElementsByType(\"player\")) do if exports.exg_dashboard:isPlayerInFaction(v, and getElementData(v, \"char:duty\") == 1 then count = count + 1 end end if count <= 1 then triggerClientEvent(hitplayer, \"showHealthPanel\", hitplayer, hitplayer, 1) else outputChatBox(\"#dc143c[Hiba]:#ffffff Jelenleg vannak elérhető mentősök, kérj tőlük segítséget.\", hitplayer, 255, 255, 255, true) end end end addEventHandler( \"onMarkerHit\", myMarker, checkMedicals ) function stopMedicals(hitplayer, dimension) if isElement(hitplayer) and getElementType(hitplayer) == \"player\" then triggerClientEvent(hitplayer, \"showHealthPanel\", hitplayer, hitplayer, 2) end end addEventHandler( \"onMarkerLeave\", myMarker, stopMedicals ) function gyogyitPlayer(player) if isElement(player) then if getElementHealth(player) == 100 then outputChatBox(\"#dc143c[Hiba]:#ffffff Jelenleg nincs sérülésed amit lehetne gyógyítani.\", player, 255, 255, 255, true) return end setElementHealth(player, 100) setPedHeadless(player, false) toggleAllControls(player, true, true, false) toggleControl(player, \'forwards\', true) toggleControl(player, \'left\', true) toggleControl(player, \'right\', true) toggleControl(player, \'backwards\', true) toggleControl(player, \'enter_passenger\', true) toggleControl(player, \'enter_exit\', true) toggleControl(player, \'aim_weapon\', true) toggleControl(player, \'jump\', true) toggleControl(player, \'fire\', true) exports.mta_notifications:createNotification(player, \"Sikeresen meggyógyítottad magad.\", 4) outputChatBox(\"#1E8BC3[Információ]:#ffffff Sikeresen elláttad a sérüléseidet. Az ellátás #7cc576200$#ffffff -ba került.\", player, 255, 255, 255, true) setElementData(player, \"char:money\", getElementData(player, \"char:money\")-200) exports[\"exg_dashboard\"]:giveGroupBalance(8, 100) end end addEvent(\"gyogyitPlayer\", true) addEventHandler(\"gyogyitPlayer\", getRootElement(), gyogyitPlayer) function ticketPlayer(thePlayer, commandName, targetPlayer, cost, ...) if exports.exg_dashboard:isPlayerInFaction(thePlayer, 7) and getElementData(thePlayer, \"char:dutyfaction\") == 7 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 7 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then before = \"#1E8BC3[Számla]:#ffffff\" between = \"számlát\" maxCost = 15000000 factionid = 29 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 9) and getElementData(thePlayer, \"char:dutyfaction\") == 9 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 29 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 10) and getElementData(thePlayer, \"char:dutyfaction\") == 10 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 10 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 33) and getElementData(thePlayer, \"char:dutyfaction\") == 33 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 29 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 29) and getElementData(thePlayer, \"char:dutyfaction\") == 29 then before = \"#ffcc00[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 5000000 factionid = 29 else factionid = true before = true between = true maxCost = true end if (factionid) then if not (targetPlayer) or not (cost) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" ..commandName .. \" [Név / ID] [Összeg] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) if targetPlayer == thePlayer then outputChatBox(\"#dc143c[Hiba]:#ffffff Magadat nem tudod ticketelni.\", thePlayer, 255, 255, 255, true) return end local cost = tonumber(cost) local reason = table.concat({...}, \" \") local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if cost <= 0 then outputChatBox(\"#dc143c[Hiba]:#ffffff 0-nál nagyobb összeget kellene megadni.\", thePlayer, 255, 255, 255, true) return end if maxCost < cost then outputChatBox(\"#dc143c[Hiba]:#ffffff Az összeg meghaladja a maximális keretet. (\" .. maxCost .. \"$)\", thePlayer, 255, 255, 255, true) return end if distance <= 4 and int == tint and dim == tdim then sendGroupMessageWithoutPlayer(thePlayer, factionid, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kiadott egy \" .. between .. \" \" .. targetPlayerName:gsub(\"_\", \" \") .. \" játékosnak.\") sendGroupMessageWithoutPlayer(thePlayer, factionid, \"Összeg: \" .. cost .. \"$\") sendGroupMessageWithoutPlayer(thePlayer, factionid, \"Indok: \" .. reason) outputChatBox(before .. \" #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff kiadott neked egy \" .. between .. \". Összeg: #7cc576\" .. cost .. \"$\", targetPlayer, 255, 255, 255, true) outputChatBox(before .. \" Indok: #7cc576\" .. reason, targetPlayer, 255, 255, 255, true) exports.exg_dashboard:giveGroupBalance(factionid, cost) setElementData(targetPlayer, \"char:money\", getElementData(targetPlayer, \"char:money\")-cost) outputChatBox(before .. \" Kiadtál egy \" .. between .. \" #7cc576\" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \"#ffffff játékosnak. Összeg: #7cc576\" .. cost .. \"$\", thePlayer, 255, 255, 255, true) outputChatBox(before .. \" Indok: #7cc576\" .. reason, thePlayer, 255, 255, 255, true) else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end addCommandHandler(\"ticket\", ticketPlayer, false, false) function government(thePlayer, commandName, ...) local faction = false local mess = \"felhívás\" if exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 7) and getElementData(thePlayer, \"char:dutyfaction\") == 7 then faction = \"Rendőrség\" color = \"#446CB3\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then faction = \"Mentőszolgálat\" color = \"#F89406\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 9) and getElementData(thePlayer, \"char:dutyfaction\") == 9 then faction = \"NNI\" color = \"#D35400\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 10) and getElementData(thePlayer, \"char:dutyfaction\") == 10 then faction = \"TEK\" color = \"#446CB3\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 33) and getElementData(thePlayer, \"char:dutyfaction\") == 33 then faction = \"FBI\" color = \"#446CB3\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 11) and getElementData(thePlayer, \"char:dutyfaction\") == 11 then faction = \"Szerelőtársaság\" color = \"#00ced1\" mess = \"közlemény\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 13) and getElementData(thePlayer, \"char:dutyfaction\") == 13 then faction = \"Taxitársaság\" color = \"#00ced1\" mess = \"közlemény\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 29) and getElementData(thePlayer, \"char:dutyfaction\") == 29 then faction = \"Önkormányzat\" color = \"#ffcc00\" mess = \"közlemény\" end if (faction) then if not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Üzenet]\", thePlayer, 255, 255, 255, true) else local msg = table.concat({...},\" \") if (msg) then outputChatBox(\" \", root, 255, 255, 255, true) outputChatBox(color .. \"[\" .. faction .. \" \" .. mess .. \"]:#ffffff \" .. msg, root, 255, 255, 255, true) exports.mta_admin:outputAdminMessage(\"#7cc576\" .. getPlayerName(thePlayer) .. \"#ffffff használta a #0094ff/\" .. commandName .. \"#ffffff parancsot.\") triggerClientEvent(root, \"playGovSound\", root) end end end end addCommandHandler(\"gov\", government, false, false) function playerBerak(thePlayer, commandName, targetPlayer) if exports.exg_dashboard:isPlayerInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then if not (targetPlayer) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if (targetPlayer) then if distance <= 4 and int == tint and dim == tdim then for i, v in ipairs(getElementsByType(\"vehicle\")) do local vx, vy, vz = getElementPosition(v) local vdistance = getDistanceBetweenPoints3D(x, y, z, vx, vy, vz) if vdistance <= 4 then if (v) and getElementModel(v) == 416 then warpPedIntoVehicle(targetPlayer, v, 3) else outputChatBox(\"#dc143c[Hiba]:#ffffff Nincs a közeledben mentő.\", thePlayer, 255, 255, 255, true) end end end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end end addCommandHandler(\"berak\", playerBerak, false, false) function jailPlayer(thePlayer, commandName, targetPlayer, ido, ...) if isElementWithinColShape(thePlayer, pdArrestPlace) and getElementDimension(thePlayer) == getElementDimension(pdArrestPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 7) and getElementData(thePlayer, \"char:dutyfaction\") == 7 then if not (targetPlayer) or not (ido) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID] [Perc] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local ido = tonumber(ido) local reason = table.concat({...}, \" \") local maxTime = 100 local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if distance <= 4 and int == tint and dim == tdim then if maxTime < ido then outputChatBox(\"#dc143c[Hiba]:#ffffff Maximum csak \" .. maxTime .. \" percig tudsz börtönözni.\", thePlayer, 255, 255, 255, true) return end if (targetPlayer) then local cellaN = math.random(1, 4) if cellaN == 1 then mCella = {219.53465270996, 109.86731719971, 999.015625} elseif cellaN == 2 then mCella = {215.24586486816, 110.42152404785, 999.015625} elseif cellaN == 3 then mCella = {223.49760437012, 109.82486724854, 999.015625} elseif cellaN == 4 then mCella = {228.18232727051, 110.42670440674, 999.015625} end if mCella then setElementPosition(targetPlayer, mCella[1], mCella[2], mCella[3]) outputChatBox(\"#1E8BC3[Börtön]:#ffffff #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff őrizetbe vett téged. Időtartam: #7cc576\" .. ido .. \"#ffffff perc.\", targetPlayer, 255, 255, 255, true) outputChatBox(\"#1E8BC3[Börtön]:#ffffff Indok: #7cc576\" .. reason .. \"\", targetPlayer, 255, 255, 255, true) sendGroupMessage(7, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" őrizetbe vette \" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \" játékost. Időtartam: \" .. ido .. \" perc.\") sendGroupMessage(7, \"Indok: \" .. reason) setElementData(targetPlayer, \"jailed\", 1) setElementData(targetPlayer, \"jailed:player\", getPlayerName(thePlayer)) setElementData(targetPlayer, \"jailed:reason\", reason) setElementData(targetPlayer, \"jailed:ido\", ido) setElementData(targetPlayer, \"jailed:idoTelik\", ido) setElementData(targetPlayer, \"jailed:idoLetelt\", 0) local jailTimer = setTimer(idoTelikLe, 60000, ido, targetPlayer) setElementData(targetPlayer, \"jailed:timer\", jailTimer) local sql = dbExec(con, \"UPDATE characters SET jailed = ?, jailed_reason = ?, jailed_idoTelik = ?, jailed_alapIdo = ?, jailed_player = ? WHERE id = \'\" .. getElementData(targetPlayer, \"char:id\") .. \"\'\", 1, reason, ido, ido, getPlayerName(thePlayer)) end end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end if isElementWithinColShape(thePlayer, sheriffArrestPlace) and getElementDimension(thePlayer) == getElementDimension(sheriffArrestPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 9) and getElementData(thePlayer, \"char:dutyfaction\") == 9 then if not (targetPlayer) or not (ido) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID] [Perc] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local ido = tonumber(ido) local reason = table.concat({...}, \" \") local maxTime = 100 local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if distance <= 4 and int == tint and dim == tdim then if maxTime < ido then outputChatBox(\"#dc143c[Hiba]:#ffffff Maximum csak \" .. maxTime .. \" percig tudsz börtönözni.\", thePlayer, 255, 255, 255, true) return end if (targetPlayer) then local cellaN = math.random(1, 4) if cellaN == 1 then mCella = {219.53465270996, 109.86731719971, 999.015625} elseif cellaN == 2 then mCella = {215.24586486816, 110.42152404785, 999.015625} elseif cellaN == 3 then mCella = {223.49760437012, 109.82486724854, 999.015625} elseif cellaN == 4 then mCella = {228.18232727051, 110.42670440674, 999.015625} end if mCella then setElementPosition(targetPlayer, mCella[1], mCella[2], mCella[3]) outputChatBox(\"#1E8BC3[Börtön]:#ffffff #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff őrizetbe vett téged. Időtartam: #7cc576\" .. ido .. \"#ffffff perc.\", targetPlayer, 255, 255, 255, true) outputChatBox(\"#1E8BC3[Börtön]:#ffffff Indok: #7cc576\" .. reason .. \"\", targetPlayer, 255, 255, 255, true) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" őrizetbe vette \" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \" játékost. Időtartam: \" .. ido .. \" perc.\") sendGroupMessage(9, \"Indok: \" .. reason) setElementData(targetPlayer, \"jailed\", 1) setElementData(targetPlayer, \"jailed:player\", getPlayerName(thePlayer)) setElementData(targetPlayer, \"jailed:reason\", reason) setElementData(targetPlayer, \"jailed:ido\", ido) setElementData(targetPlayer, \"jailed:idoTelik\", ido) setElementData(targetPlayer, \"jailed:idoLetelt\", 0) local jailTimer = setTimer(idoTelikLe, 60000, ido, targetPlayer) setElementData(targetPlayer, \"jailed:timer\", jailTimer) local sql = dbExec(con, \"UPDATE characters SET jailed = ?, jailed_reason = ?, jailed_idoTelik = ?, jailed_alapIdo = ?, jailed_player = ? WHERE id = \'\" .. getElementData(targetPlayer, \"char:id\") .. \"\'\", 1, reason, ido, ido, getPlayerName(thePlayer)) end end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end if isElementWithinColShape(thePlayer, swatArrestPlace) and getElementDimension(thePlayer) == getElementDimension(swatArrestPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 10) and getElementData(thePlayer, \"char:dutyfaction\") == 10 then if not (targetPlayer) or not (ido) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID] [Perc] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local ido = tonumber(ido) local reason = table.concat({...}, \" \") local maxTime = 320 local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if distance <= 4 and int == tint and dim == tdim then if maxTime < ido then outputChatBox(\"#dc143c[Hiba]:#ffffff Maximum csak \" .. maxTime .. \" percig tudsz börtönözni.\", thePlayer, 255, 255, 255, true) return end if (targetPlayer) then local cellaN = math.random(1, 4) if cellaN == 1 then mCella = {219.53465270996, 109.86731719971, 999.015625} elseif cellaN == 2 then mCella = {215.24586486816, 110.42152404785, 999.015625} elseif cellaN == 3 then mCella = {223.49760437012, 109.82486724854, 999.015625} elseif cellaN == 4 then mCella = {228.18232727051, 110.42670440674, 999.015625} end if mCella then setElementPosition(targetPlayer, mCella[1], mCella[2], mCella[3]) outputChatBox(\"#1E8BC3[Börtön]:#ffffff #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff őrizetbe vett téged. Időtartam: #7cc576\" .. ido .. \"#ffffff perc.\", targetPlayer, 255, 255, 255, true) outputChatBox(\"#1E8BC3[Börtön]:#ffffff Indok: #7cc576\" .. reason .. \"\", targetPlayer, 255, 255, 255, true) sendGroupMessage(10, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" őrizetbe vette \" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \" játékost. Időtartam: \" .. ido .. \" perc.\") sendGroupMessage(10, \"Indok: \" .. reason) setElementD
4
« Dátum: 2018. június 24. - 20:51:23 »
External modot használok, elkezdtem csinálni az első frakciót, leakartam rakni a duty helyet, beírtam a koordinátákat, dimenzió,interiort helyesen, de amikor restartolom, akkor semmi sincs ott, nincs ott az a ruha jel, amibe beleállsz, és akkor írhatod be a /duty parancsot. HIBAKÓD: (Konzol) [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:155: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:191: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:244: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:300: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:339: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:393: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] [20:36:00] WARNING: mta_factionscripts\\sourceS.lua:432: Bad argument @ \'isElementWithinColShape\' [Expected colshape at argument 2, got nil] script:
local con = exports.mta_connection:getConnection() --local msDutyPlace = createColSphere(362.12805175781, 173.2332611084, 1008.3828125, 3) --setElementInterior(msDutyPlace, 3) --setElementDimension(msDutyPlace, 1845) --local sheriffDutyPlace = createColSphere(262.29479980469, 109.41187286377, 1004.6171875, 3) --setElementInterior(sheriffDutyPlace, 10) --setElementDimension(sheriffDutyPlace, 62) local pdDutyPlace = createColSphere(1585.3444824219, -1677.7734375, 5.8969912528992, 1) setElementInterior(pdDutyPlace, 0) setElementDimension(pdDutyPlace, 0) --local fbiDutyPlace = createColSphere(273.33767700195, 118.5910949707, 1004.6171875, 3)------- --setElementInterior(fbiDutyPlace, 10) --setElementDimension(fbiDutyPlace, 4) --local mechanicDutyPlace = createColSphere(1599.3013916016, -2135.5134277344, 13.893982887268, 3) ---- --setElementInterior(mechanicDutyPlace, 0) --setElementDimension(mechanicDutyPlace, 0) --local taxDutyPlace = createColSphere(-2032.5036621094, -116.89626312256, 1035.171875, 3) --setElementInterior(taxDutyPlace, 3) --setElementDimension(taxDutyPlace, 81) --local swatDutyPlace = createColSphere(273.90167236328, 122.02119445801, 1004.6171875, 3)--- --setElementInterior(swatDutyPlace, 10) --setElementDimension(swatDutyPlace, 4) --local govDutyPlace = createColSphere(348.69982910156, 158.87745666504, 1014.1875, 3) --setElementInterior(govDutyPlace, 3) --setElementDimension(govDutyPlace, 1365) local dutyFactions = { [1]=true, -- [4]=true, -- [9]=true, -- [10]=true, -- [12]=true, -- [33]=true, -- [13]=true, -- [29]=true, } local factionNames = { [1]=\"Rendőrség\", -- [4]=\"Mentőszolgálat\", -- [9]=\"NNI\", -- [10]=\"TEK\", -- [11]=\"Szerelő\", -- [33]=\"FBI\", -- [13]=\"Taxi\", -- [29]=\"Önkormányzat\", } function sendGroupMessage(factionid, msg) for k, v in ipairs(getElementsByType(\"player\")) do if exports.exg_dashboard:isPlayerInFaction(v, tonumber(factionid)) then outputChatBox(\"#F9BF3B[\" .. factionNames[factionid] .. \"]#ffffff \" .. msg, v, 255, 255, 255, true) end end end addEvent(\"sendGroupMessage\", true) addEventHandler(\"sendGroupMessage\", root, sendGroupMessage) function sendGroupMessageWithoutPlayer(player, factionid, msg) for k, v in ipairs(getElementsByType(\"player\")) do if exports.exg_dashboard:isPlayerInFaction(v, factionid) and getPlayerName(v) ~= getPlayerName(player) then outputChatBox(\"#F9BF3B[\" .. factionNames[factionid] .. \"]#ffffff \" .. msg, v, 255, 255, 255, true) end end end local pdArrestPlace = createColSphere(217.57298278809, 114.57052612305, 999.015625, 5) setElementInterior(pdArrestPlace, 10) setElementDimension(pdArrestPlace, 4) local sheriffArrestPlace = createColSphere(217.57298278809, 114.57052612305, 999.015625, 5) setElementInterior(sheriffArrestPlace, 10) setElementDimension(sheriffArrestPlace, 62) local swatArrestPlace = createColSphere(197.94653320313, 179.14588928223, 1003.0299072266, 5) setElementInterior(swatArrestPlace, 3) setElementDimension(swatArrestPlace, 73) local fbiArrestPlace = createColSphere(197.94653320313, 179.14588928223, 1003.0299072266, 5) setElementInterior(fbiArrestPlace, 3) setElementDimension(fbiArrestPlace, 73) function dutyPlayers(thePlayer, commandName) local duty = getElementData(thePlayer, \"char:duty\") or false --if getElementData(thePlayer, \"duty:dutys\") == true then outputChatBox(\"#dc143c[Hiba]:#ffffff Csak 1 percenként tudsz szolgálatba lépni/kilépni a szolgálatból.\", thePlayer, 255, 255, 255, true) return end exports.mta_item:RemovePlayerDutyItems(thePlayer) if isElementWithinColShape(thePlayer, pdDutyPlace) and getElementDimension(thePlayer) == getElementDimension(pdDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 7) and dutyFactions[7] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 7 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_7\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 7) sendGroupMessage(7, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 150, 1) -- Deagle töltény (5x9mm) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 20, 1, 1, 1) -- Gumibot exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs setPeArmor(thePlayer, 100) setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(7, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) setPedArmor(thePlayer, 0) exports.mta_item:RemovePlayerDutyItems(thePlayer) end end end if isElementWithinColShape(thePlayer, msDutyPlace) and getElementDimension(thePlayer) == getElementDimension(msDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, and dutyFactions[8] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 8 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_8\") or 0 if not duty then --outputChatBox(\"#0094ff[Mentőszolgálat]:#ffffff Sikeresen szolgálatba léptél.\", thePlayer, 255, 255, 255, true) exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) else --outputChatBox(\"#0094ff[Mentőszolgálat]:#ffffff Sikeresen kiléptél a szolgálatból.\", thePlayer, 255, 255, 255, true) exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end --ITT TALÁLHATÓ AZ EGY ILYEN HIBA: if isElementWithinColShape(thePlayer, sheriffDutyPlace) and getElementDimension(thePlayer) == getElementDimension(sheriffDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 300) and dutyFactions[300] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 300 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_300\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 300) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 20, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 23, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) exports.mta_item:giveItem(thePlayer, 28, 1, 120, 1) exports.mta_item:giveItem(thePlayer, 31, 1, 90, 1) setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) exports.mta_item:RemovePlayerDutyItems(thePlayer) setPedArmor(thePlayer, 0) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, swatDutyPlace) and getElementDimension(thePlayer) == getElementDimension(swatDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 10) and dutyFactions[10] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 10 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_10\") or 96 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 10) sendGroupMessage(10, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) for _, stat in ipairs({ 69 ,78 , 79 }) do setPedStat(thePlayer, stat, 1000) end exports.mta_item:giveItem(thePlayer, 15, 1, 1, 1) -- M4 exports.mta_item:giveItem(thePlayer, 29, 1, 300, 1) -- M4 töltény exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs exports.mta_item:giveItem(thePlayer, 41, 1, 1, 1) -- Pajzs exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 100, 1) -- Deagle töltény setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(10, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) exports.mta_item:RemovePlayerDutyItems(thePlayer) setPedArmor(thePlayer, 0) for _, stat in ipairs({ 69 ,78 , 79 }) do setPedStat(thePlayer, stat, 0) end end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, mechanicDutyPlace) and getElementDimension(thePlayer) == getElementDimension(mechanicDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 11) and dutyFactions[11] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 11 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_11\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 11) sendGroupMessage(11, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(11, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, fbiDutyPlace) and getElementDimension(thePlayer) == getElementDimension(fbiDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 9) and dutyFactions[9] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 9 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_9\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 9) sendGroupMessage(33, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs exports.mta_item:giveItem(thePlayer, 24, 1, 1, 1) -- MP5 exports.mta_item:giveItem(thePlayer, 30, 1, 150, 1) -- MP5 töltény exports.mta_item:giveItem(thePlayer, 17, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 50, 1) -- Deagle töltény exports.mta_item:giveItem(thePlayer, 130, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 131, 1, 1, 1) -- Sokkoló setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) exports.mta_item:RemovePlayerDutyItems(thePlayer) setPedArmor(thePlayer, 0) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, taxDutyPlace) and getElementDimension(thePlayer) == getElementDimension(taxDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 13) and dutyFactions[13] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 13 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_13\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 13) sendGroupMessage(13, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(13, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end if isElementWithinColShape(thePlayer, govDutyPlace) and getElementDimension(thePlayer) == getElementDimension(govDutyPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 29) and dutyFactions[29] then if getElementData(thePlayer, \"char:dutyfaction\") ~= 29 and getElementData(thePlayer, \"char:dutyfaction\") then outputChatBox(\"#dc143c[Hiba]:#ffffff Már máshol szolgálatban vagy.\", thePlayer, 255, 255, 255, true) return end local dutySkin = getElementData(thePlayer, \"char:dutySkin_groupId_29\") or 0 if not duty then exports.mta_notifications:createNotification(thePlayer, \"Szolgálatba léptél.\", 1) setElementData(thePlayer, \"char:duty\", 1) setElementData(thePlayer, \"char:dutyfaction\", 29) sendGroupMessage(29, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" szolgálatba lépett.\") setElementData(thePlayer, \"duty:civilskin\", getElementModel(thePlayer)) setElementModel(thePlayer, dutySkin) setElementFrozen(thePlayer, false) exports.mta_item:giveItem(thePlayer, 27, 1, 1, 1) -- Sokkoló exports.mta_item:giveItem(thePlayer, 42, 1, 1, 1) -- Bilincs exports.mta_item:giveItem(thePlayer, 110, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 20, 1, 1, 1) -- Deagle exports.mta_item:giveItem(thePlayer, 28, 1, 100, 1) -- Deagle töltény setPedArmor(thePlayer, 100) else exports.mta_notifications:createNotification(thePlayer, \"Kiléptél a szolgálatból.\", 1) setElementData(thePlayer, \"char:duty\", false) setElementData(thePlayer, \"char:dutyfaction\", false) sendGroupMessage(29, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kilépett a szolgálatból.\") setElementModel(thePlayer, getElementData(thePlayer, \"duty:civilskin\")) setElementFrozen(thePlayer, false) end setElementData(thePlayer, \"duty:dutys\", true) setTimer(function() setElementData(thePlayer, \"duty:dutys\", false) end, 60000, 1) end end end addCommandHandler(\"duty\", dutyPlayers, false, false) function gyogyit(thePlayer, commandName, targetPlayer) if exports.exg_dashboard:isPlayerInFaction(thePlayer, then if getElementData(thePlayer, \"char:dutyfaction\") ~= 8 then outputChatBox(\"#dc143c[Hiba]:#ffffff Nem vagy szolgálatban.\", thePlayer, 255, 255, 255, true) return end if not (targetPlayer) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) local cost = 50 if thePlayer == targetPlayer then outputChatBox(\"#dc143c[Hiba]:#ffffff Magadat nem tudod meggyógyítani.\", thePlayer, 255, 255, 255, true) return end if distance <= 4 and int == tint and tdim == dim then if (targetPlayer) then setElementHealth(targetPlayer, 100) sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" meggyógyította \" .. targetPlayerName:gsub(\"_\",\" \") .. \" játékost.\") setPedHeadless(targetPlayer, false) toggleAllControls(targetPlayer, true, true, false) toggleControl(targetPlayer, \'forwards\', true) toggleControl(targetPlayer, \'left\', true) toggleControl(targetPlayer, \'right\', true) toggleControl(targetPlayer, \'backwards\', true) toggleControl(targetPlayer, \'enter_passenger\', true) toggleControl(targetPlayer, \'enter_exit\', true) toggleControl(targetPlayer, \'aim_weapon\', true) toggleControl(targetPlayer, \'jump\', true) toggleControl(targetPlayer, \'fire\', true) exports.mta_notifications:createNotification(thePlayer, \"Sikeresen meggyógyítottad a sérültet\", 4) setElementData(targetPlayer, \"char:money\", getElementData(targetPlayer, \"char:money\")-cost) exports[\"exg_dashboard\"]:giveGroupBalance(8, cost) exports.mta_notifications:createNotification(targetPlayer, \"Egy mentős meggyógyított téged.\", 4) exports.mta_chat:sendLocalMeAction(thePlayer, \"meggyógyította \" .. targetPlayerName:gsub(\"_\",\" \") .. \" -t.\") outputChatBox(\"#1E8BC3[Információ]:#ffffff A gyógyítás #7cc576\" .. cost .. \"$#ffffff -ba került.\", targetPlayer, 255, 255, 255, true) end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end addCommandHandler(\"gyogyit\", gyogyit, false, false) local mutetpos = createColSphere(1176.16015625, -1308.5034179688, 13.987363815308, 5) function mutet(thePlayer, commandName, targetPlayer) if exports.exg_dashboard:isPlayerInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then if not (targetPlayer) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) if (targetPlayer) then if isPedInVehicle(targetPlayer) then removePedFromVehicle(targetPlayer) end if isElementWithinColShape(targetPlayer, mutetpos) and isElementWithinColShape(thePlayer, mutetpos) then fadeCamera(targetPlayer, false, 1.5) setElementFrozen(targetPlayer, true) setTimer( function() triggerClientEvent(targetPlayer, \"mutetStart\", targetPlayer, targetPlayer) end, 3500, 1) sendGroupMessage(8, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" műtőbe helyezte \" .. targetPlayerName:gsub(\"_\",\" \") ..\" játékost.\") setTimer( function() fadeCamera(targetPlayer, true, 2.5) end, 3500, 1) end end end end end addCommandHandler(\"mutet\", mutet, false, false) local myMarker = createMarker ( 1183.4505615234, -1317.5316162109, 13.575407028198-0.9, \"cylinder\", 1, 255, 255, 0, 170 ) function checkMedicals(hitplayer, dimension) if isElement(hitplayer) and getElementType(hitplayer) == \"player\" and not isPedInVehicle(hitplayer) then local count = 0 for k, v in ipairs(getElementsByType(\"player\")) do if exports.exg_dashboard:isPlayerInFaction(v, and getElementData(v, \"char:duty\") == 1 then count = count + 1 end end if count <= 1 then triggerClientEvent(hitplayer, \"showHealthPanel\", hitplayer, hitplayer, 1) else outputChatBox(\"#dc143c[Hiba]:#ffffff Jelenleg vannak elérhető mentősök, kérj tőlük segítséget.\", hitplayer, 255, 255, 255, true) end end end addEventHandler( \"onMarkerHit\", myMarker, checkMedicals ) function stopMedicals(hitplayer, dimension) if isElement(hitplayer) and getElementType(hitplayer) == \"player\" then triggerClientEvent(hitplayer, \"showHealthPanel\", hitplayer, hitplayer, 2) end end addEventHandler( \"onMarkerLeave\", myMarker, stopMedicals ) function gyogyitPlayer(player) if isElement(player) then if getElementHealth(player) == 100 then outputChatBox(\"#dc143c[Hiba]:#ffffff Jelenleg nincs sérülésed amit lehetne gyógyítani.\", player, 255, 255, 255, true) return end setElementHealth(player, 100) setPedHeadless(player, false) toggleAllControls(player, true, true, false) toggleControl(player, \'forwards\', true) toggleControl(player, \'left\', true) toggleControl(player, \'right\', true) toggleControl(player, \'backwards\', true) toggleControl(player, \'enter_passenger\', true) toggleControl(player, \'enter_exit\', true) toggleControl(player, \'aim_weapon\', true) toggleControl(player, \'jump\', true) toggleControl(player, \'fire\', true) exports.mta_notifications:createNotification(player, \"Sikeresen meggyógyítottad magad.\", 4) outputChatBox(\"#1E8BC3[Információ]:#ffffff Sikeresen elláttad a sérüléseidet. Az ellátás #7cc576200$#ffffff -ba került.\", player, 255, 255, 255, true) setElementData(player, \"char:money\", getElementData(player, \"char:money\")-200) exports[\"exg_dashboard\"]:giveGroupBalance(8, 100) end end addEvent(\"gyogyitPlayer\", true) addEventHandler(\"gyogyitPlayer\", getRootElement(), gyogyitPlayer) function ticketPlayer(thePlayer, commandName, targetPlayer, cost, ...) if exports.exg_dashboard:isPlayerInFaction(thePlayer, 7) and getElementData(thePlayer, \"char:dutyfaction\") == 7 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 7 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then before = \"#1E8BC3[Számla]:#ffffff\" between = \"számlát\" maxCost = 15000000 factionid = 29 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 9) and getElementData(thePlayer, \"char:dutyfaction\") == 9 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 29 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 10) and getElementData(thePlayer, \"char:dutyfaction\") == 10 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 10 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 33) and getElementData(thePlayer, \"char:dutyfaction\") == 33 then before = \"#1E8BC3[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 50000000 factionid = 29 elseif exports.exg_dashboard:isPlayerInFaction(thePlayer, 29) and getElementData(thePlayer, \"char:dutyfaction\") == 29 then before = \"#ffcc00[Büntetés]:#ffffff\" between = \"büntetést\" maxCost = 5000000 factionid = 29 else factionid = true before = true between = true maxCost = true end if (factionid) then if not (targetPlayer) or not (cost) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" ..commandName .. \" [Név / ID] [Összeg] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) if targetPlayer == thePlayer then outputChatBox(\"#dc143c[Hiba]:#ffffff Magadat nem tudod ticketelni.\", thePlayer, 255, 255, 255, true) return end local cost = tonumber(cost) local reason = table.concat({...}, \" \") local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if cost <= 0 then outputChatBox(\"#dc143c[Hiba]:#ffffff 0-nál nagyobb összeget kellene megadni.\", thePlayer, 255, 255, 255, true) return end if maxCost < cost then outputChatBox(\"#dc143c[Hiba]:#ffffff Az összeg meghaladja a maximális keretet. (\" .. maxCost .. \"$)\", thePlayer, 255, 255, 255, true) return end if distance <= 4 and int == tint and dim == tdim then sendGroupMessageWithoutPlayer(thePlayer, factionid, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" kiadott egy \" .. between .. \" \" .. targetPlayerName:gsub(\"_\", \" \") .. \" játékosnak.\") sendGroupMessageWithoutPlayer(thePlayer, factionid, \"Összeg: \" .. cost .. \"$\") sendGroupMessageWithoutPlayer(thePlayer, factionid, \"Indok: \" .. reason) outputChatBox(before .. \" #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff kiadott neked egy \" .. between .. \". Összeg: #7cc576\" .. cost .. \"$\", targetPlayer, 255, 255, 255, true) outputChatBox(before .. \" Indok: #7cc576\" .. reason, targetPlayer, 255, 255, 255, true) exports.exg_dashboard:giveGroupBalance(factionid, cost) setElementData(targetPlayer, \"char:money\", getElementData(targetPlayer, \"char:money\")-cost) outputChatBox(before .. \" Kiadtál egy \" .. between .. \" #7cc576\" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \"#ffffff játékosnak. Összeg: #7cc576\" .. cost .. \"$\", thePlayer, 255, 255, 255, true) outputChatBox(before .. \" Indok: #7cc576\" .. reason, thePlayer, 255, 255, 255, true) else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end addCommandHandler(\"ticket\", ticketPlayer, false, false) function government(thePlayer, commandName, ...) local faction = false local mess = \"felhívás\" if exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 7) and getElementData(thePlayer, \"char:dutyfaction\") == 7 then faction = \"Rendőrség\" color = \"#446CB3\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then faction = \"Mentőszolgálat\" color = \"#F89406\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 9) and getElementData(thePlayer, \"char:dutyfaction\") == 9 then faction = \"NNI\" color = \"#D35400\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 10) and getElementData(thePlayer, \"char:dutyfaction\") == 10 then faction = \"TEK\" color = \"#446CB3\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 33) and getElementData(thePlayer, \"char:dutyfaction\") == 33 then faction = \"FBI\" color = \"#446CB3\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 11) and getElementData(thePlayer, \"char:dutyfaction\") == 11 then faction = \"Szerelőtársaság\" color = \"#00ced1\" mess = \"közlemény\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 13) and getElementData(thePlayer, \"char:dutyfaction\") == 13 then faction = \"Taxitársaság\" color = \"#00ced1\" mess = \"közlemény\" elseif exports[\"exg_dashboard\"]:isPlayerLeaderInFaction(thePlayer, 29) and getElementData(thePlayer, \"char:dutyfaction\") == 29 then faction = \"Önkormányzat\" color = \"#ffcc00\" mess = \"közlemény\" end if (faction) then if not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Üzenet]\", thePlayer, 255, 255, 255, true) else local msg = table.concat({...},\" \") if (msg) then outputChatBox(\" \", root, 255, 255, 255, true) outputChatBox(color .. \"[\" .. faction .. \" \" .. mess .. \"]:#ffffff \" .. msg, root, 255, 255, 255, true) exports.mta_admin:outputAdminMessage(\"#7cc576\" .. getPlayerName(thePlayer) .. \"#ffffff használta a #0094ff/\" .. commandName .. \"#ffffff parancsot.\") triggerClientEvent(root, \"playGovSound\", root) end end end end addCommandHandler(\"gov\", government, false, false) function playerBerak(thePlayer, commandName, targetPlayer) if exports.exg_dashboard:isPlayerInFaction(thePlayer, and getElementData(thePlayer, \"char:dutyfaction\") == 8 then if not (targetPlayer) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if (targetPlayer) then if distance <= 4 and int == tint and dim == tdim then for i, v in ipairs(getElementsByType(\"vehicle\")) do local vx, vy, vz = getElementPosition(v) local vdistance = getDistanceBetweenPoints3D(x, y, z, vx, vy, vz) if vdistance <= 4 then if (v) and getElementModel(v) == 416 then warpPedIntoVehicle(targetPlayer, v, 3) else outputChatBox(\"#dc143c[Hiba]:#ffffff Nincs a közeledben mentő.\", thePlayer, 255, 255, 255, true) end end end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end end addCommandHandler(\"berak\", playerBerak, false, false) function jailPlayer(thePlayer, commandName, targetPlayer, ido, ...) if isElementWithinColShape(thePlayer, pdArrestPlace) and getElementDimension(thePlayer) == getElementDimension(pdArrestPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 7) and getElementData(thePlayer, \"char:dutyfaction\") == 7 then if not (targetPlayer) or not (ido) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID] [Perc] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local ido = tonumber(ido) local reason = table.concat({...}, \" \") local maxTime = 100 local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if distance <= 4 and int == tint and dim == tdim then if maxTime < ido then outputChatBox(\"#dc143c[Hiba]:#ffffff Maximum csak \" .. maxTime .. \" percig tudsz börtönözni.\", thePlayer, 255, 255, 255, true) return end if (targetPlayer) then local cellaN = math.random(1, 4) if cellaN == 1 then mCella = {219.53465270996, 109.86731719971, 999.015625} elseif cellaN == 2 then mCella = {215.24586486816, 110.42152404785, 999.015625} elseif cellaN == 3 then mCella = {223.49760437012, 109.82486724854, 999.015625} elseif cellaN == 4 then mCella = {228.18232727051, 110.42670440674, 999.015625} end if mCella then setElementPosition(targetPlayer, mCella[1], mCella[2], mCella[3]) outputChatBox(\"#1E8BC3[Börtön]:#ffffff #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff őrizetbe vett téged. Időtartam: #7cc576\" .. ido .. \"#ffffff perc.\", targetPlayer, 255, 255, 255, true) outputChatBox(\"#1E8BC3[Börtön]:#ffffff Indok: #7cc576\" .. reason .. \"\", targetPlayer, 255, 255, 255, true) sendGroupMessage(7, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" őrizetbe vette \" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \" játékost. Időtartam: \" .. ido .. \" perc.\") sendGroupMessage(7, \"Indok: \" .. reason) setElementData(targetPlayer, \"jailed\", 1) setElementData(targetPlayer, \"jailed:player\", getPlayerName(thePlayer)) setElementData(targetPlayer, \"jailed:reason\", reason) setElementData(targetPlayer, \"jailed:ido\", ido) setElementData(targetPlayer, \"jailed:idoTelik\", ido) setElementData(targetPlayer, \"jailed:idoLetelt\", 0) local jailTimer = setTimer(idoTelikLe, 60000, ido, targetPlayer) setElementData(targetPlayer, \"jailed:timer\", jailTimer) local sql = dbExec(con, \"UPDATE characters SET jailed = ?, jailed_reason = ?, jailed_idoTelik = ?, jailed_alapIdo = ?, jailed_player = ? WHERE id = \'\" .. getElementData(targetPlayer, \"char:id\") .. \"\'\", 1, reason, ido, ido, getPlayerName(thePlayer)) end end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end if isElementWithinColShape(thePlayer, sheriffArrestPlace) and getElementDimension(thePlayer) == getElementDimension(sheriffArrestPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 9) and getElementData(thePlayer, \"char:dutyfaction\") == 9 then if not (targetPlayer) or not (ido) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID] [Perc] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local ido = tonumber(ido) local reason = table.concat({...}, \" \") local maxTime = 100 local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if distance <= 4 and int == tint and dim == tdim then if maxTime < ido then outputChatBox(\"#dc143c[Hiba]:#ffffff Maximum csak \" .. maxTime .. \" percig tudsz börtönözni.\", thePlayer, 255, 255, 255, true) return end if (targetPlayer) then local cellaN = math.random(1, 4) if cellaN == 1 then mCella = {219.53465270996, 109.86731719971, 999.015625} elseif cellaN == 2 then mCella = {215.24586486816, 110.42152404785, 999.015625} elseif cellaN == 3 then mCella = {223.49760437012, 109.82486724854, 999.015625} elseif cellaN == 4 then mCella = {228.18232727051, 110.42670440674, 999.015625} end if mCella then setElementPosition(targetPlayer, mCella[1], mCella[2], mCella[3]) outputChatBox(\"#1E8BC3[Börtön]:#ffffff #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff őrizetbe vett téged. Időtartam: #7cc576\" .. ido .. \"#ffffff perc.\", targetPlayer, 255, 255, 255, true) outputChatBox(\"#1E8BC3[Börtön]:#ffffff Indok: #7cc576\" .. reason .. \"\", targetPlayer, 255, 255, 255, true) sendGroupMessage(9, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" őrizetbe vette \" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \" játékost. Időtartam: \" .. ido .. \" perc.\") sendGroupMessage(9, \"Indok: \" .. reason) setElementData(targetPlayer, \"jailed\", 1) setElementData(targetPlayer, \"jailed:player\", getPlayerName(thePlayer)) setElementData(targetPlayer, \"jailed:reason\", reason) setElementData(targetPlayer, \"jailed:ido\", ido) setElementData(targetPlayer, \"jailed:idoTelik\", ido) setElementData(targetPlayer, \"jailed:idoLetelt\", 0) local jailTimer = setTimer(idoTelikLe, 60000, ido, targetPlayer) setElementData(targetPlayer, \"jailed:timer\", jailTimer) local sql = dbExec(con, \"UPDATE characters SET jailed = ?, jailed_reason = ?, jailed_idoTelik = ?, jailed_alapIdo = ?, jailed_player = ? WHERE id = \'\" .. getElementData(targetPlayer, \"char:id\") .. \"\'\", 1, reason, ido, ido, getPlayerName(thePlayer)) end end else outputChatBox(\"#dc143c[Hiba]:#ffffff Túl messze vagy a játékostól.\", thePlayer, 255, 255, 255, true) end end end end if isElementWithinColShape(thePlayer, swatArrestPlace) and getElementDimension(thePlayer) == getElementDimension(swatArrestPlace) then if exports.exg_dashboard:isPlayerInFaction(thePlayer, 10) and getElementData(thePlayer, \"char:dutyfaction\") == 10 then if not (targetPlayer) or not (ido) or not (...) then outputChatBox(\"#7cc576Használat:#ffffff /\" .. commandName .. \" [Név / ID] [Perc] [Indok]\", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.mta_main:findPlayer(thePlayer, targetPlayer) local ido = tonumber(ido) local reason = table.concat({...}, \" \") local maxTime = 320 local x, y, z = getElementPosition(thePlayer) local tx, ty, tz = getElementPosition(targetPlayer) local int, dim = getElementInterior(thePlayer), getElementDimension(thePlayer) local tint, tdim = getElementInterior(targetPlayer), getElementDimension(targetPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz) if distance <= 4 and int == tint and dim == tdim then if maxTime < ido then outputChatBox(\"#dc143c[Hiba]:#ffffff Maximum csak \" .. maxTime .. \" percig tudsz börtönözni.\", thePlayer, 255, 255, 255, true) return end if (targetPlayer) then local cellaN = math.random(1, 4) if cellaN == 1 then mCella = {219.53465270996, 109.86731719971, 999.015625} elseif cellaN == 2 then mCella = {215.24586486816, 110.42152404785, 999.015625} elseif cellaN == 3 then mCella = {223.49760437012, 109.82486724854, 999.015625} elseif cellaN == 4 then mCella = {228.18232727051, 110.42670440674, 999.015625} end if mCella then setElementPosition(targetPlayer, mCella[1], mCella[2], mCella[3]) outputChatBox(\"#1E8BC3[Börtön]:#ffffff #7cc576\" .. getPlayerName(thePlayer):gsub(\"_\",\" \") .. \"#ffffff őrizetbe vett téged. Időtartam: #7cc576\" .. ido .. \"#ffffff perc.\", targetPlayer, 255, 255, 255, true) outputChatBox(\"#1E8BC3[Börtön]:#ffffff Indok: #7cc576\" .. reason .. \"\", targetPlayer, 255, 255, 255, true) sendGroupMessage(10, getPlayerName(thePlayer):gsub(\"_\",\" \") .. \" őrizetbe vette \" .. getPlayerName(targetPlayer):gsub(\"_\",\" \") .. \" játékost. Időtartam: \" .. ido .. \" perc.\") sendGroupMessage(10, \"Indok: \" .. reason) setElementD
Oldalak: [1]
|