working on making it so only a few admins are allowed to ban other admins. thought it would be pretty straight forward. guess i am wrong. I believe i am working in the correct area. I grabbed the part where normal non admins are banned, copied and pasted it below, and modified it so its looking for 2 admins then having the approved one ban the other admin.
havent had any luck yet in getting it to work. this is where i am leaving it for now, hopefully i didnt leave anything off while i was messing around with it. eventually i will want to have a few "special" admins that can ban other admins.
# (else_try),
# (eq, ":event_type", multiplayer_event_admin_ban_player),
# (try_begin),
# (store_script_param, ":value", 3),
#validity check
# Vincenzo begin
# (call_script, "script_multiplayer_server_protect_admin_command", ":player_no"),
# (eq, reg0, 1), # ok_admin
# Vincenzo end
# (player_is_admin, ":player_no"),
# (player_get_unique_id, reg44, ":player_no"),
# (eq, reg44, 111111), <<<<example id. later on i believe i will need to use this_or_next| command
# (player_is_active, ":value"),
# #condition checks are done
# Vincenzo begin
# (player_is_admin, ":value"),
# (try_begin),
# (gt,":player_no",-1),
# (str_store_player_username, s2, ":player_no"), # adminname
# (else_try),
# (str_store_string,s2,"str_you"),
# (try_end),
# (str_store_player_username, s3, ":value"),
# (str_store_string, s4, "str_ban_player_s2_s3"),
# (call_script, "script_multiplayer_broadcast_message"),
# (try_begin),
# (player_get_unique_id, ":value_2", ":value"),
# (gt,":value_2", 1), # Key auth server problem protection (id 1 if wrong)
# (ban_player, ":value", 0, ":player_no"),
# (ban_player, ":value", 0, 0), <<<< another attempt at banning someone.
# (else_try),
# (kick_player, ":value"),
# (try_end),
# # Thunder end
# (try_end),
I # all of it as i was working on other scripts.
do i need to kick the person first then add their stored id to the ban list? do i need to kick them for "cheating"? is there a simple error in there or am i way off the mark? got my other 4 scripts to work on the first try today. this is the only one that has caused me any trouble.
Figured it out.
and these 3 lines will get rid of the oddities of teamwounding yourself or your horse, and teamkilling your own horse/
(neq, ":hit_agent_no", ":attacker_agent_no"),
(neq, ":attacker_agent_no", ":hit_rider_no"),
(neq, ":attacker_agent_no", ":dead_rider_no"),