This repository has been archived by the owner on Jul 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
server.lua
124 lines (111 loc) · 5.5 KB
/
server.lua
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
-- © This Resource Coded By Elior#0590 And Mr.Itchy#2223 © --
-- © This Resource Protected By Apache-2.0 License © --
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterCommand('job', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "עבודתך היא : " .. xPlayer.job.label .. " - " .. xPlayer.job.grade_label })
end, false)
RegisterCommand('cash', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.getMoney() .. ' : סכום הכסף שעליך הוא'})
end, false)
RegisterCommand('bank', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.getAccount("bank")["money"] .. ' : סכום הכסף המופקד אצלך בבנק הוא'})
end, false)
RegisterCommand('dirty', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.getAccount("black_money")["money"] .. ' : סכום הכסף המלוכלך שעליך הוא'})
end, false)
RegisterCommand('salary', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.job.grade_salary .. ' : המשכורת שלך היא'})
end, false)
RegisterCommand('id', function(source)
if consoleCheck(source) then
print("You're ID Is Zero Because You Are The Console")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = source .. ' : האיידי שלך במשחק הוא'})
end, false)
RegisterCommand('ping', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = GetPlayerPing(source) .. "ms" .. ' : הפינג שלך הוא'})
end, false)
RegisterCommand('society', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer.job.grade_name == 'boss' then
TriggerEvent('esx_society:getSociety', xPlayer.job.name, function (society)
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. account.money .. ' : סכום הכסף שבחברה שלך הוא'})
end)
end)
else
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'error', text = 'תצטרך להיות מנהל החברה/עבודה שלך'})
end
end, false)
RegisterCommand('pinfo', function(source)
if consoleCheck(source) then
print("Console Can't Execute This Command")
return
end
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.getMoney() .. ' : סכום הכסף שעליך הוא'})
Citizen.Wait(3000)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.getAccount("bank")["money"] .. ' : סכום הכסף המופקד אצלך בבנק הוא'})
Citizen.Wait(3000)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.getAccount("black_money")["money"] .. ' : סכום הכסף השחור שעליך הוא'})
Citizen.Wait(3000)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "עבודתך היא : " .. xPlayer.job.label .. " - " .. xPlayer.job.grade_label })
Citizen.Wait(3000)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. xPlayer.job.grade_salary .. ' : המשכורת שלך היא'})
Citizen.Wait(3000)
if xPlayer.job.grade_name == 'boss' then
TriggerEvent('esx_society:getSociety', xPlayer.job.name, function (society)
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = "₪" .. account.money .. ' : סכום הכסף שבחברה שלך הוא'})
end)
end)
end
Citizen.Wait(3000)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = source .. ' : האיידי שלך במשחק הוא'})
Citizen.Wait(3000)
TriggerClientEvent('mythic_notify:client:SendAlert', source, { type = 'success', text = GetPlayerPing(source) .. ' : הפינג שלך הוא'})
end, false)
function consoleCheck(id)
if id == 0 then
return true
else
return false
end
end