Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function localOOC(thePlayer, commandName, ...)
- if exports['freecam-tv']:isPlayerFreecamEnabled(thePlayer) then return end
- local logged = getElementData(thePlayer, "loggedin")
- local dimension = getElementDimension(thePlayer)
- local interior = getElementInterior(thePlayer)
- local adminTitle = exports.global:getPlayerAdminTitle(thePlayer)
- if (logged==1) and not (isPedDead(thePlayer)) then
- local muted = getElementData(thePlayer, "muted")
- if not (...) then
- outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14)
- elseif (muted==1) then
- outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0)
- elseif exports.integration:isPlayerHeadAdmin(thePlayer) and getElementData(thePlayer, "duty_admin") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 then
- local message = table.concat({...}, " ")
- local result, affectedElements = exports.global:sendLocalText(thePlayer, "".. adminTitle .." " ..getPlayerName(thePlayer) .. ": (( " .. message .. " ))", 0, 204, 255)
- elseif exports.integration:isPlayerLeadAdmin(thePlayer) and getElementData(thePlayer, "duty_admin") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 then
- local message = table.concat({...}, " ")
- local result, affectedElements = exports.global:sendLocalText(thePlayer, "".. adminTitle .." " ..getPlayerName(thePlayer) .. ": (( " .. message .. " ))", 214, 51, 51)
- elseif exports.integration:isPlayerSeniorAdmin(thePlayer) and getElementData(thePlayer, "duty_admin") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 then
- local message = table.concat({...}, " ")
- local result, affectedElements = exports.global:sendLocalText(thePlayer, "".. adminTitle .." " ..getPlayerName(thePlayer) .. ": (( " .. message .. " ))", 255, 255, 0)
- elseif exports.integration:isPlayerAdmin(thePlayer) and getElementData(thePlayer, "duty_admin") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 then
- local message = table.concat({...}, " ")
- local result, affectedElements = exports.global:sendLocalText(thePlayer, "".. adminTitle .." " ..getPlayerName(thePlayer) .. ": (( " .. message .. " ))", 255, 194, 14)
- elseif exports.integration:isPlayerTrialAdmin(thePlayer) and getElementData(thePlayer, "duty_admin") == 1 and getElementData(thePlayer, "hiddenadmin") == 0 then
- local message = table.concat({...}, " ")
- local result, affectedElements = exports.global:sendLocalText(thePlayer, "".. adminTitle .." " ..getPlayerName(thePlayer) .. ": (( " .. message .. " ))", 255, 153, 0)
- else
- local message = table.concat({...}, " ")
- local result, affectedElements = exports.global:sendLocalText(thePlayer, getPlayerName(thePlayer) .. ": (( " .. message .. " ))", 196, 255, 255)
- end
- end
- end
- addCommandHandler("b", localOOC, false, false)
- addCommandHandler("LocalOOC", localOOC)
Advertisement
Add Comment
Please, Sign In to add comment