Briefcase
Hello, this is my first script I’ve uploaded to the forums, and one of the few I’ve made.
this is just a simple script to “pickup” 2 variants of a briefcase with the click of a key (Page Up, Page Down)
I’ve updated the GitHub page and this script now has an option to work with or without a controller.
You Can Download It Here
Screenshots
6 Likes
It would be better if this script were by command in chat /e briefcase /e suitcase
More great your script congratulations friend
1 Like
Keitto
5
In radiant animations there is command like that.
1 Like
Do you have this animation folder?
1 Like
I haven’t tried this, but you could give this a try to change them over to chat commands:
In “client.lua” find:
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsControlJustReleased(1, 10 ) then ----change 10 to another key (Default Page Up) Controls Can Be Found At: https://docs.fivem.net/game-references/controls/
giveWeapon("weapon_briefcase") ----Steel Briefcase
DisplayNotification("Picked Up Briefcase")
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsControlJustReleased(1, 11 ) then ----change 11 to another key (Default Page Down) Controls Can Be Found At: https://docs.fivem.net/game-references/controls/
giveWeapon("weapon_briefcase_02") ----Leather Brifcase
DisplayNotification("Picked Up Briefcase")
end
end
end)
and replace with:
--[[
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsControlJustReleased(1, 10 ) then ----change 10 to another key (Default Page Up) Controls Can Be Found At: https://docs.fivem.net/game-references/controls/
giveWeapon("weapon_briefcase") ----Steel Briefcase
DisplayNotification("Picked Up Briefcase")
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsControlJustReleased(1, 11 ) then ----change 11 to another key (Default Page Down) Controls Can Be Found At: https://docs.fivem.net/game-references/controls/
giveWeapon("weapon_briefcase_02") ----Leather Brifcase
DisplayNotification("Picked Up Briefcase")
end
end
end)
]]--
RegisterCommand("es", function()
giveWeapon('weapon_briefcase') -- Steel Briefcase
DisplayNotification("Picked Up Briefcase")
Citizen.Wait(1)
end)
RegisterCommand("el", function()
giveWeapon('weapon_briefcase_02') -- Leather Briefcase
DisplayNotification("Picked Up Briefcase")
Citizen.Wait(1)
end)
Save the script and restart the resource. DO NOT CLOSE THE EDITOR AFTER YOU SAVE!!! This way, if it does not work, you can just use Ctrl+Z to undo the edits.
Again, I haven’t downloaded this script, so I can’t promise this is going to work, but give it a try.
1 Like
Yes it works but the case does not disappear anymore I will yes modify your code thank you friend