Raised This Month: $51 Target: $400
 12% 

get_user_origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-04-2022 , 21:48   get_user_origin
Reply With Quote #1

Hello
How can I open a menu for a player by aiming at him?
Please give an example
__________________

Last edited by amirwolf; 01-04-2022 at 21:50.
amirwolf is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-04-2022 , 23:09   Re: get_user_origin
Reply With Quote #2

Use get_user_aiming() to get the player that you're aiming at and then use that ID to show them a menu like you normally would. Other than that, what exactly do you need to know?
__________________

Last edited by fysiks; 01-04-2022 at 23:12.
fysiks is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-06-2022 , 23:26   Re: get_user_origin
Reply With Quote #3

thanks for your response
I was going to give noclips to others
I was able to create the menu I wanted, but I get an error when I target a wall or an obstacle.
__________________
amirwolf is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-06-2022 , 23:43   Re: get_user_origin
Reply With Quote #4

Check that the target ID is within the valid player ID range before doing anything (1 to get_maxplayers()).
__________________
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode