Advertisement
tyler569

Add this to config

May 12th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. #Tag add/remove (to add or remove a tag from a player) (needs better formatting)
  2. admin:/tag [$add] [$tag] [$player] = >>>
  3. assign(@add,$add)
  4. assign(@tag,$tag)
  5. assign(@player,$player)
  6. assign(@tags,array(m,d1,d2,h))
  7. assign(@ranks,array(mod,donatorhigh,donatorlow,helper))
  8. assign(@syntax,concat(color(e), 'Syntax: ', color(f), '/tag ', color(c), '<add/remove> ', '<tag> ', '<player>'))
  9. if(
  10. or(
  11. lt(length(@add),1),
  12. lt(length(@tag),1),
  13. lt(length(@player),1)
  14. ),
  15. die(concat(color(4), 'Missing perameter! ', @syntax))
  16. )
  17. if(
  18. nor(equals_ic(@add,add),equals_ic(@add,remove)),
  19. die('Incorrect syntax for <add/remove> You entered:' @add)
  20. )
  21. if(not(array_contains_ic(all_players(),@player)),die(concat(color(2), @player, color(4), 'is not online!')))
  22. if(
  23. not(array_contains_ic(@tags,@tag)),
  24. die('The tag '@tag 'is not valid!')
  25. )
  26. if(
  27. not(has_permission(player(),concat('titanicnut.tag.',@tag))),
  28. die(concat('you need the permission titanicnut.tag.',@tag))
  29. )
  30. if(equals_ic(@tag,m),assign(@val,0))
  31. if(equals_ic(@tag,d1),assign(@val,1))
  32. if(equals_ic(@tag,d2),assign(@val,2))
  33. if(equals_ic(@tag,h),assign(@val,3))
  34.  
  35. assign(@promorank,array_get(@ranks,@val))
  36. runas(~op,/pex user @player group @add @promorank)
  37. call_alias(/fixname @player)
  38. <<<
  39.  
  40. #fix player name (for use with the tagging system, needs to be rewritten)
  41. all:/fixname [$target='null'] = >>>
  42. if(is_null($target), assign(@player, player()), assign(@player, $target))
  43. include('/includes/fixname.ms')
  44. <<<
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement