Fixed assign and unassign

This commit is contained in:
Cooldude2606
2019-04-11 17:27:30 +01:00
parent 5fd5de65e0
commit aa7c9b1194
2 changed files with 4 additions and 4 deletions

View File

@@ -120,7 +120,7 @@ Roles.new_role('Veteran','Vet')
:allow{
}
:set_auto_promote_condition(function(player)
if player.online_time > 3*hours then
if player.online_time > 10*hours then
return true
end
end)
@@ -141,7 +141,7 @@ Roles.new_role('Regular','Reg')
'command/kill'
}
:set_auto_promote_condition(function(player)
if player.online_time > 10*hours then
if player.online_time > 3*hours then
return true
end
end)

View File

@@ -8,7 +8,7 @@ Commands.new_command('assign-role','Assigns a role to a player')
:set_flag('admin-only',true)
:add_alias('rpromote','assign','role','add-role')
:register(function(player,action_player,role,raw)
local player_highest = Roles.get_player_highest(player)
local player_highest = Roles.get_player_highest_role(player)
if player_highest.index < role.index then
Roles.assign_player(action_player,role,player.name)
else
@@ -22,7 +22,7 @@ Commands.new_command('unassign-role','Unassigns a role from a player')
:set_flag('admin-only',true)
:add_alias('rdemote','unassign','remove-role')
:register(function(player,action_player,role,raw)
local player_highest = Roles.get_player_highest(player)
local player_highest = Roles.get_player_highest_role(player)
if player_highest.index < role.index then
Roles.unassign_player(action_player,role,player.name)
else