I tried to do this well before asking for help, but it was impossible for me at this time.
In advance thanks !
sc = "2" -- 0 = f2 , 1 = f3 , 2 = f4 -- addhook("serveraction","redirect") function redirect(id,rd) if (rd == 3) then rsm(id) end end
sc = "2" -- 0 = f2 , 1 = f3 , 2 = f4 --
addhook("serveraction","redirect")
redirectto the serveraction hook. This way whenever a server action is performed(a player presses either of F2-F4) it calls the function with 2 parameters: the player id and the server action key pressed F2=1, F3=2, F4=3
function redirect(id,rd)
if (rd == 3) then
addhook("serveraction","redirect") function redirect(id,rd) if (rd == 1) then rsm(id) end end
hc.add_menu_command("Other Servers", rsm, hc.SHOW_STATS_TO_ME_LEVEL, hc.COMMAND_MENU_KEY)