Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tems = {}
- tems.imperialt = {}
- tems.imperialt["TEAM_IMPERIALLOGISTICSDIVISION"] = true
- tems.imperialt["TEAM_IMPERIALMILITARYINTELLIGENCESERVICE"] = true
- tems.imperialt["TEAM_IMPERIALMILITARYSECURITY"] = true
- tems.imperialt["TEAM_IMPERIALNAVY"] = true
- tems.imperialt["TEAM_IMPERIALRECONAISSANCECORPS"] = true
- tems.imperialt["TEAM_ARMOUREDSTORMTROOPERCORPS"] = true
- tems.imperialt["TEAM_STORMTROOPERS"] = true
- tems.rebelt = {}
- tems.rebelt["TEAM_REBELINSURGENTDIVISION"] = true
- tems.rebelt["TEAM_REBELINTELLIGENCE"]= true
- tems.rebelt["TEAM_REBELRECONAISSANCECORPS"]= true
- tems.rebelt["TEAM_REBELSPECIALFORCES"]= true
- tems.rebelt["TEAM_REBELSPECTREDIVISION"] = true
- tems.rebelt["TEAM_REBELSUPPORTCORPS"]= true
- tems.rebelt["TEAM_REBELWOOKIEINSURGENTS"] = true
- tems.rebelt["TEAM_KOTA'SMILITIA"] = true
- local staff = {}
- staff["moderator"] = true
- staff["admin"] = true
- staff["superadmin"] = true
- staff["eventstaff"] = true
- function playerAdvertI( ply, args )
- local tem = ply:Team()
- if !(tems.imperialt[tem] or 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" )]], cumms.imp.fail ) )
- else
- for k,v in pairs(player.GetAll()) do
- if (tems.imperialt[tem] or staff[v:GetUserGroup()]) then
- DarkRP.talkToPerson( v, Color(255, 0, 0), cumms.imp.prefix.." "..ply:Nick(), cumms.rebel.col, args, ply )
- end
- end
- return ""
- end
- end
- function playerAdvertR( ply, args )
- local tem = ply:Team()
- if !(tems.rebelt[tem] or 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" )]], cumms.rebel.fail ) )
- else
- for k,v in pairs(player.GetAll()) do
- if (tems.rebelt[tem] or staff[v:GetUserGroup()]) then
- DarkRP.talkToPerson( v, Color(255, 0, 0), cumms.rebel.prefix.." "..ply:Nick(), cumms.rebel.col, args, ply )
- end
- end
- return ""
- end
- end
- DarkRP.defineChatCommand( "icomms", playerAdvertI )
- DarkRP.defineChatCommand( "rcomms", playerAdvertR )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement