-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmayor.sqf
More file actions
72 lines (49 loc) · 2 KB
/
mayor.sqf
File metadata and controls
72 lines (49 loc) · 2 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
_this = _this select 3;
_art = _this select 0;
_cash = 'cash' call INV_GetItemAmount;
if (_art == "ClientWahl") then
{
if (isNil("WahlSperre")) then {WahlSperre = false;};
if (WahlSperre) exitWith {player groupChat "You just voted.";};
_spielernum = call compile (_this select 1); format["if (isServer) then {[0,1,2,[""ServerWahl"", %1, %2]] execVM ""mayor.sqf"";};", _spielernum, rolenumber] call broadcast;
player groupChat format[localize "STRS_regierung_votedfor", (playerstringarray select _spielernum)];
WahlSperre = true;
sleep 30;
WahlSperre = false;
};
if (_art == "ServerWahl") then
{
_kandidatnum = (_this select 1);
_waehlernum = ((_this select 2)-1);
for [{_i=0}, {_i < count(WahlArray)}, {_i=_i+1}] do
{
_arr = (WahlArray select _i);
if (_waehlernum in _arr) exitWith {_arr = _arr - [_waehlernum];WahlArray SET [_i, _arr];};
};
WahlArray SET [_kandidatnum, ((WahlArray select _kandidatnum )+ [_waehlernum])];
};
if (_art == "clientgesetz") then
{
_nummer = _this select 1;
_text = _this select 2;
if (_nummer == -1) exitWith {};
if ((_text call ISSE_str_Length) > 60) exitWith {player groupChat localize "STRS_text_zu_lang";};
format ["GesetzArray SET [%1, ""%2""];
hint format [localize ""STRS_gilde_gesetze_public"", %1, ""%2""];", _nummer, _text] call broadcast;
};
if (_art == "steuernMayor") then
{
_item = _this select 1;
_mag = _this select 2;
_weap = _this select 3;
_vcl = _this select 4;
_bank = _this select 5;
format ["
(INV_ItemTypenArray select 0) SET [2, %1];
(INV_ItemTypenArray select 1) SET [2, %2];
(INV_ItemTypenArray select 2) SET [2, %3];
(INV_ItemTypenArray select 3) SET [2, %4];
bank_steuer = %5;
hint ""The mayor has changed the taxes!"";
", _item, _vcl, _mag, _weap, _bank] call broadcast;
};