Added A custom Command Prosesser and a bit more

This commit is contained in:
Cooldude2606
2017-07-10 18:47:48 +01:00
parent 770fcf28b7
commit 97d3fd0596
7 changed files with 120 additions and 55 deletions

View File

@@ -50,7 +50,7 @@ function rank_print(msg, rank, inv)
end
else
if rankPower <= rank.power then
if rank.shortHand ~= '' then player.print(('['..(rank.shortHand)..']: '..msg)) else player.print(('[Everyone]: '..msg)) end
if rank.short_hand ~= '' then player.print(('['..(rank.short_hand)..']: '..msg)) else player.print(('[Everyone]: '..msg)) end
end
end
end
@@ -68,9 +68,8 @@ function give_rank(player,rank,by_player)
else
rank_print(player.name..' was '..message..' to '..rank.name..' by <system>','Guest')
end
player.print('You Have Been Given The '..rank.name..' Rank!')
--if for some reason the tag is diffrent to the deafult
if player.tag ~= old_rank.tag then player.print('Your Tag Was Reset Due To A Rank Change') end
if rank.name ~= 'Guest' then player.print('You Have Been Given The '..rank.name..' Rank!') end
if player.tag ~= old_rank.tag and player.tag ~= '' then player.print('Your Tag Was Reset Due To A Rank Change') end
--rank change
player.permission_group = game.permissions.get_group(rank.name)
player.tag = get_rank(player).tag
@@ -117,7 +116,7 @@ function find_new_rank(player)
end
end
--lose ends
if get_rank(player).power <= 3 and not player.admin then rank_print(player.name..' needs to be promoted.') end
if get_rank(player).power <= string_to_rank('mod').power and not player.admin then rank_print(player.name..' needs to be promoted.') end
if old_rank.name ~= get_rank(player).name then global.old_ranks[player.index]=old_rank.name end
end
--event handlers