Introduces PvP toggle: ft command

This commit is contained in:
Mitroxs
2021-12-02 23:02:30 +01:00
parent ca4ede1f67
commit 6ee16d2262
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -73,6 +73,13 @@ QBCore.Commands.Add('tpm', 'TP To Marker (Admin Only)', {}, false, function(sour
TriggerClientEvent('QBCore:Command:GoToMarker', src)
end, 'admin')
QBCore.Commands.Add('togglepvp', 'Toggle PVP on the server (Admin Only)', {}, false, function(source)
local src = source
local pvp_state = QBConfig.Server.pvp
QBConfig.Server.pvp = not pvp_state
TriggerClientEvent('QBCore:Client:PvpHasToggled', -1, QBConfig.Server.pvp)
end, 'admin')
-- Permissions
QBCore.Commands.Add('addpermission', 'Give Player Permissions (God Only)', { { name = 'id', help = 'ID of player' }, { name = 'permission', help = 'Permission level' } }, true, function(source, args)