Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local imperialt = {}
- local staff = {}
- function InitialiseTablesImperial()
- local imperialt = {
- ["TEAM_IMPERIALLOGISTICSDIVISION"] = true,
- ["TEAM_IMPERIALMILITARYINTELLIGENCESERVICE"] = true,
- ["TEAM_IMPERIALMILITARYSECURITY"] = true,
- ["TEAM_IMPERIALNAVY"] = true,
- ["TEAM_IMPERIALRECONAISSANCECORPS"] = true,
- ["TEAM_ARMOUREDSTORMTROOPERCORPS"] = true,
- ["TEAM_STORMTROOPERS"] = true
- }
- local staff = {
- moderator = true,
- admin = true,
- superadmin = true
- }
- hook.Add("Initialise", "MeenoIsGay2", InitialiseTablesImperial)
- function playerAdvertI( ply, args )
- if not (imperialt[ply:Team()]) or not (staff[ply:GetUserGroup()]) then
- ply:SendLua( string.format( [[notification.AddLegacy( "%s", 1, 5 )
- surface.PlaySound( "buttons/button15.wav" )]], "You cannot talk in this frequency." ) )
- return "" end
- if args == "" then
- ply:SendLua( string.format( [[notification.AddLegacy( "%s", 1, 5 )
- surface.PlaySound( "buttons/button15.wav" )]], IMPERIALCOMMS.failMessage ) )
- else
- for k,pl in pairs( player.GetAll() ) do
- local senderColor = team.GetColor( ply:Team() )
- DarkRP.talkToPerson( pl, Color(255, 0, 0), IMPERIALCOMMS.chatPrefix.." "..ply:Nick(), IMPERIALCOMMS.advertTextColor, args, ply )
- end
- return "" end
- end
- DarkRP.defineChatCommand( IMPERIALCOMMS.chatCommand, playerAdvert )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement