-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkiller.sqf
More file actions
151 lines (109 loc) · 4.61 KB
/
killer.sqf
File metadata and controls
151 lines (109 loc) · 4.61 KB
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
143
144
145
146
147
148
149
150
diag_log text format["killer: %1",_this];
_killer = _this select 0;
_killedbyvehicle = _this select 1;
_license = _this select 2;
_self = player;
_drown = false;
if (player == _killer and !iscop and !suicided) exitWith {wipewanted = false;};
if (underwater player and getOxygenRemaining player <= 0) then {_drown = true};
if (player == _killer and !iscop and suicided and !_drown) exitWith {
player groupChat localize "STRS_handlerdeadpub_suicide";
SelfKilled = SelfKilled + 1;
extradeadtime = extradeadtime + suicidepenalty;
["extradeadtime", extradeadtime] call ClientSaveVar;
(format ['server globalChat "%1 committed suicide!";', name player]) call broadcast;
wipewanted = false;
};
if (player == _killer and !iscop and suicided and _drown) exitWith {
player groupChat localize "You have drowned.";
SelfKilled = SelfKilled + 1;
extradeadtime = extradeadtime + suicidepenalty;
["extradeadtime", extradeadtime] call ClientSaveVar;
(format ['server globalChat "%1 drowned!";', name player]) call broadcast;
wipewanted = false;
};
if (player == _killer and iscop) exitWith {};
if (_killer in civarray) then {
CivsKilled = CivsKilled + 1;
if (iscop) then {
_civkopfcash = call compile format ["kopfcash_%1", _killer];
_civkopfcash = ceil(_civkopfcash / 3);
if (_civkopfcash != 0) then {
kontostand = kontostand + _civkopfcash;
player groupChat format["You got 1/3 of the criminal's bounty totaling $%1.",_civkopfcash];
RewardsCollected = RewardsCollected + _civkopfcash;
};
_playerIsWanted = call compile format ["%1_wanted", _killer];
if (_playerIsWanted != 1) then {
player groupChat format [localize "STRS_handlerdeadpub_civkilled", _killer];
};
} else {
if (_killer getVariable "terrorist" or side (group _killer) == EAST) exitWith {};
extradeadtime = extradeadtime + killedplayerinc;
["extradeadtime", extradeadtime] call ClientSaveVar;
true call TurnWantedFunc;
if(_killedbyvehicle)then
{
INV_LizenzOwner = INV_LizenzOwner - ["car","truck"];
["INV_LizenzOwner", INV_LizenzOwner] call ClientSaveVar;
player groupchat "You have lost your vehicle license for reckless driving!";
demerits = 0;
}else{
player groupchat "You are now wanted, and lost your gun licenses!";
INV_LizenzOwner = INV_LizenzOwner - ["Pistollicense","Riflelicense","automatic","shotgun"];
["INV_LizenzOwner", INV_LizenzOwner] call ClientSaveVar;
};
};
sleep 1;
//revisit - save victim name in crime log
if (_killedbyvehicle) then
{
(format ["[""KilledCiv"", %1] spawn Isse_AddCrimeLogEntry; if(%1 in civarray)then{if(!(""Hit and Run"" in %1_reason))then{%1_reason = %1_reason + [""Hit and Run""]}; kopfcash_%1 = kopfcash_%1 + 30000};", player]) call broadcast;
}
else
{
(format ["[""KilledCiv"", %1] spawn Isse_AddCrimeLogEntry; if(%1 in civarray)then{if(!(""murder"" in %1_reason))then{%1_reason = %1_reason + [""murder""]}; kopfcash_%1 = kopfcash_%1 + 30000};", player]) call broadcast;
};
};
if (_killer in coparray) then
{
CopsKilled = CopsKilled + 1;
if (iscop) then
{
extradeadtime = extradeadtime + killedplayerinc;
["extradeadtime", extradeadtime] call ClientSaveVar;
player groupChat format [localize "STRS_handlerdeadpub_copkilledbycop", _killer];
if ( (call GC_PlayerInCopBase) or (_killer in list CopBaseTrigger) or (CopsKilled > 5) ) then
{
[] execVM "copprison.sqf";
};
}
else
{
extradeadtime = extradeadtime + killedplayerinc;
["extradeadtime", extradeadtime] call ClientSaveVar;
player groupChat format [localize "STRS_handlerdeadpub_copkilled", _killer];
true call TurnWantedFunc;
if(_killedbyvehicle)then
{
INV_LizenzOwner = INV_LizenzOwner - ["car","truck"];
["INV_LizenzOwner", INV_LizenzOwner] call ClientSaveVar;
player groupchat "You have lost your vehicle licenses for reckless driving!";
demerits = 0;
}else{
player groupchat "You are now wanted, and lost your gun licenses!";
INV_LizenzOwner = INV_LizenzOwner - ["Pistollicense","Riflelicense","automatic","shotgun"];
["INV_LizenzOwner", INV_LizenzOwner] call ClientSaveVar;
};
};
sleep 1;
//revisit - save victim name in crime log
if (_killedbyvehicle) then
{
(format ["[""KilledCop"", %1, ""%2""] spawn Isse_AddCrimeLogEntry; if(%1 in civarray)then{if(!(""Hit and run on a cop"" in %1_reason))then{%1_reason = %1_reason + [""Hit and run on a cop""]}; kopfcash_%1 = kopfcash_%1 + 50000};", player, _killer]) call broadcast;
}
else
{
(format ["[""KilledCop"", %1, ""%2""] spawn Isse_AddCrimeLogEntry; if(%1 in civarray)then{if(!(""cop murder"" in %1_reason))then{%1_reason = %1_reason + [""cop murder""]}; kopfcash_%1 = kopfcash_%1 + 50000};", player, _killer]) call broadcast;
};
};