Update NewCmds.py

This commit is contained in:
Sarasayed0118 2024-04-07 05:29:37 +05:30 committed by GitHub
parent c76bb82c73
commit 9a16ed8bce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -549,24 +549,6 @@ def play_sound(arguments, clientid):
send(f"Using: /playsound [music sound] [time] [volume]", clientid)
def acl(arguments, client_id):
role = "admin"
admin_commands = pdata.roles_cmdlist(role)
if not admin_commands:
send("Error: Admin role not found.", client_id)
return
msg = "\ue046______________|ADMIN-CMDS-LISTS|________________\ue046\n"
admin_commands_list = admin_commands.split(', ')
for i, cmd in enumerate(admin_commands_list, 1):
if i % 10 == 0:
msg += "\n\ue046 || " + cmd
elif i == 1: # Add \ue046 || only to the first command of each line
msg += "\ue046 || " + cmd
else:
msg += ', ' + cmd
send(msg, client_id)
def protect_players(arguments, clientid):
if arguments == [] or arguments == ['']:
myself = clientid_to_myself(clientid)
@ -597,6 +579,24 @@ def protect_players(arguments, clientid):
player.node.invincible = False
def acl(arguments, client_id):
role = "admin"
admin_commands = pdata.roles_cmdlist(role)
if not admin_commands:
send("Error: Admin role not found.", client_id)
return
msg = "\ue046______________|ADMIN-CMDS-LISTS|________________\ue046\n"
admin_commands_list = admin_commands.split(', ')
for i, cmd in enumerate(admin_commands_list, 1):
if i % 10 == 0:
msg += "\n\ue046 || " + cmd
elif i == 1: # Add \ue046 || only to the first command of each line
msg += "\ue046 || " + cmd
else:
msg += ', ' + cmd
send(msg, client_id)
def vcl(arguments, client_id):
role = "vip"
admin_commands = pdata.roles_cmdlist(role)