blob: d6975c6de64aeb4943e8c7221aa7f5633b156ac7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
global function ToolgunToolThrowEntity_Init
void function ToolgunToolThrowEntity_Init()
{
AddCallback_OnToolgunToolsInit( CreateToolgunToolThrow )
}
void function CreateToolgunToolThrow()
{
ToolgunTool throwTool
throwTool.toolName = "Throw entity"
throwTool.toolDescription = "Spawns and throws the currently selected entity type"
throwTool.onFired = ToolgunToolThrow_OnFired
RegisterTool( throwTool )
}
void function ToolgunToolThrow_OnFired( entity player, entity weapon, WeaponPrimaryAttackParams attackParams )
{
#if SERVER
ClientCommand( player, "ent_throw npc_frag_drone" )
#endif
}
|