diff --git a/gameplay/gameplay.lua b/gameplay/gameplay.lua new file mode 100644 index 0000000..49f866f --- /dev/null +++ b/gameplay/gameplay.lua @@ -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) \ No newline at end of file diff --git a/shared/shared.lua b/shared/shared.lua new file mode 100644 index 0000000..56ac852 --- /dev/null +++ b/shared/shared.lua @@ -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'} +} \ No newline at end of file