Jump to content

Recommended Posts

@stPatrick tudsz segíteni ebbe a script-be?

 

function globalMessage(thePlayer, cmd, ...)
    local message = table.concat ( { ... }, " " )
    local name = getPlayerName(thePlayer)
    outputChatBox("#ed1c24[Tulajdonos]#ed1c24 "..name..": #ed1c24"..message, players, 255, 255, 255, true)
end
addCommandHandler("asay", globalMessage)

function permission (source)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Staff")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Tulajdonos")) then
triggerClientEvent(source, "openAdmin", getRootElement())
end
end
addCommandHandler("openAdmin", permission)

 

azt szeretném ha elküldené a global messages-t akkor hangot adjon ki a hangom megvan, csak hogy rakjam be?

Link to comment
  • Moderators
-- CLIENT SIDE
-- Ezt client oldalra másold be valahova

addEvent("playAsaySound", true)
addEventHandler("playAsaySound", root, function()
    playSound("valami.mp3") -- ide a fájlod elérsi útvonalát
end)
-- SERVER SIDE
-- Ezzel tudod meghívni server oldalról

triggerClientEvent("playAsaySound", resourceRoot)
-- SERVER SIDE
-- VALAHOGY íGY

function globalMessage(thePlayer, cmd, ...)
    local message = table.concat ( { ... }, " " )
    local name = getPlayerName(thePlayer)
    outputChatBox("#ed1c24[Tulajdonos]#ed1c24 "..name..": #ed1c24"..message, players, 255, 255, 255, true)
    triggerClientEvent("playAsaySound", resourceRoot)
end
addCommandHandler("asay", globalMessage)

 

  • Thanks 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...