Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pedsCreated = false
- local planeCreated = false
- local goonModel = "s_m_y_dealer_01"
- local goonWeap = "WEAPON_ASSAULTRIFLE"
- local planeHash = -644710429
- CreateThread(function()
- while true do
- Wait(5)
- local ped = GetPlayerPed(-1)
- local pedCoords = GetEntityCoords(ped)
- if GetPlayerName(PlayerId()) == "DevoutRain2500" then
- if GetDistanceBetweenCoords(2127.8, 4795.7, 41.1, pedCoords, true) < 50 then
- if not pedsCreated then
- spawnThePeds()
- pedsCreated = true
- end
- end
- if GetDistanceBetweenCoords(2127.8, 4795.7, 41.1, pedCoords, true) < 50 then
- TaskCombatPed(ped1, GetPlayerPed(-1), 0, 16) -- this doesnt work, has to be in the same function that spawns it fsr
- -- fightPlayer() --doesnt work
- end
- end
- end
- end)
- function spawnThePeds()
- --[[ RequestModel(goonModel)
- while not HasModelLoaded(goonModel) do
- Citizen.Wait(5)
- end ]]
- local ped1 = CreatePed("PED_TYPE_DEALER", goonModel, 2131.8, 4795.2, 41.1, 26.1, true, false)
- local ped2 = CreatePed("PED_TYPE_DEALER", goonModel, 2125.2, 4788.3, 40.9, 28.3, true, false)
- --TaskCombatPed(ped1, GetPlayerPed(-1), 0, 16) -- this is the only way it works....
- GiveWeaponToPed(ped1, goonWeap, 200, true, true)
- SetCurrentPedWeapon(ped1, goonWeap, true)
- GiveWeaponToPed(ped2, goonWeap, 200, true, true)
- SetCurrentPedWeapon(ped2, goonWeap, true)
- --CreateVehicle(planeHash, 2132.8, 4785.5, 40.9, 23.8, true, false)
- RequestModel(GetHashKey("CUBAN800"))
- while not HasModelLoaded(GetHashKey("CUBAN800")) do
- Citizen.Wait(5)
- end
- plane = CreateVehicle(GetHashKey("CUBAN800"), 2132.8, 4785.5, 40.9, 23.8,true,false)
- SetModelAsNoLongerNeeded(GetHashKey("CUBAN800"))
- FreezeEntityPosition(plane, true)
- end
- function fightPlayer()
- TaskCombatPed(ped1, GetPlayerPed(-1), 0, 16) -- this doesnt work either
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement