-----------------------------------[FREEZE]----------------------------------
function freezePlayer(thePlayer, commandName, target)
if getElementData( thePlayer, \"adminlevel\" ) >= 2 then
if not (target) then
outputChatBox(\"#ffffff[#7CC576WLS #ffffff- #FFA700Használat#ffffff]: /\" .. commandName .. \" [NévRészlet]\", thePlayer, 255, 0, 0,true)
else
local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target)
if targetPlayer then
local veh = getPedOccupiedVehicle( targetPlayer )
local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
local username = getPlayerName(thePlayer)
if (veh) then
setElementFrozen(veh, true)
toggleAllControls(targetPlayer, false, true, false)
outputChatBox(\" Fagyasztva lettél egy Admin által. Kövesd az általa adott instrukciókat!\", targetPlayer)
outputChatBox(\" Lefagyasztottad \" ..targetPlayerName.. \"-t.\", thePlayer)
else
toggleAllControls(targetPlayer, false, true, false)
setPedWeaponSlot(targetPlayer, 0)
exports[\'anticheat-system\']:changeProtectedElementDataEx(targetPlayer, \"freeze\", 1)
outputChatBox(\"#32b3ef\" .. username .. \"#ffffffLefagyasztott.\", targetPlayer, 255, 0, 0,true)
outputChatBox(\"#7cc576[bestMTA]#ffffffLefagyasztottad #32b3ef\" ..targetPlayerName.. \"-t.\", thePlayer, 255, 0, 0,true)
end
local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
local username = getPlayerName(thePlayer)
exports.global:sendMessageToAdmins(\"#ffffff[#32b3efAdmin Napló#ffffff]: #7cc576\" .. username .. \"#ffffff lefagyasztotta #7cc576\" .. targetPlayerName .. \"-t.\",124,197,118)
end
end
end
end
addCommandHandler(\"freeze\", freezePlayer, false, false)
function setPlayerSkinCmd(thePlayer, commandName, targetPlayer, skinID)
if getElementData( thePlayer, \"adminlevel\" ) >= 2 then
if not (skinID) or not (targetPlayer) then
outputChatBox(\"#ffffff[#7CC576WLS #ffffff- #FFA700Használat#ffffff]: /\" .. commandName .. \" [iD / NévRészlet] [skin ID]\", thePlayer, 255, 0, 0,true)
else
local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer)
if targetPlayer then
local logged = getElementData(targetPlayer, \"loggedin\")
if (logged==0) then
outputChatBox(\"#7cc576[bestMTA]#ffffffA játékos nincs bejelentkezve.\", thePlayer, 255, 0, 0,true)
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(\"#7cc576[bestMTA]#ffffffHelytelen skin ID.\", thePlayer, 255, 0, 0,true)
else
outputChatBox(\"#7cc576[bestMTA]#ffffff#7CC576\" .. targetPlayerName .. \" #ffffffkinézete megváltoztatva erre: #FFA700\" .. skinID .. \"#ffffff.\", thePlayer, 255, 0, 0,true)
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(\"#7cc576[bestMTA]#ffffffHelytelen skin ID.\", thePlayer, 255, 0, 0,true)
end
end
end
end
end
addCommandHandler(\"setskin\", setPlayerSkinCmd, false, false)