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
plSp = {
he = {},
motv = {},
wrn = {},
kev = {},
nv = {}
}
for i = 1,32 do
plSp.he[i] = 'OFF'
plSp.motv[i] = 'OFF'
plSp.wrn[i] = 'OFF'
plSp.kev[i] = 'OFF'
plSp.nv[i] = 'OFF'
end
addhook('serveraction','start_items')
function start_items(id,action)
if action==1 then
menu(id,'Start Player Item,HE|IS '..plSp.he[id]..',Motolov Cocktail|IS '..plSp.motv[id]..',Wrench|IS '..plSp.wrn[id]..',Kevlar + Helm|IS '..plSp.kev[id]..',Night Vision|IS '..plSp.nv[id])
end
end
addhook('menu','spawnItems')
function spawnItems(id,mnu,btn)
if mnu == 'Start Player Item' then
local E,D = '\169000255000ENABLED@C','\169255000000DISABLED@C'
if btn == 1 then
if plSp.he[id] == 'OFF' then plSp.he[id] = 'ON' else plSp.he[id] = 'OFF' end
if plSp.he[id] == 'OFF' then msg2(id,'HE '..D) else msg2(id,'HE '..E) end
elseif btn == 2 then
if plSp.motv[id] == 'OFF' then plSp.motv[id] = 'ON' else plSp.motv[id] = 'OFF' end
if plSp.motv[id] == 'OFF' then msg2(id,'Motolov Cocktail '..D) else msg2(id,'Motolov Cocktail '..E) end
elseif btn == 3 then
if plSp.wrn[id] == 'OFF' then plSp.wrn[id] = 'ON' else plSp.wrn[id] = 'OFF' end
if plSp.wrn[id] == 'OFF' then msg2(id,'Wrench '..D) else msg2(id,'Wrench '..E) end
elseif btn == 4 then
if plSp.kev[id] == 'OFF' then plSp.kev[id] = 'ON' else plSp.kev[id] = 'OFF' end
if plSp.kev[id] == 'OFF' then msg2(id,'Kevlar + Helm '..D) else msg2(id,'Kevlar + Helm '..E) end
elseif btn == 5 then
if plSp.nv[id] == 'OFF' then plSp.nv[id] = 'ON' else plSp.nv[id] = 'OFF' end
if plSp.nv[id] == 'OFF' then msg2(id,'Night Vision '..D) else msg2(id,'Night Vision '..E) end
end
end
end
addhook('spawn','spawnItem')
function spawnItem(id)
if plSp.he[id] == 'ON' then parse('equip '..id..' 51') end
if plSp.motv[id] == 'ON' then parse('equip '..id..' 73') end
if plSp.wrn[id] == 'ON' then parse('equip '..id..' 74') end
if plSp.kev[id] == 'ON' then parse('equip '..id..' 58') end
if plSp.nv[id] == 'ON' then parse("spawnitem 59 "..player(id,"tilex").." "..player(id,"tiley")) end
end