mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Fixed assign and unassign
This commit is contained in:
@@ -120,7 +120,7 @@ Roles.new_role('Veteran','Vet')
|
|||||||
:allow{
|
:allow{
|
||||||
}
|
}
|
||||||
:set_auto_promote_condition(function(player)
|
:set_auto_promote_condition(function(player)
|
||||||
if player.online_time > 3*hours then
|
if player.online_time > 10*hours then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -141,7 +141,7 @@ Roles.new_role('Regular','Reg')
|
|||||||
'command/kill'
|
'command/kill'
|
||||||
}
|
}
|
||||||
:set_auto_promote_condition(function(player)
|
:set_auto_promote_condition(function(player)
|
||||||
if player.online_time > 10*hours then
|
if player.online_time > 3*hours then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Commands.new_command('assign-role','Assigns a role to a player')
|
|||||||
:set_flag('admin-only',true)
|
:set_flag('admin-only',true)
|
||||||
:add_alias('rpromote','assign','role','add-role')
|
:add_alias('rpromote','assign','role','add-role')
|
||||||
:register(function(player,action_player,role,raw)
|
: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
|
if player_highest.index < role.index then
|
||||||
Roles.assign_player(action_player,role,player.name)
|
Roles.assign_player(action_player,role,player.name)
|
||||||
else
|
else
|
||||||
@@ -22,7 +22,7 @@ Commands.new_command('unassign-role','Unassigns a role from a player')
|
|||||||
:set_flag('admin-only',true)
|
:set_flag('admin-only',true)
|
||||||
:add_alias('rdemote','unassign','remove-role')
|
:add_alias('rdemote','unassign','remove-role')
|
||||||
:register(function(player,action_player,role,raw)
|
: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
|
if player_highest.index < role.index then
|
||||||
Roles.unassign_player(action_player,role,player.name)
|
Roles.unassign_player(action_player,role,player.name)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user