Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. local imperialt = {}
  2. local staff = {}
  3.  
  4. function InitialiseTablesImperial()
  5. local imperialt = {
  6. ["TEAM_IMPERIALLOGISTICSDIVISION"] = true,
  7. ["TEAM_IMPERIALMILITARYINTELLIGENCESERVICE"] = true,
  8. ["TEAM_IMPERIALMILITARYSECURITY"] = true,
  9. ["TEAM_IMPERIALNAVY"] = true,
  10. ["TEAM_IMPERIALRECONAISSANCECORPS"] = true,
  11. ["TEAM_ARMOUREDSTORMTROOPERCORPS"] = true,
  12. ["TEAM_STORMTROOPERS"] = true
  13. }
  14.  
  15. local staff = {
  16. moderator = true,
  17. admin = true,
  18. superadmin = true
  19. }
  20.  
  21. hook.Add("Initialise", "MeenoIsGay2", InitialiseTablesImperial)
  22.  
  23. function playerAdvertI( ply, args )
  24. if not (imperialt[ply:Team()]) or not (staff[ply:GetUserGroup()]) then
  25.  
  26. ply:SendLua( string.format( [[notification.AddLegacy( "%s", 1, 5 )
  27. surface.PlaySound( "buttons/button15.wav" )]], "You cannot talk in this frequency." ) )
  28.  
  29. return "" end
  30.  
  31. if args == "" then
  32.  
  33. ply:SendLua( string.format( [[notification.AddLegacy( "%s", 1, 5 )
  34. surface.PlaySound( "buttons/button15.wav" )]], IMPERIALCOMMS.failMessage ) )
  35.  
  36. else
  37.  
  38. for k,pl in pairs( player.GetAll() ) do
  39.  
  40. local senderColor = team.GetColor( ply:Team() )
  41. DarkRP.talkToPerson( pl, Color(255, 0, 0), IMPERIALCOMMS.chatPrefix.." "..ply:Nick(), IMPERIALCOMMS.advertTextColor, args, ply )
  42. end
  43.  
  44. return "" end
  45.  
  46. end
  47.  
  48. DarkRP.defineChatCommand( IMPERIALCOMMS.chatCommand, playerAdvert )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement