- Sep 22, 2019
- 8
- 0
I want it in my map so when a player walks over a trigger box I can use the command sm_givew "playername" "weapon". Is there a way to pass the player name in this query?
As far as I know, there is no way to get and output a player's username using map logic. Although I doubt it will work, have you tried using !activator in place of playername?
I think you could adapt the method ABS used for the chairman derby. But it depends on your map and how it works, I think.
I thought there was a way to detect Steam ID via triggers, but I can't seem to remember how or who did that. But if you can find a way to do that you can also name players based on their unique IDs.
Here you go, man: https://tf2maps.net/posts/365742/
I read this topic again and now I know my link won't help you. Sorry for misleading.
You need to use SM, write your own plugin.
You will need just one plugin, you don't need different plugin for each map.
Use always the same targetnames for your triggers, lets say wpn1, wpn2, wpn3.
In plugin listen for trigger activations, where targetname starts from wpn*.
Plugin will check who is activating it, and will give proper weapon for him (because you will create list of triggers, ex: wpn1 = pistol, wpn2 = rocketlauncher, etc).
You can ask people on AlliedModders for creating that plugin for you.
That's my first idea.
I think you could adapt the method ABS used for the chairman derby. But it depends on your map and how it works, I think.
I thought there was a way to detect Steam ID via triggers, but I can't seem to remember how or who did that. But if you can find a way to do that you can also name players based on their unique IDs.