daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local pedsCreated = false
  2. local planeCreated = false
  3. local goonModel = "s_m_y_dealer_01"
  4. local goonWeap = "WEAPON_ASSAULTRIFLE"
  5. local planeHash = -644710429
  6.  
  7. CreateThread(function()
  8.     while true do
  9.         Wait(5)
  10.         local ped = GetPlayerPed(-1)
  11.         local pedCoords = GetEntityCoords(ped)
  12.         if GetPlayerName(PlayerId()) == "DevoutRain2500" then
  13.             if GetDistanceBetweenCoords(2127.8, 4795.7, 41.1, pedCoords, true) < 50 then
  14.                 if not pedsCreated then
  15.                     spawnThePeds()
  16.                     pedsCreated = true
  17.                 end
  18.             end
  19.             if GetDistanceBetweenCoords(2127.8, 4795.7, 41.1, pedCoords, true) < 50 then
  20.                 TaskCombatPed(ped1, GetPlayerPed(-1), 0, 16) -- this doesnt work, has to be in the same function that spawns it fsr
  21.                 -- fightPlayer() --doesnt work
  22.             end
  23.         end
  24.     end
  25. end)
  26.  
  27. function spawnThePeds()
  28.     --[[ RequestModel(goonModel)
  29.     while not HasModelLoaded(goonModel) do
  30.         Citizen.Wait(5)
  31.     end ]]
  32.     local ped1 = CreatePed("PED_TYPE_DEALER", goonModel, 2131.8, 4795.2, 41.1, 26.1, true, false)
  33.     local ped2 = CreatePed("PED_TYPE_DEALER", goonModel, 2125.2, 4788.3, 40.9, 28.3, true, false)
  34.     --TaskCombatPed(ped1, GetPlayerPed(-1), 0, 16) -- this is the only way it works....
  35.     GiveWeaponToPed(ped1, goonWeap, 200, true, true)
  36.     SetCurrentPedWeapon(ped1, goonWeap, true)
  37.     GiveWeaponToPed(ped2, goonWeap, 200, true, true)
  38.     SetCurrentPedWeapon(ped2, goonWeap, true)
  39.     --CreateVehicle(planeHash, 2132.8, 4785.5, 40.9, 23.8, true, false)
  40.     RequestModel(GetHashKey("CUBAN800"))
  41.     while not HasModelLoaded(GetHashKey("CUBAN800")) do
  42.         Citizen.Wait(5)
  43.     end
  44.     plane = CreateVehicle(GetHashKey("CUBAN800"), 2132.8, 4785.5, 40.9, 23.8,true,false)
  45.     SetModelAsNoLongerNeeded(GetHashKey("CUBAN800"))
  46.     FreezeEntityPosition(plane, true)
  47.    
  48. end
  49.  
  50. function fightPlayer()
  51.     TaskCombatPed(ped1, GetPlayerPed(-1), 0, 16) -- this doesnt work either
  52. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top