There is a way to make something like this?

jacek2144

L1: Registered
Mar 19, 2012
3
0
Hello i'm making map and got question
did there is a way to make client force command example sm_recive_shotgun when he touch example trigger_once?
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Yes, have the trigger do OnStartTouch => !activator => sm_receive_shotgun. This tells the trigger to, when touched, give a shotgun to the player/whatever activated it.

P.S. if I'm not mistaken, you seem to be Polish; if you want, ask me questions in Polish instead of English :D
 

Terwonick

L6: Sharp Member
Aug 25, 2010
278
190
@Frozen
Seba nauczył się języka polskiego, kiedy dowiedział się Google przetłumaczone na język polski.

(words may not be entirely accurate, but i'm sure you get my drift ;) )
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Yes, have the trigger do OnStartTouch => !activator => sm_receive_shotgun. This tells the trigger to, when touched, give a shotgun to the player/whatever activated it.
Incorrect. That would attempt to fire an sm_receive_shotgun input on the player entity, which does not exist.

You need to use a point_clientcommand entity, and have a trigger send the Command input to it with a parameter of sm_receive_shotgun. However, some things cannot be executed on a client like this, so it may or may not work. Though being a sourcemod command I would guess that it would be allowed.
 

Fruity Snacks

Creator of blackholes & memes. Destroyer of forums
aa
Sep 5, 2010
6,394
5,571
@Frozen
Seba nauczył się języka polskiego, kiedy dowiedział się Google przetłumaczone na język polski.

(words may not be entirely accurate, but i'm sure you get my drift ;) )

That's just stupid.

... with a name like Sebastian though, i'm surprised I didn't realize that this might be a possibility sooner.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Incorrect. That would attempt to fire an sm_receive_shotgun input on the player entity, which does not exist.

You need to use a point_clientcommand entity, and have a trigger send the Command input to it with a parameter of sm_receive_shotgun. However, some things cannot be executed on a client like this, so it may or may not work. Though being a sourcemod command I would guess that it would be allowed.

Seriously, I'm glad Valve didn't hire me. Before I am suitable for their required ability I need to find a way to tap into boojum's consciousness and extract his knowledge of Entity-fu and download it into my brain Matrix-style.
 

henke37

aa
Sep 23, 2011
2,075
515
Or you could just read the entire valve developer wiki like I did. It is quite informative.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Snark does speak Entity, after all.