1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
### STIH
id=225
name=smth in hand
group=stuff
model=gfx\pistol.b3d
health=10000
shine=1
col=0
editor=0
script=start
	on:start {
	timer "self",10,0;
	timer "self",1000,0,"cp";
	addstate "object",currentid(),"invulnerability";
	}
	on:create {
	addstate "object",currentid(),"invulnerability";
	event "ih";
	timer "self",10,0;
	timer "self",850,0,"cp";
	}
	on:ih {
		$roll=0;
		if(getplayerweapon()==58){
			model "gfx\pistol.b3d";
			scale 0.2,0.2,0.2;
			$roll=-90;
		}elseif(getplayerweapon()==81){
			model "gfx\rocketlauncher.b3d";
			scale 0.8,0.8,0.8;
			$roll=-40;
		}elseif(getplayerweapon()==110){
			model "gfx\shotgun.b3d";
			scale 0.335,0.335,0.335;
			$roll=-90;
		}elseif(getplayerweapon()==131){
			model "gfx\ngih.b3d";
			scale 0.03,0.03,0.03;
		}elseif(getplayerweapon()==130){
			model "gfx\cgih.b3d";
			scale 0.04,0.04,0.04;
		}elseif(getplayerweapon()==139){
			model "gfx\Snipershotgun.b3d";
			scale 0.335,0.335,0.335;
			$roll=-90;
		}elseif(getplayerweapon()==133){
			model "gfx\fpih.b3d";
			scale 0.025,0.025,0.025;
		}elseif(getplayerweapon()==134){
			model "gfx\iftih.b3d";
			scale 0.027,0.027,0.027;
		}elseif(getplayerweapon()==135){
			model "gfx\pflih.b3d";
			scale 0.05,0.05,0.05;
		}elseif(getplayerweapon()==136){
			model "gfx\dfih.b3d";
			scale 0.06,0.06,0.06;
		}elseif(getplayerweapon()==138){
			model "gfx\sftih.b3d";
			scale 0.07,0.07,0.08;
		}elseif(getplayerweapon()==144){
			model "gfx\exploder.b3d";
			scale 0.2,0.2,0.2;
			$roll=-42;
		}elseif(getplayerweapon()==145){
			model "gfx\shotgun1inhand.b3d";
			scale 0.2,0.2,0.2;
			$roll=10;
		}elseif(getplayerweapon()==147){
			model "gfx\starsgih.b3d";
			scale 0.5,0.5,0.5;
		}else{
			scale 0,0,0;
		}
	}
	on:chaingunshot {
		$roll-=33;
	}
	on:cp {
		event "checksnipes","global";
		if(getplayerweapon()==58){
		}elseif(getplayerweapon()==81){
		}elseif(getplayerweapon()==110){
		}elseif(getplayerweapon()==130){
		}elseif(getplayerweapon()==131){
		}elseif(getplayerweapon()==133){
		}elseif(getplayerweapon()==134){
		}elseif(getplayerweapon()==135){
		}elseif(getplayerweapon()==136){
		}elseif(getplayerweapon()==138){
		}elseif(getplayerweapon()==139){
		}elseif(getplayerweapon()==144){
		}elseif(getplayerweapon()==145){
		}elseif(getplayerweapon()==147){
		}else{
			scale 0,0,0;
		}
		
	}
	on:timer {
	local $x,$y,$z,$pitch,$yaw,$roll,$wepn;
	$wepn=currentid();
	$x=getx("unit",1);
	$y=gety("unit",1);
	$z=getz("unit",1);
	$pitch=getpitch("unit",1);
	$yaw=getyaw("unit",1);
	$y+=10;
	if(getplayerweapon()==134){
		$y+=2;
	}elseif(getplayerweapon()==58){
		$pitch+=180;
		$y+=2.5;
	}elseif(getplayerweapon()==81){
		$y+=8; //-(0.4*sin($pitch))
	}elseif(getplayerweapon()==110){
		$pitch+=180;
	}elseif(getplayerweapon()==130){
		$y-=2;
	}elseif(getplayerweapon()==133){
		$y+=5;
	}elseif(getplayerweapon()==135){
		$y+=2;
	}elseif(getplayerweapon()==136){
		$y=$y-3;
	}elseif(getplayerweapon()==138){
		$y+=1;
	}elseif(getplayerweapon()==139){
		$pitch+=180;
	}elseif(getplayerweapon()==144){
		$y-=8;
	}elseif(getplayerweapon()==145){
		$y+=3;
	}elseif(getplayerweapon()==147){
		$y+=5;
	}else{
	}
	event "checksnipe","global";
	setpos "object",$wepn,$x,$y,$z;
	setrot "object",$wepn,$pitch,$yaw,$roll;
	}
script=end