AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get_user_origin (https://forums.alliedmods.net/showthread.php?t=335801)

amirwolf 01-04-2022 21:48

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

fysiks 01-04-2022 23:09

Re: get_user_origin
 
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?

amirwolf 01-06-2022 23:26

Re: get_user_origin
 
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.

Bugsy 01-06-2022 23:43

Re: get_user_origin
 
Check that the target ID is within the valid player ID range before doing anything (1 to get_maxplayers()).


All times are GMT -4. The time now is 11:37.

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