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
car/__resource.lua Normal file
View file

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

44
car/carspawn.lua Normal file
View file

@ -0,0 +1,44 @@
RegisterCommand('car', function(source, args)
local vehicle = args[1] or "futo"
if not IsModelInCdimage(vehicle) or not IsModelAVehicle(vehicle) then
TriggerEvent("chat:addMessage", {
color = {255,0,0},
args = { vehicle .. ' ei ole ajoneuvo tai sitä ei löydy.' }
})
return
end
RequestModel(vehicle)
while not HasModelLoaded(vehicle) do
Wait(500)
end
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)
local head, vect = GetClosestVehicleNodeWithHeading(pos.x, pos.y, pos.z, 1)
local x,y,z = table.unpack(vect)
-- local veh = CreateVehicle(vehicle, pos.x+5, pos.y+5, pos.z, GetEntityHeading(ped), true, false)
local veh = CreateVehicle(vehicle, x, y, z, GetEntityHeading(ped), true, false)
-- local veh = CreateVehicle(vehicle, x, y, z, head, true, false)
SetVehicleOnGroundProperly(veh)
SetVehicleNumberPlateText(veh, GetPlayerName())
TriggerEvent('chat:addMessage', {
color = {0,255,0},
args = { 'Tässä pyytämäsi upouusi ' .. vehicle }
})
local blip = AddBlipForEntity(veh)
SetBlipSprite(blip, 225)
SetBlipFlashes(blip, true)
SetBlipFlashTimer(blip, 10000)
SetModelAsNoLongerNeeded(vehicle)
SetEntityAsNoLongerNeeded(veh)
end, false)

9
config.cfg Normal file
View file

@ -0,0 +1,9 @@
# Include this in yout main config using something like
#exec resources/[buddem]/config.cfg
#your mileage may vary
# Autostart buddem things
ensure car
ensure pos
ensure die
ensure gun

3
die/__resource.lua Normal file
View file

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

11
die/die.lua Normal file
View file

@ -0,0 +1,11 @@
RegisterCommand('die', function(source, args)
SetEntityHealth(PlayerPedId(), 0)
TriggerEvent('chat:addMessage', {
color = {255,0,0},
args = { 'Sydämesi petti' }
})
end, false)

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

3
pos/__resource.lua Normal file
View file

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

11
pos/pos.lua Normal file
View file

@ -0,0 +1,11 @@
RegisterCommand('pos', function(source, args)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)
TriggerEvent('chat:addMessage', {
args = { pos.x .. "\n" .. pos.y.. "\n" .. pos.z }
})
end, false)