script_name Skip PayDay for Diamond by FForest script_author FForest l

 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
script_name('Skip PayDay for Diamond by FForest')
script_author('FForest')
local sampev = require 'lib.samp.events'
mode = false
times = false
function sampev.onSendPlayerSync()
if times and mode then
sampAddChatMessage("{00FF00}[Skip PayDay for Diamond by FForest] {FFFFFF}Афк запущен!", 0xFFFFFFFF)
return false
end
end
function sampev.onServerMessage(color, msg)
if msg:find("Уровень преступности в штате составил") then
sampAddChatMessage("{00FF00}[Skip PayDay for Diamond by FForest] {FFFFFF}Афк отключен!", 0xFFFFFFFF)
times = false
end
end
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("fafk", cmdFafk)
while true do
wait(0)
if os.date("!*t",os.time()).min >= 59 and os.date("!*t",os.time()).sec >= 40 then
times = true
else
times = false
end
end
end
function cmdFafk(arg)
if mode then
mode = false
sampAddChatMessage("{00FF00}[Skip PayDay for Diamond by FForest] {FFFFFF}Афк отключен!", 0xFFFFFFFF)
else
mode = true
sampAddChatMessage("{00FF00}[Skip PayDay for Diamond by FForest] {FFFFFF}Афк включен!", 0xFFFFFFFF)
end
end