Advertisement
Prior_

Untitled

Jan 9th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function playerAdvert( ply, args )
  2.  
  3. if args == "" then
  4.  
  5. ply:SendLua( string.format( [[notification.AddLegacy( "%s", 1, 5 )
  6. surface.PlaySound( "buttons/button15.wav" )]], ENEMYCOMMS.failMessage ) )
  7.  
  8. elseif team.GetName(ply:Team()) != "Enemy") then
  9. return ""
  10.  
  11. else
  12. for k,pl in pairs( player.GetAll() ) do
  13.  
  14. local senderColor = team.GetColor( ply:Team() )
  15. DarkRP.talkToPerson( pl, senderColor, ENEMYCOMMS.chatPrefix.." "..ply:Nick(), ENEMYCOMMS.advertTextColor, args, ply )
  16.  
  17. end
  18.  
  19. return ""
  20.  
  21. end
  22.  
  23. end
  24. DarkRP.defineChatCommand( ENEMYCOMMS.chatCommand, playerAdvert )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement