Fixed robbing without weapon #14

This commit is contained in:
ElPumpo
2018-06-22 15:06:01 +02:00
parent d2059ed13e
commit e390a45658
6 changed files with 12 additions and 5 deletions
+7 -3
View File
@@ -125,6 +125,7 @@ incircle = false
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
local pos = GetEntityCoords(GetPlayerPed(-1), true)
for k,v in pairs(Stores)do
@@ -140,7 +141,11 @@ Citizen.CreateThread(function()
end
incircle = true
if IsControlJustReleased(0, Keys['E']) then
TriggerServerEvent('esx_holdup:rob', k)
if IsPedArmed(GetPlayerPed(-1), 4) then
TriggerServerEvent('esx_holdup:rob', k)
else
ESX.ShowNotification(_U('no_threat'))
end
end
elseif(Vdist(pos.x, pos.y, pos.z, pos2.x, pos2.y, pos2.z) > 1.0)then
incircle = false
@@ -157,7 +162,6 @@ Citizen.CreateThread(function()
TriggerServerEvent('esx_holdup:toofar', store)
end
end
Citizen.Wait(0)
end
end)
+1 -2
View File
@@ -1,5 +1,4 @@
Locales['br'] = {
['robbery_cancelled'] = 'O roubo será cancelado, você não ganhará nada!',
['robbery_successful'] = 'O roubo foi um sucesso. Você ganhou ~g~$',
['shop_robbery'] = 'Loja roubavel',
@@ -20,5 +19,5 @@ Locales['br'] = {
['min_police'] = 'there must be at least ~b~',
['in_city'] = '~s~ policemen in town to rob.',
['robbery_already'] = '~r~Um assalto já está em andamento.',
['no_threat'] = 'you do not pose a threat to the store',
}
+1
View File
@@ -12,4 +12,5 @@ Locales['de'] = {
['robbery_cancelled_at'] = '~r~Raub abgebrochen bei: ~b~%s~s~',
['min_police'] = 'there must be at least ~b~%s cops~s~ in town to rob.',
['robbery_already'] = '~r~Ein Raub ist bereits im gange.',
['no_threat'] = 'you do not pose a threat to the store',
}
+1
View File
@@ -12,4 +12,5 @@ Locales['en'] = {
['robbery_cancelled_at'] = '~r~The robbery at ~b~%s~s~ has been cancelled!',
['min_police'] = 'there must be at least ~b~%s cops~s~ in town to rob.',
['robbery_already'] = '~r~A robbery is already in progress.',
['no_threat'] = 'you do not pose a threat to the store',
}
+1
View File
@@ -12,4 +12,5 @@ Locales['fr'] = {
['robbery_cancelled_at'] = '~r~Braquage annulé à: ~b~%s~s~',
['min_police'] = 'il faut minimum ~b~%s policiers~s~ en ville pour braquer.',
['robbery_already'] = '~r~Un braquage est déjà en cours.',
['no_threat'] = 'you do not pose a threat to the store',
}
+1
View File
@@ -12,4 +12,5 @@ Locales['sv'] = {
['robbery_cancelled_at'] = '~r~Rånet~s~ vid ~b~%s~s~ har avbrutits!',
['min_police'] = 'det måste vara minst ~b~%s poliser~s~ inne för att du ska kunna ~o~råna butiker~s~.',
['robbery_already'] = '~r~Ett rån pågår redan.',
['no_threat'] = 'du kan inte hota utan ett vapen',
}