Disabled WANTED, Enable PVP
This commit is contained in:
42
gameplay/gameplay.lua
Normal file
42
gameplay/gameplay.lua
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
local function StartingRoleplay()
|
||||||
|
|
||||||
|
Citizen.CreateThread(function()
|
||||||
|
for i = 1, 25 do
|
||||||
|
EnableDispatchService(i, 25)
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = 0, 255 do
|
||||||
|
if NetworkIsPlayerConnected(i) then
|
||||||
|
if NetworkIsPlayerConnected(i) and GetPlayerPed(i) ~= nil then
|
||||||
|
SetCanAttackFriendly(GetPlayerPed(i), true, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
Citizen.CreateThread(function()
|
||||||
|
while true do
|
||||||
|
Wait(1000)
|
||||||
|
local Player = PlayerId()
|
||||||
|
SetPlayerWantedLevel(Player, 0, false)
|
||||||
|
SetPlayerWantedLevelNow(Player, false)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
Citizen.CreateThread(function()
|
||||||
|
while true do
|
||||||
|
Citizen.Wait(1000)
|
||||||
|
local pos = GetEntityCoords(PlayerPedId(), false)
|
||||||
|
local dist = GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), 2729.47, 1514.56, 23.7, false)
|
||||||
|
if dist > 150.0 then
|
||||||
|
ClearAreaOfCops(pos, 400.0)
|
||||||
|
else
|
||||||
|
Wait(5000)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
AddEventHandler('gb-core:start', function()
|
||||||
|
StartingRoleplay()
|
||||||
|
end)
|
||||||
22
shared/shared.lua
Normal file
22
shared/shared.lua
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
GB = GB or {}
|
||||||
|
GB.Core = GB.Core or {}
|
||||||
|
GB.Player = GB.Player or {}
|
||||||
|
GB.Players = GB.Players or {}
|
||||||
|
GB.APlayer = GB.APlayer or {}
|
||||||
|
GB.APlayers = GB.APlayers or {}
|
||||||
|
GB.Functions = GB.Functions or {}
|
||||||
|
GB.PlayerData = GB.PlayerData or {}
|
||||||
|
GB.Commands = GB.Commands or {}
|
||||||
|
GB.Admin = GB.Admin or {}
|
||||||
|
|
||||||
|
GB.NewCharacter = {
|
||||||
|
Cash = 50,
|
||||||
|
Bank = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
GB.UserGroups = {
|
||||||
|
['user'] = {label = 'User'},
|
||||||
|
['mod'] = {label = 'Moderator'},
|
||||||
|
['admin'] = {label = 'Admin'},
|
||||||
|
['dev'] = {label = 'Developer'}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user