Jump to content

Search the Community

Showing results for tags 'mute'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 4 results

  1. Advanced mute system by ozy * THIS SCRIPT HAS FEATURES FOR - Mute a player for minutes or hours without using milliseconds - All data is saving to database - Press "O" to reach mute panel for better usage (only opens for players who has 'command.mute' right) - You want to mute a guy but oh shoot! he is gone before you muted him. Dont worry if you have his serial you can mute him by his serial via 'Mute Serial' on mute panel. - You can see the muted players and their remaining time, account name, serial, muted date, reason and admin name - You can mute a player on mute panel * COMMANDS - To mute a player: /amute player 1m (for 1 min or use 1h instead for 1 hours) reason - To unmute a player: /aunmute player - To see your remaining mute time if you are muted: /muteinfo * INSTALLATION - This script using dgs so you also need to download dgs and drop it into your resources folder. Download dgs here: https://wiki.multitheftauto.com/wiki/Resource:DGS - Extract files (dgs & advanced_mute_system) into your resources folder and start advanced_mute_system, system is working with dgs so don't forget to start dgs. Enjoy! - Don't forget to give admin rights to script. (Go to admin panel > resources > manage acl > on groups: double click on Admin and click Add Object enter 'resource.advanced_mute_system' press Ok and that's it) * BUGS - I test it as much as i can and look for bugs but I couldn't test it with players so there might be some bugs. - If there is any bugs please contact me via discord: papazlloyd or send an email to my forum account Download script here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18896
  2. Guest

    mute problem

    local serialMute = { } function doAction(thePlayer, cmd, actionId, playername, arg3) if getElementData(thePlayer, "player.key") == "Warlock" or getElementData(thePlayer, "player.key") == "Wind:Oer" or getElementData(thePlayer, "player.key") == "Ivan" or getElementData(thePlayer, "player.key") == "Scorpio1" or getElementData(thePlayer, "player.key") == "vievsonic" then if actionId then local actionId = tonumber(actionId) local player = getPlayerFromNamePart(playername or "") local name = getPlayerName(thePlayer) if player then if actionId == 1 then local duration = (tonumber(arg3) or 0) * 60 * 1000 setPlayerMuted(player, true) outputChatBox(getPlayerName(player).." #005A0Ehas been muted by #FFFFFF"..name.."#005A0E.#FFFFFF Reason: insulting #005A0EDuration #FFFFFF["..math.floor((duration *1.66666667 * 1/100000)).." mins].", root, 255, 255, 255, true) local timer = setTimer ( unmute, duration, 1, player ) serialMute [ getPlayerSerial ( player ) ] = { duration, timer }) end else outputChatBox("Could not find the player.",thePlayer, 255, 0, 0) end end end end addCommandHandler("action", doAction) function unmutePlayer(player,command,victimName) if victimName then local victim = getPlayerFromNamePart(victimName or "") if victim then if ( isPlayerMuted(victim) ) then setPlayerMuted(victim, false) end end end end addCommandHandler("unmute",unmutePlayer) function onJoin () local serial = getPlayerSerial(source) local muted = serialMute [ serial ] if ( type ( muted ) == "table" ) then if ( muted [ 1 ] ) then setPlayerMuted ( source, true ) local timer = setTimer ( unmute, muted [ 1 ], 1, source ) serialMute [ serial ] [ 2 ] = timer return end end setPlayerMuted ( source, false ) end addEventHandler ( "onPlayerJoin", getRootElement(), onJoin ) addEventHandler ( "onPlayerQuit", root, function ( ) local serial = getPlayerSerial ( source ) local muted = serialMute [ serial ] if ( type ( muted ) == "table" ) then if isTimer ( muted [ 2 ] ) then local timeLeft = getTimerDetails ( muted [ 2 ] ) killTimer ( muted [ 2 ] ) serialMute [ serial ] [ 1 ] = timeLeft end end end ) function unmute ( thePlayer ) if isElement ( thePlayer ) then setPlayerMuted ( thePlayer, false ) serialMute [ getPlayerSerial ( thePlayer ) ] = nil outputChatBox ( "You have been unmuted by Console.", thePlayer, 0, 255, 100 ) end end function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end When i do /action [mute id ] [Player name] [Time] nothing happens
  3. How to get mute remaining time? For example i write /getmute, and then output "Mute remaining time: 5 mins", or "You are not muted". Sorry for my bad english.
  4. function mutePlayer(button) if button == "left" then if (source == playerTab.button[2]) then player = guiGridListGetSelectedItemText(GUIEditor.gridlist[1]) time = guiGetText(playerTab.combobox[1]) reason = guiGetText(playerTab.edit[1]) thePlayer = getPlayerFromName(player) if (time == "10 mins") then setElementData(thePlayer, "isPlayerMuted", true) setTimer(setElementData, 1000, 1, getPlayerFromName(player), false) outputChatBox("(Admin) " .. player .. " has been muted for 10 minutes by " .. getPlayerName(localPlayer) .. " for " .. reason) end guiSetVisible(playerTab.window[1], false) guiSetVisible(GUIEditor.window[1], true) end end end addEventHandler("onClientGUIClick", resourceRoot, mutePlayer) Debug Error says: Bad argument @ 'setElementData' [Expected string at argument 2, got boolean on this line: setTimer(setElementData, 1000, 1, getPlayerFromName(player), false)
×
×
  • Create New...