-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added send to swim command #222
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,3 +145,10 @@ RegisterNetEvent('qb-admin:client:maxmodVehicle', function() | |
local vehicle = GetVehiclePedIsIn(PlayerPedId()) | ||
PerformanceUpgradeVehicle(vehicle) | ||
end) | ||
|
||
RegisterNetEvent('qb-admin:client:sendtoswim',function(id,reason) | ||
local ped = PlayerPedId(id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove ID from here |
||
local coords = vector3(-4915.85, -3057.73, -0.94) | ||
QBCore.Functions.Notify(reason, 'error') | ||
SetEntityCoords(ped, coords.x, coords.y, coords.z) | ||
end) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -269,6 +269,7 @@ local Translations = { | |
report_toggle = 'Toggle Incoming Reports (Admin Only)', | ||
kick_all = 'Kick all players', | ||
ammo_amount_set = 'Set Your Ammo Amount (Admin Only)', | ||
sendtoswim = "Send player to swimming (Admin Only)", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Send player to ocean would be better wording |
||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -521,6 +521,12 @@ QBCore.Commands.Add('heading', 'Copy heading to clipboard (Admin only)', {}, fal | |
TriggerClientEvent('qb-admin:client:copyToClipboard', src, 'heading') | ||
end, 'admin') | ||
|
||
QBCore.Commands.Add('sendtoswim', Lang:t('commands.sendtoswim'), { { name = 'id', help = 'Player id' }, { name = 'Reason', help = 'Reason to send to swim' }, }, true, function(_, args) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
local playerid = tonumber(args[1]) | ||
local reason = table.concat(args, " ",2) | ||
TriggerClientEvent('qb-admin:client:sendtoswim', playerid,playerid, reason) | ||
end, 'admin') | ||
|
||
CreateThread(function() | ||
while true do | ||
local tempPlayers = {} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the id param