Evil-Cod3r Posted February 21, 2012 Posted February 21, 2012 Hi All i have Made this i want if i spam in the NormalChat Only 3 times give me wirnning 3 times after that give Kick with Msg and can i add sesting in meta.xml ? for example < sesting = "true" = give him kick sesting = "false" = give him mute Only ? Help please local timer = { } function flood (msg, msgType) elseif timer = {3} then if ( hasObjectPermissionTo ( getThisResource (), "function.kickPlayer", true ) ) then if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 1/0",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 2/2",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 3/3",source,255,255,0) outputChatBox(getPlayerName(source) .."Has Been Kicked For Flooding the Chat 3/3",255,0,255) kickPlayer ( source, "You Have Been Kicked For Flooding The Chat !") end My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Kenix Posted February 21, 2012 Posted February 21, 2012 Please read all comments. local timer = { } function flood (msg, msgType) -- where is source ? or maybe you use event?If you use event then you not needed add source to argument function. elseif timer = {3} then -- this is syntax error. Delete this row. if ( hasObjectPermissionTo ( getThisResource (), "function.kickPlayer", true ) ) then if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then -- accountname is nil outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 1/0",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 2/2",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 3/3",source,255,255,0) outputChatBox(getPlayerName(source) .."Has Been Kicked For Flooding the Chat 3/3",255,0,255) kickPlayer ( source, "You Have Been Kicked For Flooding The Chat !") end -- missing end Updated. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Evil-Cod3r Posted February 21, 2012 Author Posted February 21, 2012 You Mean Like this ? local timer = { } local yes = true function flood (msg, msgType) if yes then --- if yes = give him Kick else = mute only for 15 sec .. who to do that ? if ( hasObjectPermissionTo ( getThisResource (), "function.kickPlayer", true ) ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "BigAdmin" ) ) then else outputChatBox("You Have To Be Big Admin To Run This Script !!!",source, 255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 1/0",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 2/2",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 3/3",source,255,255,0) outputChatBox(getPlayerName(source) .."Has Been Kicked For Flooding the Chat 3/3",255,0,255) kickPlayer ( source, "You Have Been Kicked For Flooding The Chat !") end end My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Evil-Cod3r Posted February 21, 2012 Author Posted February 21, 2012 and can i add sesting in the meta.xml like true = kick himg false = dont kick just mute for 15 sec .. My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
drk Posted February 21, 2012 Posted February 21, 2012 local setting = get("kick") function flood(msg,msgType) if setting == true then outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 1/0",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 2/2",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 3/3",source,255,255,0) outputChatBox(getPlayerName(source) .."Has Been Kicked For Flooding the Chat 3/3",255,0,255) kickPlayer ( source, "You Have Been Kicked For Flooding The Chat !") else setPlayerMuted(source,true) setTimer(setPlayerMuted,15000,1,source,false) end end Like this? Or like this: function flood(msg,msgType) local setting = get("kick") if setting == true then setTimer ( outputChatBox, 1500, 1, "Don't repeat again or you will be kicked! - First time" ) setTimer ( outputChatBox, 3000, 1, "Don't repeat again or you will be kicked! - Second time" ) setTimer ( outputChatBox, 5000, 1, "Don't repeat again or you will be kicked! - Third time" ) outputChatBox(getPlayerName(source).." has been kicked for flooding chat!",root,255,0,255,false) kickPlayer(source,"You have been kicked for flooding!") else setPlayerMuted(source,true) setTimer( function() setPlayerMuted(source,false) outputChatBox("You have been unmuted!",source,0,255,0,false) end, 15000,1) end end You have to integrate this in your code. EPT Team Server Development: 0% Learning C++ | C++ is amazing
Scooby Posted February 21, 2012 Posted February 21, 2012 clearly that will give all the warnings in one go and is nothing like what hes after.. he asked for: after 3 lines of spam to give a warning 1/3 + msg , then warning 2/3 + msg and finally warning 3/3 + msg + kick the script posted is nothing like what he needs, its more like a function with a load of outputchatbox lines sorry i dont have time right now to help tho [UVA]Scooby Founder Of UVA - Ultimate Vice Assassins http://www.uvaclan.com/
drk Posted February 21, 2012 Posted February 21, 2012 You have to integrate this in your code. You don't understand this? It's only a example. EPT Team Server Development: 0% Learning C++ | C++ is amazing
Evil-Cod3r Posted February 21, 2012 Author Posted February 21, 2012 Yes i Mean Like Scooby Say My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
codeluaeveryday Posted February 21, 2012 Posted February 21, 2012 Settings registry is my area . Get returns a string, not a Boolean. I hope you have added your spam count. Assuming your using onPlayerChat. function flood (msg, msgType) if ( hasObjectPermissionTo ( getThisResource (), "function.kickPlayer", true ) ) and ( hasObjectPermissionTo ( getThisResource (), "function.setPlayerMuted", true ) ) then if not isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "admin" ) ) then -- doesnt kick admin for spamming. if get("kick") == "true" then outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 1/0",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 2/2",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Kicked. 3/3",source,255,255,0) outputChatBox(getPlayerName(source) .." Has Been Kicked For Flooding the Chat 3/3",255,0,255) kickPlayer ( source, "You Have Been Kicked For Flooding The Chat !") elseif get("kick") == "false" then outputChatBox("Please Dont Repate more then 3 Times or You Well Be Muted. 1/0",source,255,255,0) outputChatBox("Please Dont Repate more then 3 Times or You Well Be Muted. 2/2",source,255,255,0) outputChatBox("Please Dont Repate more t hen 3 Times or You Well Be Muted. 3/3",source,255,255,0) outputChatBox(getPlayerName(source) .."Has Been Muted For Flooding the Chat 3/3",255,0,255) setPlayerMuted(source,"You Have Been Kicked For Flooding The Chat!") end end end end Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
Evil-Cod3r Posted February 21, 2012 Author Posted February 21, 2012 i dont get what you say the kick msg mute player? My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Kenix Posted February 21, 2012 Posted February 21, 2012 Better create table in index use player element. So add ( spam count ) to table +1 and etc. This very easy check. Tables is very good for all http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
codeluaeveryday Posted February 21, 2012 Posted February 21, 2012 i dont get what you saythe kick msg mute player? If kick = true it will kick the player. Assuming you added the spam counter. Do you want me to make a full version of anti flood? Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
Scooby Posted February 21, 2012 Posted February 21, 2012 I know this isnt exactly what youve asked for evil, but this is close, i used it on my server for a long time and it seemed to work pretty well for me. give it a try and see what u think. dont forget to give rights for the script to kick/mute in the acl. (im sure u wouldnt but ) local spam = {} local setting = get("kick") -- true = kick, false = mute function loseSpam(player) if spam[player] > 0 then spam[player] = spam[player] - 1 end end function onChat ( message, messageType ) --if messageType == 0 then -- this will work for all chat, remove the -- to change to just normal chat. spam[source] = spam[source] or 0 spam[source] = spam[source] + 1 if spam[source] == 3 then outputChatBox("Warning - Do Not Spam! ",source,255,0,0) else if spam[source] > 3 then if setting then outputChatBox("Kicking " .. getPlayerName(source) .. " For Flooding The Chat!",getRootElement(),255,0,0) kickPlayer(source,"You Have Been Kicked For Flooding!") else setPlayerMuted(source,true) outputChatBox(getPlayerName(source) .. " Has Been Auto Muted [3 mins]",getRootElement(),255,0,0) setTimer(setPlayerMuted,180000,1,source,false) end end end setTimer(loseSpam,2000,1,source) --end end addEventHandler ( "onPlayerChat", getRootElement(), onChat) function quitPlayer() spam[source] = nil end addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer ) [UVA]Scooby Founder Of UVA - Ultimate Vice Assassins http://www.uvaclan.com/
Evil-Cod3r Posted February 22, 2012 Author Posted February 22, 2012 You Mean Like This local spam = {} local setting = get("kick") function loseSpam(player) if spam[player] > 0 then spam[player] = spam[player] - 1 end end function onChat ( message, messageType ) spam[source] = spam[source] or 0 spam[source] = spam[source] + 1 if spam[source] == 3 then outputChatBox("Warning - Do Not Spam! ",source,255,0,0) else if spam[source] > 3 then if setting then outputChatBox("Kicking " .. getPlayerName(source) .. " For Flooding The Chat!",getRootElement(),255,0,0) kickPlayer(source,"You Have Been Kicked For Flooding!") else setPlayerMuted(source,true) outputChatBox(getPlayerName(source) .. " Has Been Auto Muted [20 sec]",getRootElement(),255,0,0) setTimer(setPlayerMuted,20000,1,source,false) end end end setTimer(loseSpam,2000,1,source) end addEventHandler ( "onPlayerChat", getRootElement(), onChat) function quitPlayer() spam[source] = nil end addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer ) meta.xml type="script" name="Anti-Flood" author="Evil-Cod3r" description="" version="1.0" /> My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
codeluaeveryday Posted February 22, 2012 Posted February 22, 2012 Ive told you once... Get returns a STRING, NOT A BOOLEAN! This is incorrect... if setting then outputChatBox("Kicking " .. getPlayerName(source) .. " For Flooding The Chat!",getRootElement(),255,0,0) kickPlayer(source,"You Have Been Kicked For Flooding!") else setPlayerMuted(source,true) outputChatBox(getPlayerName(source) .. " Has Been Auto Muted [20 sec]",getRootElement(),255,0,0) setTimer(setPlayerMuted,20000,1,source,false) end "setting" is returning a string ("true" or false). It is not returning a Boolean value (true or false) if setting == "true" then outputChatBox("Kicking " .. getPlayerName(source) .. " For Flooding The Chat!",getRootElement(),255,0,0) kickPlayer(source,"You Have Been Kicked For Flooding!") elseif setting == "false" setPlayerMuted(source,true) outputChatBox(getPlayerName(source) .. " Has Been Auto Muted [20 sec]",getRootElement(),255,0,0) setTimer(setPlayerMuted,20000,1,source,false) end Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
Evil-Cod3r Posted February 22, 2012 Author Posted February 22, 2012 its say server.lua:21 expected near then local spam = {} local setting = get("kick") function loseSpam(player) if spam[player] > 0 then spam[player] = spam[player] - 1 end end function onChat ( message, messageType ) spam[source] = spam[source] or 0 spam[source] = spam[source] + 1 if spam[source] == 3 then outputChatBox("Warning - Do Not Spam! ",source,255,0,0) else if spam[source] > 3 then if setting == "true" then outputChatBox("Kicking " .. getPlayerName(source) .. " For Flooding The Chat!",getRootElement(),255,0,0) kickPlayer(source,"You Have Been Kicked For Flooding!") elseif setting == "false" setPlayerMuted(source,true) outputChatBox(getPlayerName(source) .. " Has Been Auto Muted [20 sec]",getRootElement(),255,0,0) setTimer(setPlayerMuted,20000,1,source,false) end addEventHandler ( "onPlayerChat", getRootElement(), onChat) function quitPlayer() spam[source] = nil end addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer ) My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
drk Posted February 22, 2012 Posted February 22, 2012 (edited) local spam = {} local setting = get("kick") function loseSpam(player) if spam[player] > 0 then spam[player] = spam[player] - 1 end end function onChat ( message, messageType ) spam[source] = spam[source] or 0 spam[source] = spam[source] + 1 if spam[source] == 3 then outputChatBox("Warning - Do Not Spam! ",source,255,0,0) elseif spam[source] > 3 and setting == "true" then outputChatBox("Kicking " .. getPlayerName(source) .. " For Flooding The Chat!",getRootElement(),255,0,0) kickPlayer(source,"You Have Been Kicked For Flooding!") elseif spam[source] > 3 and setting == "false" then setPlayerMuted(source,true) outputChatBox(getPlayerName(source) .. " Has Been Auto Muted [20 sec]",getRootElement(),255,0,0) setTimer(setPlayerMuted,20000,1,source,false) end end addEventHandler ( "onPlayerChat", getRootElement(), onChat) function quitPlayer() spam[source] = nil end addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer ) Tested. Edited February 22, 2012 by Guest EPT Team Server Development: 0% Learning C++ | C++ is amazing
Kenix Posted February 22, 2012 Posted February 22, 2012 local spam = { } local uTimers = { } local setting = get( "kick" ) function onChat ( message, messageType ) spam[ source ] = tonumber( spam[ source ] or 0 ) + 1 if spam[ source ] == 1 then outputChatBox( "Warning - Do Not Spam! ",source,255,0,0 ) elseif spam[ source ] > 3 then if setting == "true" then outputChatBox( "Kicking " .. getPlayerName(source) .. " For Flooding The Chat!",root,255,0,0 ) kickPlayer( source,"You Have Been Kicked For Flooding!" ) elseif setting == "false" then setPlayerMuted( source,true ) outputChatBox( getPlayerName(source) .. " Has Been Auto Muted [20 sec]",root,255,0,0 ) if isTimer( uTimers[ source ] ) then killTimer( uTimers[ source ] ) end uTimers[ source ] = setTimer( setPlayerMuted,20000,1,source,false ) end end end addEventHandler ( "onPlayerChat", root, onChat) function quitPlayer( ) spam[ source ] = nil uTimers[ source ] = nil end addEventHandler ( "onPlayerQuit", root, quitPlayer ) Updated. its say server.lua:21 expected near then You can not fix yourself? http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Evil-Cod3r Posted February 22, 2012 Author Posted February 22, 2012 i got problem outputChatBox The Name of author and if i get unmute outputChatBox("You Have Been Unmuted!) dont show local spam = { } local uTimers = { } local setting = get( "kick" ) function onChat ( message, messageType ) spam[ source ] = tonumber( spam[ source ] or 0 ) + 1 if spam[ source ] == 3 then outputChatBox( "Warning - Do Not Spam! ",source,255,0,0 ) elseif spam[ source ] > 5 then if setting == "true" then outputChatBox( "Kicking " .. getPlayerName(source) .. " For Flooding The Chat! 5 Times !",root,255,0,0 ) kickPlayer( source,"You Have Been Kicked For Flooding! 5/5" ) elseif setting == "false" then setPlayerMuted( source,true ) outputChatBox( getPlayerName(source) .. " Has Been Auto Muted [20 sec]",root,255,0,0 ) if isTimer( uTimers[ source ] ) then killTimer( uTimers[ source ] ) end else uTimers[ source ] = setTimer( setPlayerMuted,20000,1,source,false ) outputChatBox( "You Have Been unMuted Dont Try Spam! ",source,255,255,0 ) end end end addEventHandler ( "onPlayerChat", root, onChat) function quitPlayer( ) spam[ source ] = nil uTimers[ source ] = nil end addEventHandler ( "onPlayerQuit", root, quitPlayer ) function active2 () addEvent( "onStart", true ) addEventHandler( "onStart", getRootElement(), active2) outputChatBox(".:[ Anti Flood | #FFFF1ABy E ]:.",0,255,0,true) end function active () triggerServerEvent ( "onStart", getLocalPlayer() ) end addEventHandler ( "onResourceStart", getRootElement(), active) My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
TAPL Posted February 22, 2012 Posted February 22, 2012 local spam = { } local uTimers = { } local setting = get( "kick" ) function onChat ( message, messageType ) spam[ source ] = tonumber( spam[ source ] or 0 ) + 1 if spam[ source ] == 3 then outputChatBox( "Warning - Do Not Spam! ",source,255,0,0 ) elseif spam[ source ] > 5 then if setting == "true" then outputChatBox( "Kicking " .. getPlayerName(source) .. " For Flooding The Chat! 5 Times !",root,255,0,0 ) kickPlayer( source,"You Have Been Kicked For Flooding! 5/5" ) elseif setting == "false" then setPlayerMuted( source,true ) outputChatBox( getPlayerName(source) .. " Has Been Auto Muted [20 sec]",root,255,0,0 ) if isTimer( uTimers[ source ] ) then killTimer( uTimers[ source ] ) end uTimers[ source ] = setTimer(setPlayerMuted,20000,1,source,false ) setTimer(outputChatBox,20000,1,"You Have Been unMuted Dont Try Spam!",source,255,255,0) end end end addEventHandler ( "onPlayerChat", root, onChat) function quitPlayer( ) spam[ source ] = nil uTimers[ source ] = nil end addEventHandler ( "onPlayerQuit", root, quitPlayer ) function active() outputChatBox(".:[ Anti Flood | #FFFF1ABy E ]:.",root,0,255,0,true) end addEventHandler("onResourceStart", resourceRoot, active)
Kenix Posted February 22, 2012 Posted February 22, 2012 local spam = { } local uTimers = { } local setting = get( "kick" ) function onChat ( message, messageType ) spam[ source ] = tonumber( spam[ source ] or 0 ) + 1 if spam[ source ] == 3 then outputChatBox( "Warning - Do Not Spam! ",source,255,0,0 ) elseif spam[ source ] > 5 then if setting == "true" then outputChatBox( "Kicking " .. getPlayerName( source ) .. " For Flooding The Chat! 5 Times !",root,255,0,0 ) kickPlayer( source,"You Have Been Kicked For Flooding! 5/5" ) elseif setting == "false" then setPlayerMuted( source,true ) outputChatBox( getPlayerName( source ) .. " Has Been Auto Muted [20 sec]",root,255,0,0 ) if isTimer( uTimers[ source ] ) then killTimer( uTimers[ source ] ) end uTimers[ source ] = setTimer( function( player ) setPlayerMuted( player,false ) outputChatBox( "You Have Been unMuted Dont Try Spam!",player,255,255,0 ) end, 20000, 1,source ) end end end addEventHandler ( "onPlayerChat", root, onChat ) function quitPlayer( ) spam[ source ] = nil uTimers[ source ] = nil end addEventHandler ( "onPlayerQuit", root, quitPlayer ) function active( ) outputChatBox( ".:[ Anti Flood | #FFFF1ABy E ]:.",root,0,255,0,true ) end addEventHandler( "onResourceStart", resourceRoot, active ) http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Scooby Posted February 22, 2012 Posted February 22, 2012 u all removed a function so this wont even work now.... well done. [UVA]Scooby Founder Of UVA - Ultimate Vice Assassins http://www.uvaclan.com/
Evil-Cod3r Posted February 23, 2012 Author Posted February 23, 2012 now i got 1 problem when i got unmuted i write 1 time in chat he give me mute 20 sec ?? My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
codeluaeveryday Posted February 23, 2012 Posted February 23, 2012 You needed to reset the counter. local spam = { } local uTimers = { } local setting = get( "kick" ) function onChat ( message, messageType ) spam[ source ] = tonumber( spam[ source ] or 0 ) + 1 if spam[ source ] == 3 then outputChatBox( "Warning - Do Not Spam! ",source,255,0,0 ) elseif spam[ source ] > 5 then if setting == "true" then outputChatBox( "Kicking " .. getPlayerName( source ) .. " For Flooding The Chat! 5 Times !",root,255,0,0 ) kickPlayer( source,"You Have Been Kicked For Flooding! 5/5" ) spam[ source ] = 0 elseif setting == "false" then setPlayerMuted( source,true ) spam[ source ] = 0 outputChatBox( getPlayerName( source ) .. " Has Been Auto Muted [20 sec]",root,255,0,0 ) if isTimer( uTimers[ source ] ) then killTimer( uTimers[ source ] ) end uTimers[ source ] = setTimer( function( player ) setPlayerMuted( player,false ) outputChatBox( "You Have Been unMuted Dont Try Spam!",player,255,255,0 ) end, 20000, 1,source ) end end end addEventHandler ( "onPlayerChat", root, onChat ) function quitPlayer( ) spam[ source ] = nil uTimers[ source ] = nil end addEventHandler ( "onPlayerQuit", root, quitPlayer ) function active( ) outputChatBox( ".:[ Anti Flood | #FFFF1ABy E ]:.",root,0,255,0,true ) end addEventHandler( "onResourceStart", resourceRoot, active ) Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
Evil-Cod3r Posted February 23, 2012 Author Posted February 23, 2012 God i Love You Man Worked Fine My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now