Add files via upload
This commit is contained in:
parent
8bde47b30a
commit
075a3a2f3b
9 changed files with 133 additions and 0 deletions
3
gun/__resource.lua
Normal file
3
gun/__resource.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
|
||||
client_script 'guns4all.lua'
|
46
gun/guns4all.lua
Normal file
46
gun/guns4all.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue