The main question I have is do you want the players to use this command on themselves only or on other players as well? Because this command will now allow you to give the weapons to people very far away as long as the person writing the command is near an FBI Rancher. Not sure this is intended.

Problem is you were trying to get the closest vehicle to a person before scanning the params to find out who the person is.

Then you were also checking if a person is near a vehicle 490 (this is a model id, not a vehicle id in your case) so it wouldn't work most of the time (unless your function is designed around it?)

Made these changes that I mentioned and some extra. I still urge you to read the first paragraph of my message and figure out who is supposed to use this command.

Well he is right. And before you rage quit again, you are the one asking for help. Don't be surprised that you get such answers when you expect people to do everything for you. Also, there is a nice little edit button so don't double post. There is a 24 hour bump rule over here.