View Single Post
04/23/23, 09:36 AM   #7
Valve
 
Valve's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2017
Posts: 23
Originally Posted by sinnereso View Post
Is there a way with that prehook I can get the @NAME from the selected user or am I going to need an additional posthook on mouseup? The timing of these in my head gets sketchy. Id still need to get the @NAME for my code to know wtf is going on and handle it accordingly.
Code:
ZO_PreHook("JumpToFriend", function(displayName)
	d(displayName)
end)
You get the variable passed through as part of the hook.

So, if you had the above exactly as I've shown and were to travel to me, you would see in chat "@Valve" and the travel-to-player action would go through.

Do whatever you want with the name and that's it. Don't return true or you'll block the original JumpToFriend function from running.

Last edited by Valve : 04/23/23 at 09:42 AM.
  Reply With Quote