Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Tag add/remove (to add or remove a tag from a player) (needs better formatting)
- admin:/tag [$add] [$tag] [$player] = >>>
- assign(@add,$add)
- assign(@tag,$tag)
- assign(@player,$player)
- assign(@tags,array(m,d1,d2,h))
- assign(@ranks,array(mod,donatorhigh,donatorlow,helper))
- assign(@syntax,concat(color(e), 'Syntax: ', color(f), '/tag ', color(c), '<add/remove> ', '<tag> ', '<player>'))
- if(
- or(
- lt(length(@add),1),
- lt(length(@tag),1),
- lt(length(@player),1)
- ),
- die(concat(color(4), 'Missing perameter! ', @syntax))
- )
- if(
- nor(equals_ic(@add,add),equals_ic(@add,remove)),
- die('Incorrect syntax for <add/remove> You entered:' @add)
- )
- if(not(array_contains_ic(all_players(),@player)),die(concat(color(2), @player, color(4), 'is not online!')))
- if(
- not(array_contains_ic(@tags,@tag)),
- die('The tag '@tag 'is not valid!')
- )
- if(
- not(has_permission(player(),concat('titanicnut.tag.',@tag))),
- die(concat('you need the permission titanicnut.tag.',@tag))
- )
- if(equals_ic(@tag,m),assign(@val,0))
- if(equals_ic(@tag,d1),assign(@val,1))
- if(equals_ic(@tag,d2),assign(@val,2))
- if(equals_ic(@tag,h),assign(@val,3))
- assign(@promorank,array_get(@ranks,@val))
- runas(~op,/pex user @player group @add @promorank)
- call_alias(/fixname @player)
- <<<
- #fix player name (for use with the tagging system, needs to be rewritten)
- all:/fixname [$target='null'] = >>>
- if(is_null($target), assign(@player, player()), assign(@player, $target))
- include('/includes/fixname.ms')
- <<<
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement