Add files via upload

This commit is contained in:
Jakestus 2019-10-24 22:32:40 +03:00 committed by GitHub
parent 8bde47b30a
commit 075a3a2f3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 133 additions and 0 deletions

3
gun/__resource.lua Normal file
View file

@ -0,0 +1,3 @@
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
client_script 'guns4all.lua'

46
gun/guns4all.lua Normal file
View file

@ -0,0 +1,46 @@
RegisterCommand('gun', function(source, args)
giveGrantedWpn()
TriggerEvent('chat:addMessage', {
color = {255,255,0},
args = { 'Hernepyssynne, olkaa hyvä.' }
})
end, false)RegisterCommand('wpn', function(source, args)
giveGrantedWpn()
TriggerEvent('chat:addMessage', {
color = {255,255,0},
args = { 'Hernepyssynne, olkaa hyvä.' }
})
end, false)
AddEventHandler('playerSpawned', function()
giveGrantedWpn()
end, false)
function giveGrantedWpn()
local ped = PlayerPedId()
local weapons = {
"WEAPON_PISTOL",
"WEAPON_STUNGUN",
"WEAPON_GRENADE",
"WEAPON_STICKYBOMB",
"WEAPON_PROXMINE",
"WEAPON_HOMINGLAUNCHER",
"WEAPON_RPG",
"WEAPON_FIREWORK",
"WEAPON_GRENADELAUNCHER",
"WEAPON_RAILGUN",
"WEAPON_RAYPISTOL",
"WEAPON_RAYMINIGUN",
"WEAPON_RAYCARBINE",
"WEAPON_FIREEXTINGUISHER",
"WEAPON_PETROLCAN"
}
for i,wpn in ipairs(weapons) do
GiveWeaponToPed(ped, wpn)
SetPedInfiniteAmmo(ped, true, wpn)
end
end