Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin:/muteall [$onoff = 'null'] = >>>
- assign(@onoff,$onoff)
- if(not(is_boolean(@onoff)),
- msg(concat(color(c),'The correct format is:')) #Format would need better
- die(concat(color(9),'/muteall [true or false]'))
- )
- assign(@playerlist,all_players())
- assign(@playerson,subtract(array_size(@playerlist),1))
- for(assign(@l,0),lte(@l,@playerson),inc(@l),
- assign(@mute,array_get(@playerlist,@l))
- assign(@ranks,pgroup(@mute))
- if(nor(array_contains(@ranks,'admin'),array_contains(@ranks,'mod')),
- runas(~op,concat('/mute ',@mute))
- )
- )
- if(@onoff,
- store_value('all_muted',true),
- store_value('all_muted',false)
- )
- <<<
- #IN main.ms player_join event
- if(get_value(all_muted),
- runas(~op,concat('/mute ',@player)) #@player is player joining
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement