Commenting code
This commit is contained in:
parent
c55d70b65b
commit
68a88e4422
4 changed files with 22 additions and 15 deletions
|
@ -1,25 +1,27 @@
|
|||
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()
|
||||
|
||||
-- List of weapons to give
|
||||
local weapons = {
|
||||
"WEAPON_PISTOL",
|
||||
"WEAPON_STUNGUN",
|
||||
|
@ -38,6 +40,7 @@ function giveGrantedWpn()
|
|||
"WEAPON_PETROLCAN"
|
||||
}
|
||||
|
||||
-- Give weapon and set infinite ammo
|
||||
for i,wpn in ipairs(weapons) do
|
||||
GiveWeaponToPed(ped, wpn)
|
||||
SetPedInfiniteAmmo(ped, true, wpn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue