Jump to content

Problem in Ban , Mute


ZeyadGTX

Recommended Posts

I have this resource for Ban,Mute And Show reason but i have problem

I use /action 1 Name Minutes

I see Player Has been muted Time Reason : !!!

But when he press T He can talk and Ban too

I used Debug script 3 i see SetPlayerMuted Problem can some one fix this

This is the Script :

local serialMute = { }

function doAction(thePlayer, cmd, actionId, playername, arg3, arg4)

if actionId then

local actionId = tonumber(actionId) --forgot this line

local player = getPlayerFromName(playername or "")

--local player = getPlayerFromNamePart ( player )

if player then

if actionId == 1 then

local duration = (tonumber(arg3) or 0) * 60

local reason = ""

banPlayer(player, true, true, true, thePlayer, reason, duration)

outputChatBox(getPlayerName(player).." #FF0000has been banned. #FFFFFF [RULE #1:Reputation hated(ban)]", root, 255, 255, 255, true)

elseif actionId == 2 then

local duration = (tonumber(arg3) or 0) * 60 * 1000

setPlayerMuted(player, true)

outputChatBox(getPlayerName(player).." #FF0000has been muted for "..tostring(arg3).." mins. #FFFFFF [RULE #2:Advertising (mute)]", root, 255, 255, 255, true)

local timer = setTimer ( unmute, duration, 1, player )

serialMute [ getPlayerSerial ( player ) ] = { duration, timer }

elseif actionId == 3 then

local duration = (tonumber(arg3) or 0) * 60

local reason = ""

banPlayer(player, true, true, true, thePlayer, reason, duration)

outputChatBox(getPlayerName(player).." #FF0000has been banned. #FFFFFF [RULE #3:Hacking/Abusing(ban)]", root, 255, 255, 255, true)

else

outputChatBox("Wrong Action id.",thePlayer, 255, 0, 0)

end

else

outputChatBox("Could not find the player.",thePlayer, 255, 0, 0)

end

else

outputChatBox("SYNTAX: /action [id] [victim] [duration]",thePlayer, 255, 0, 0)

end

end

addCommandHandler("action", doAction)

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.", 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

Link to comment
its not taked or stoled

Please.Don't lie.

You've stoled it from Server named Grafuroam.

I don't think that's the case, if I'm correct, he took it from this topic: viewtopic.php?f=91&t=71604

Nope.

he has even same rule text in his script as it is in grafuroam.

he stole lots of scripts from grafuroam,and its grafu's fault but still he cannot(spider) post leaked scripts on this forum as its breaking a rule i think.

check spider's server thread(s) which got locked.they got locked because of fighting if i remember correctly,and it's because he stole the scripts.

Link to comment
Why me there are 3 Cloned Servers OMG Spider-Roam , Zied-Roam , Asseria-Roam

See.You stole client files from Grafuroam,and then they stole your stolen scripts cause it wasnt protected at all.

all you 3 got stoled scripts,we can't do anything about it,but you cant post leaked scripts on this forum.

Link to comment
-_- i didnot Stole I made like it

So,

you are saying that you've "made" this script?

this leaked script is more complicated to make than solving your problem with leaked script.You cannot fix it by yourself,because you didn't make this script.It was originally made by Grafu, the owner of Grafuroam.

Please stop lying,and can some moderator lock this topic and remove the code from spider's post?

Link to comment

if actionId == 1 then

local duration = (tonumber(arg3) or 0) * 60

local reason = ""

banPlayer(player, true, true, true, thePlayer, reason, duration)

outputChatBox(getPlayerName(player).." #FF0000has been banned. #FFFFFF [RULE #1:Reputation hated(ban)]", root, 255, 255, 255, true)

elseif actionId == 2 then

This is not leaked. Some guy tried recreating the script :P My scripts look sexier :BIG:

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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