BoomEq
Wiek: 35 Na forum: 3522 dni Posty: 101
Nick w MP: BoomEqqq
Piwa : 20
Siema, chcialby ktos mi pomoc dodac do skryptu takie rzeczy jak: dodanie timeru aby moc brac misje co 30 minuteda, zmienic dostawanie awansu za wykonanie misji za trzy misje bo jest utawione na jedn? misje. Jakies porady mile widziane, oferuje repke.
S:
function onKillBoss ( killer )
if ( killer ) then
Criminals = getTeamFromName ( "Criminals" )
MafiaTeam = getTeamFromName ( "Mafia" )
xx , yy , zz = getElementPosition ( killer )
speedx , speedy , speedz = getElementVelocity ( killer )
end
if ( speedx ) and ( speedy ) and ( speedz ) == 0 then
call ( getResourceFromName ( "slothbot" ), "spawnBot" ) createMafia1 = exports . slothbot : spawnBot ( xx , yy + 4 , zz + 1 , 90 , 117 , 0 , 0 , MafiaTeam , 30 , "hunting" , Criminals )
call ( getResourceFromName ( "slothbot" ), "setBotTeam" ) setTeamMafia1 = exports . slothbot : setBotTeam ( createMafia1 , MafiaTeam )
call ( getResourceFromName ( "slothbot" ), "spawnBot" ) createMafia2 = exports . slothbot : spawnBot ( xx - 4 , yy , zz + 1 , 90 , 118 , 0 , 0 , MafiaTeam , 30 , "hunting" , Criminals )
call ( getResourceFromName ( "slothbot" ), "setBotTeam" ) setTeamMafia2 = exports . slothbot : setBotTeam ( createMafia2 , MafiaTeam )
else
setTimer (function()
triggerEvent ( "onKillBoss" , resourceRoot , killer )
end , 10000 , 1 )
end
end
addEvent ( "onKillBoss" , true )
addEventHandler ( "onKillBoss" , resourceRoot , onKillBoss )
function payThePerson ( killer )
local ranga = getElementData ( killer , "player:ranga" )
setElementData ( killer , "player:ranga" , ranga + 1 )
end
addEvent ( "onPayPlayer" , true )
addEventHandler ( "onPayPlayer" , resourceRoot , payThePerson )
function Defend ( attacker )
if ( attacker ) then
Criminals = getTeamFromName ( "Criminals" )
Tutorials = getTeamFromName ( "Tutorials" )
xx1 , yy1 , zz1 = getElementPosition ( attacker )
speedx1 , speedy1 , speedz1 = getElementVelocity ( attacker )
end
if ( speedx1 ) or ( speedy1 ) == 0 then
call ( getResourceFromName ( "slothbot" ), "spawnBot" ) createGuard1 = exports . slothbot : spawnBot ( xx1 , yy1 + 4 , zz1 + 1 , 90 , math . random ( 0 , 264 ), 0 , 0 , Tutorials , 27 , "hunting" , Criminals )
call ( getResourceFromName ( "slothbot" ), "setBotTeam" ) setTeamGuard1 = exports . slothbot : setBotTeam ( createGuard1 , Tutorials )
call ( getResourceFromName ( "slothbot" ), "spawnBot" ) createGuard2 = exports . slothbot : spawnBot ( xx1 - 4 , yy1 , zz1 + 1 , 90 , math . random ( 0 , 264 ), 0 , 0 , Tutorials , 27 , "hunting" , Criminals )
call ( getResourceFromName ( "slothbot" ), "setBotTeam" ) setTeamGuard2 = exports . slothbot : setBotTeam ( createGuard2 , Tutorials )
call ( getResourceFromName ( "slothbot" ), "spawnBot" ) createGuard3 = exports . slothbot : spawnBot ( xx1 - 3 , yy1 , zz1 + 2 , 90 , math . random ( 0 , 264 ), 0 , 0 , Tutorials , 27 , "hunting" , Criminals )
call ( getResourceFromName ( "slothbot" ), "setBotTeam" ) setTeamGuard3 = exports . slothbot : setBotTeam ( createGuard2 , Tutorials )
call ( getResourceFromName ( "slothbot" ), "spawnBot" ) createGuard2 = exports . slothbot : spawnBot ( xx1 - 2 , yy1 , zz1 + 3 , 90 , math . random ( 0 , 264 ), 0 , 0 , Tutorials , 27 , "hunting" , Criminals )
call ( getResourceFromName ( "slothbot" ), "setBotTeam" ) setTeamGuard2 = exports . slothbot : setBotTeam ( createGuard2 , Tutorials )
call ( getResourceFromName ( "slothbot" ), "spawnBot" ) createGuard2 = exports . slothbot : spawnBot ( xx1 - 1 , yy1 , zz1 + 4 , 90 , math . random ( 0 , 264 ), 0 , 0 , Tutorials , 27 , "hunting" , Criminals )
call ( getResourceFromName ( "slothbot" ), "setBotTeam" ) setTeamGuard2 = exports . slothbot : setBotTeam ( createGuard2 , Tutorials )
else
setTimer (function()
triggerEvent ( "OnDefense" , resourceRoot , attacker )
end , 1000 , 1 )
end
end
addEvent ( "onDefense" , true )
addEventHandler ( "onDefense" , resourceRoot , Defend )
C:
function MakePeds ()
if not ( Target1 ) then
Target1 = createPed ( 120 , 226.32 , 1873.32 , 17.64 , 0 )
Target1Blip = createBlipAttachedTo ( Target1 , 59 , 1 , 255 , 255 , 255 , 255 , 1 , 200 )
addEventHandler ( "onClientPedDamage" , Target1 , MissionStart1point2 )
end
if not ( Target2 ) then
Target2 = createPed ( 124 , 2797.9270019531 ,- 1087.2751464844 , 30.71875 , 280 )
Target2Blip = createBlipAttachedTo ( Target2 , 59 , 1 , 255 , 255 , 255 , 255 , 1 , 250 )
addEventHandler ( "onClientPedDamage" , Target2 , MissionStart1point22 )
end
if not ( Target3 ) then
Target3 = createPed ( 125 , 1371.6805419922 , 405.78125 , 19.7578125 , 90 )
Target3Blip = createBlipAttachedTo ( Target3 , 59 , 1 , 255 , 255 , 255 , 255 , 1 , 250 )
addEventHandler ( "onClientPedDamage" , Target3 , MissionStart1point23 )
end
if not ( Target4 ) then
Target4 = createPed ( 141 , 2092.384765625 ,- 1561.1468505859 , 13.134902000427 , 280 )
Target4Blip = createBlipAttachedTo ( Target4 , 59 , 1 , 255 , 255 , 255 , 255 , 1 , 250 )
addEventHandler ( "onClientPedDamage" , Target4 , MissionStart1point24 )
end
if not ( Target5 ) then
Target5 = createPed ( 186 , 2771.90234375 ,- 2421.9509277344 , 13.651704788208 , 90 )
Target5Blip = createBlipAttachedTo ( Target5 , 59 , 1 , 255 , 255 , 255 , 255 , 1 , 250 )
addEventHandler ( "onClientPedDamage" , Target5 , MissionStart1point25 )
end
if not ( Target6 ) then
Target6 = createPed ( 150 , 2357.5510253906 , 186.17848205566 , 27.151470184326 , 165 )
Target6Blip = createBlipAttachedTo ( Target6 , 59 , 1 , 255 , 255 , 255 , 255 , 1 , 250 )
addEventHandler ( "onClientPedDamage" , Target6 , MissionStart1point26 )
end
if not ( Target7 ) then
Target7 = createPed ( 222 , - 137.43379211426 ,- 51.451953887939 , 3.1171875 , 280 )
Target7Blip = createBlipAttachedTo ( Target7 , 59 , 1 , 255 , 255 , 255 , 255 , 1 , 350 )
addEventHandler ( "onClientPedDamage" , Target7 , MissionStart1point27 )
end
-- Target8 = createPed ( 295 , x , y , z , 90 ) i was going to make more but gave up . making one new mission starter person requires adding stuff EVERYWHERE . So there is only seven 'mission-start' peds to choose from .
-- Target9 = createPed ( 303 , x , y , z , 90 )
end
addEventHandler ( "onClientRender" , root , MakePeds )
PedsXYZ = {
{ 2408.1291503906 ,- 1238.4938964844 , 23.8125 },
{ 2470.806640625 ,- 1543.8052978516 , 24.044546127319 },
{ 2501.6008300781 ,- 1648.6756591797 , 13.571829795837 },
{ 2253.9594726563 ,- 1631.8551025391 , 15.640411376953 },
{ 2140.1042480469 ,- 1679.7093505859 , 15.0859375 },
{ 2149.32421875 ,- 1811.1708984375 , 16.140625 },
{ 2060.1865234375 ,- 1899.8605957031 , 13.546875 },
{ 1823.3603515625 ,- 2016.6119384766 , 13.566893577576 },
{ 1679.1461181641 ,- 2105.7026367188 , 13.546875 },
{ 1714.8137207031 ,- 1910.6866455078 , 13.566605567932 },
{ 1564.2947998047 ,- 1890.9844970703 , 13.559170722961 },
{ 1481.3895263672 ,- 1766.6097412109 , 18.795755386353 },
{ 1347.4201660156 ,- 1756.9500732422 , 13.5078125 },
{ 1224.7114257813 ,- 1814.6697998047 , 16.59375 },
{ 1118.9698486328 ,- 2028.6524658203 , 74.4296875 },
{ 206.19868469238 ,- 1768.6973876953 , 6.546875 },
{ 214.98 , - 172.58 , 1.58 },
{ 203.68 , - 180.13 , 1.58 },
{ 201.74 , - 166.16 , 1.58 },
{ 195.29 , - 162.64 , 1.58 },
{ 459.59594726563 ,- 1523.7823486328 , 30.288284301758 },
{ 736.29858398438 ,- 1435.7894287109 , 13.5390625 },
{ 738.91717529297 ,- 1345.7337646484 , 13.515712738037 },
{ 822.68072509766 ,- 1351.2365722656 , 13.530927658081 },
{ 925.7275390625 ,- 1294.1856689453 , 13.641004562378 },
{ 912.57977294922 ,- 1234.8577880859 , 17.2109375 },
{ 1105.1357421875 ,- 1133.2045898438 , 23.828125 },
{ 873.49597167969 ,- 874.29077148438 , 77.582679748535 },
{ 1025.9892578125 ,- 823.68084716797 , 101.85472106934 },
{ 1332.9985351563 ,- 653.57434082031 , 108.26316833496 },
{ 1551.3021240234 ,- 800.49975585938 , 72.217529296875 },
{ 1468.5914306641 ,- 902.58697509766 , 54.8359375 },
{ 1307.9936523438 ,- 865.40838623047 , 39.578125 },
{ 1203.3173828125 ,- 921.07562255859 , 43.080631256104 },
{ 2264.953125 ,- 1027.2215576172 , 59.28577041626 },
{ 2314.7189941406 ,- 1413.1782226563 , 24.9921875 },
{ 2232.056640625 ,- 1442.6455078125 , 24.087396621704 },
{ 1975.3189697266 ,- 1855.0867919922 , 4.0538311004639 },
{ 1862.8494873047 ,- 1871.0881347656 , 13.519597053528 },
{ 1762.8461914063 ,- 1949.6004638672 , 14.109554290771 },
{ 1664.6917724609 ,- 2330.1674804688 , 13.546875 },
{ 1208.2795410156 ,- 2346.3107910156 , 13.995714187622 },
{ 995.26635742188 ,- 1864.5472412109 , 12.8203125 },
{ 154.99880981445 ,- 1965.4990234375 , 3.7734375 },
{ 170.44160461426 ,- 1664.6004638672 , 15.655575752258 },
{ 17.18433380127 ,- 1154.3255615234 , 7.8228130340576 },
{- 82.429969787598 ,- 1173.9284667969 , 2.1366996765137 },
{- 381.87817382813 ,- 1439.3395996094 , 25.7265625 },
{ 325.44955444336 ,- 843.96441650391 , 12.108150482178 },
{ 673.65936279297 ,- 474.97897338867 , 16.536296844482 },
{ 660.53497314453 ,- 570.46875 , 16.3359375 },
{ 791.7177734375 ,- 508.47640991211 , 18.012922286987 },
{ 1301.6713867188 , 167.8851776123 , 20.4609375 },
{ 1285.4372558594 , 260.07229614258 , 19.546892166138 },
{ 1360.7961425781 , 484.26675415039 , 20.2109375 },
{ 2271.1560058594 ,- 51.195999145508 , 26.530889511108 },
{ 2308.1655273438 ,- 5.3111085891724 , 26.7421875 },
{ 2379.3010253906 , 70.998886108398 , 27.324970245361 },
{ 2419.8146972656 ,- 2.7896087169647 , 26.642074584961 },
{ 1367.9405517578 , 259.81524658203 , 19.566932678223 },
{ 251.79615783691 ,- 54.070095062256 , 1.5703125 },
{ 247.73648071289 ,- 65.515892028809 , 1.578125 },
{ 266.60070800781 ,- 120.93032836914 , 2.7618598937988 },
{ 209.63177490234 ,- 181.02629089355 , 1.578125 },
{ 264.99645996094 , 18.555158615112 , 2.4424524307251 },
{ 221.75611877441 , 147.44721984863 , 2.4296875 },
{- 36.147701263428 , 65.822456359863 , 3.1171875 },
{ 84.43726348877 ,- 179.38633728027 , 1.5322635173798 },
{ 674.11309814453 ,- 1898.0737304688 , 3.3838257789612 },
{ 1930.4147949219 ,- 1764.3403320313 , 13.539072036743 },
{ 1800.5695800781 ,- 1697.2138671875 , 13.537021636963 },
{ 1803.8472900391 ,- 1574.9273681641 , 13.412924766541 },
{ 1723.4967041016 ,- 1631.7790527344 , 20.214826583862 },
{ 1693.0904541016 ,- 1509.1323242188 , 13.546875 },
{ 1658.2348632813 ,- 1411.8851318359 , 15.0703125 },
{ 1526.5567626953 ,- 1447.7205810547 , 13.546875 },
{ 1413.6810302734 ,- 1488.8763427734 , 20.433372497559 },
{ 1145.6104736328 ,- 1489.7536621094 , 22.769031524658 },
{ 1117.7113037109 ,- 1318.9250488281 , 13.741367340088 },
{ 1102.6298828125 ,- 1233.3704833984 , 15.8203125 },
{ 1073.0048828125 ,- 1298.5368652344 , 17.046875 },
{ 996.70129394531 ,- 1297.2521972656 , 13.546875 },
{ 958.47326660156 ,- 1333.3563232422 , 13.52663230896 },
{ 1012.0866699219 ,- 1117.8051757813 , 23.898904800415 },
{ 1118.8717041016 ,- 1163.2797851563 , 23.591617584229 },
{ 1272.7255859375 ,- 1092.6022949219 , 26.407430648804 },
{ 1468.7145996094 ,- 1047.5424804688 , 23.828125 },
{ 1654.4260253906 ,- 1073.6107177734 , 23.8984375 },
{ 1645.5887451172 ,- 1149.4659423828 , 24.071043014526 },
{ 1944.2644042969 ,- 1219.3764648438 , 20.0234375 },
{ 2087.8625488281 ,- 1166.1748046875 , 25.536418914795 },
{ 2192.333984375 ,- 1278.3405761719 , 24.772089004517 },
{ 2249.6166992188 ,- 1472.3024902344 , 23.480480194092 },
{ 2315.6948242188 ,- 1538.1430664063 , 25.34375 },
{ 2285.5095214844 ,- 1645.6184082031 , 15.12997341156 },
{ 2252.8298339844 ,- 1914.0777587891 , 13.546875 },
{ 2406.3920898438 ,- 1906.2373046875 , 13.546875 },
{ 2486.1745605469 ,- 2017.5026855469 , 13.546875 },
{ 1661.8229980469 ,- 1703.0412597656 , 15.609375 },
{ 1940.9296875 ,- 2136.564453125 , 13.702333450317 },
{ 1905.9879150391 ,- 1995.1942138672 , 13.546875 },
{ 1755.4230957031 ,- 2139.4792480469 , 13.546875 },
{ 1888.7113037109 ,- 2099.5026855469 , 13.543642044067 },
{ 2235.1591796875 ,- 2264.2917480469 , 14.764669418335 },
{ 2140.369140625 ,- 2271.7136230469 , 17.5625 },
{ 2410.0537109375 ,- 2474.4580078125 , 13.630757331848 },
{ 2612.5070800781 ,- 2207.4521484375 , 13.546875 },
{ 1164.8048095703 ,- 2149.3125 , 68.162956237793 },
{ 492.65463256836 ,- 1857.8077392578 , 3.6914474964142 },
{ 2322.0229492188 , 11.374381065369 , 26.484375 },
}
Chats = {
{ "znak na mapie" },
}
Chats2 = {
{ "Dalem Ci juz zadanie! Nie wracaj zanim nie skonczysz" },
}
-- If you kill Target1 ( the mission starter ) the mafia will appear chase you later when you stop moving . Change what they say below .
AngryWorkerChat = {
}
-- Hitman 1 -------------------------------------------------------------------------
-- Attack the hitman to start the mission .
function MissionStart1point2 ( attacker )
if ( attacker == getLocalPlayer ()) then
destroyElement ( Target1Blip )
removeEventHandler ( "onClientPedDamage" , Target1 , MissionStart1point2 )
addEventHandler ( "onClientPedWasted" , Target1 , HitBossDown )
local ListyDoodle = math . random ( #PedsXYZ)
local chat1 = math . random ( #Chats)
outputChatBox ( Chats [ chat1 ][ 1 ], 0 , 0 , 190 )
outputChatBox ( "Wrog zostal oznaczony symbolem $. Za zabicie celu dostaniesz rank up!" , 222 , 0 , 0 )
if not ( hitPerson1 ) or ( isPedDead ( hitPerson1 ) ) then
hitPerson1 = createPed ( math . random ( 9 , 162 ), PedsXYZ [ ListyDoodle ][ 1 ], PedsXYZ [ ListyDoodle ][ 2 ], PedsXYZ [ ListyDoodle ][ 3 ], math . random ( 1 , 359 ) )
hitPerson1Blip = createBlipAttachedTo ( hitPerson1 , 52 , 4 , 255 , 255 , 255 , 255 , 1 , 99999 )
addEventHandler ( "onClientPedWasted" , hitPerson1 , HitDown1 )
addEventHandler ( "onClientPedDamage" , Target1 , MissionStart2point2 )
addEventHandler ( "onClientPedDamage" , hitPerson1 , DefendTheHit )
end
end
end -- 420 smoke up ! If you don 't smoke go eat a snack.
function MissionStart2point2( attacker )
if (attacker == getLocalPlayer ()) then
local chat2 = math.random(#Chats2)
outputChatBox(Chats2[chat2][1],0,0,190)
removeEventHandler ( "onClientPedDamage", Target1, MissionStart2point2 )
end
end
function HitBossDown( killer )
if (killer == getLocalPlayer ()) then
setTimer(function()
outputChatBox("Zabiles wlasnego bosa misji, ta misja jest aktualnie nie dostepna",255,0,0)
setTimer(function()
outputChatBox("Moja mafia Cie zabije..",255,0,0)
end, 2000, 1)
destroyElement(Target1)
destroyElement(hitPerson1Blip)
destroyElement(hitPerson1)
removeEventHandler("onClientPedWasted", hitPerson1, HitDown1)
setTimer(function()
local AngryWorkerChat1 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat1][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
setTimer(function()
local AngryWorkerChat2 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat2][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
end, 10000,1)
end, 6000,1)
end, 1000,1)
end
end
function DefendTheHit(attacker)
removeEventHandler ( "onClientPedDamage", hitPerson1, DefendTheHit )
triggerServerEvent ( "onDefense", resourceRoot, attacker )
end
function HitDown1( killer )
if (killer == getLocalPlayer ()) then
removeEventHandler("onClientPedWasted", hitPerson1, HitDown1)
destroyElement(hitPerson1Blip)
outputChatBox("Ukonczyles misje! Dostajesz +1 range",0,222,0)
triggerServerEvent ( "onPayPlayer", resourceRoot, killer )
removeEventHandler("onClientPedWasted", Target1, HitBossDown)
Target1Blip = createBlipAttachedTo ( Target1, 59, 1, 255, 255, 255, 255, 1, 200 )
addEventHandler ( "onClientPedDamage", Target1, MissionStart1point2 )
removeEventHandler ( "onClientPedDamage", Target1, MissionStart2point2 )
end
end
--Hitman 1 END-------------------------------------------------------------------------
--Hitman 2-------------------------------------------------------------------------
function MissionStart1point22(attacker)
if (attacker == getLocalPlayer ()) then
destroyElement(Target2Blip)
removeEventHandler( "onClientPedDamage", Target2, MissionStart1point22)
addEventHandler( "onClientPedWasted", Target2, HitBossDown2)
local ListyDoodle = math.random(#PedsXYZ)
local chat1 = math.random(#Chats)
outputChatBox(Chats[chat1][1],0,0,190)
outputChatBox("Wrog zostal oznaczony symbolem $. Za zabicie celu dostaniesz rank up!",222,0,0)
if not (hitPerson2) or ( isPedDead ( hitPerson2 ) ) then
hitPerson2 = createPed ( math.random(9,162),PedsXYZ[ListyDoodle][1], PedsXYZ[ListyDoodle][2], PedsXYZ[ListyDoodle][3], 0.0 )
hitPerson2Blip = createBlipAttachedTo ( hitPerson2, 52, 4, 255, 255, 255, 255, 1, 99999 )
addEventHandler("onClientPedWasted", hitPerson2, HitDown12)
addEventHandler ( "onClientPedDamage", Target2, MissionStart2point22 )
addEventHandler ( "onClientPedDamage", hitPerson2, DefendTheHit2 )
end
end
end
function MissionStart2point22( attacker )
if (attacker == getLocalPlayer ()) then
local chat2 = math.random(#Chats2)
outputChatBox(Chats2[chat2][1],0,0,190)
removeEventHandler ( "onClientPedDamage", Target2, MissionStart2point22 )
end
end
function HitBossDown2( killer )
if (killer == getLocalPlayer ()) then
setTimer(function()
outputChatBox("Zabiles wlasnego bosa misji, ta misja jest aktualnie nie dostepna",255,0,0)
setTimer(function()
outputChatBox("Moja mafia Cie zabije..",255,0,0)
end, 2000, 1)
destroyElement(Target2)
destroyElement(hitPerson2Blip)
destroyElement(hitPerson2)
removeEventHandler("onClientPedWasted", hitPerson2, HitDown12)
setTimer(function()
local AngryWorkerChat1 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat1][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
setTimer(function()
local AngryWorkerChat2 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat2][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
end, 10000,1)
end, 6000,1)
end, 1000,1)
end
end
function DefendTheHit2(attacker)
removeEventHandler ( "onClientPedDamage", hitPerson2, DefendTheHit2 )
triggerServerEvent ( "onDefense", resourceRoot, attacker )
end
function HitDown12( killer )
if (killer == getLocalPlayer ()) then
removeEventHandler("onClientPedWasted", hitPerson2, HitDown12)
destroyElement(hitPerson2Blip)
outputChatBox("Misja ukonczona, dostajesz +1 range",0,222,0)
triggerServerEvent ( "onPayPlayer", resourceRoot, killer )
removeEventHandler("onClientPedWasted", Target2, HitBossDown2)
Target2Blip = createBlipAttachedTo ( Target2, 59, 1, 255, 255, 255, 255, 1, 200 )
addEventHandler ( "onClientPedDamage", Target2, MissionStart1point22 )
removeEventHandler ( "onClientPedDamage", Target2, MissionStart2point22 )
end
end
--Hitman 2 END-------------------------------------------------------------------------
--Hitman 3-------------------------------------------------------------------------
function MissionStart1point23(attacker)
if (attacker == getLocalPlayer ()) then
destroyElement(Target3Blip)
removeEventHandler( "onClientPedDamage", Target3, MissionStart1point23)
addEventHandler( "onClientPedWasted", Target3, HitBossDown3)
local ListyDoodle = math.random(#PedsXYZ)
local chat1 = math.random(#Chats)
outputChatBox(Chats[chat1][1],0,0,190)
outputChatBox("Wrog zostal oznaczony symbolem $. Za zabicie celu dostaniesz rank up!",222,0,0)
if not (hitPerson3) or ( isPedDead ( hitPerson3 ) ) then
hitPerson3 = createPed ( math.random(9,162),PedsXYZ[ListyDoodle][1], PedsXYZ[ListyDoodle][2], PedsXYZ[ListyDoodle][3], 0.0 )
hitPerson3Blip = createBlipAttachedTo ( hitPerson3, 52, 4, 255, 255, 255, 255, 1, 99999 )
addEventHandler("onClientPedWasted", hitPerson3, HitDown13)
addEventHandler ( "onClientPedDamage", Target3, MissionStart2point23 )
addEventHandler ( "onClientPedDamage", hitPerson3, DefendTheHit3 )
end
end
end
function MissionStart2point23( attacker )
if (attacker == getLocalPlayer ()) then
local chat2 = math.random(#Chats2)
outputChatBox(Chats2[chat2][1],0,0,190)
removeEventHandler ( "onClientPedDamage", Target3, MissionStart2point23 )
end
end
function HitBossDown3( killer )
if (killer == getLocalPlayer ()) then
setTimer(function()
outputChatBox("Zabiles wlasnego bosa misji, ta misja jest aktualnie nie dostepna",255,0,0)
setTimer(function()
outputChatBox("Moja mafia Cie zabije..",255,0,0)
end, 2000, 1)
destroyElement(Target3)
destroyElement(hitPerson3Blip)
destroyElement(hitPerson3)
removeEventHandler("onClientPedWasted", hitPerson3, HitDown13)
setTimer(function()
local AngryWorkerChat1 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat1][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
setTimer(function()
local AngryWorkerChat2 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat2][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
end, 10000,1)
end, 6000,1)
end, 1000,1)
end
end
function DefendTheHit3(attacker)
removeEventHandler ( "onClientPedDamage", hitPerson3, DefendTheHit3 )
triggerServerEvent ( "onDefense", resourceRoot, attacker )
end
function HitDown13( killer )
if (killer == getLocalPlayer ()) then
removeEventHandler("onClientPedWasted", hitPerson3, HitDown13)
destroyElement(hitPerson3Blip)
outputChatBox("Misja ukonczona, dostajesz +1 range",0,222,0)
triggerServerEvent ( "onPayPlayer", resourceRoot, killer )
removeEventHandler("onClientPedWasted", Target3, HitBossDown3)
Target3Blip = createBlipAttachedTo ( Target3, 59, 1, 255, 255, 255, 255, 1, 200 )
addEventHandler ( "onClientPedDamage", Target3, MissionStart1point23 )
removeEventHandler ( "onClientPedDamage", Target3, MissionStart2point23 )
end
end
--Hitman 3 END-------------------------------------------------------------------------
--Hitman 4-------------------------------------------------------------------------
function MissionStart1point24(attacker)
if (attacker == getLocalPlayer ()) then
destroyElement(Target4Blip)
removeEventHandler( "onClientPedDamage", Target4, MissionStart1point24)
addEventHandler( "onClientPedWasted", Target4, HitBossDown4)
local ListyDoodle = math.random(#PedsXYZ)
local chat1 = math.random(#Chats)
outputChatBox(Chats[chat1][1],0,0,190)
outputChatBox("Wrog zostal oznaczony symbolem $. Za zabicie celu dostaniesz rank up!.",222,0,0)
if not (hitPerson4) or ( isPedDead ( hitPerson4 ) ) then
hitPerson4 = createPed ( math.random(9,162),PedsXYZ[ListyDoodle][1], PedsXYZ[ListyDoodle][2], PedsXYZ[ListyDoodle][3], 0.0 )
hitPerson4Blip = createBlipAttachedTo ( hitPerson4, 52, 4, 255, 255, 255, 255, 1, 99999 )
addEventHandler("onClientPedWasted", hitPerson4, HitDown14)
addEventHandler ( "onClientPedDamage", Target4, MissionStart2point24 )
addEventHandler ( "onClientPedDamage", hitPerson4, DefendTheHit4 )
end
end
end
function MissionStart2point24( attacker )
if (attacker == getLocalPlayer ()) then
local chat2 = math.random(#Chats2)
outputChatBox(Chats2[chat2][1],0,0,190)
removeEventHandler ( "onClientPedDamage", Target4, MissionStart2point24 )
end
end
function HitBossDown4( killer )
if (killer == getLocalPlayer ()) then
setTimer(function()
outputChatBox("Zabiles wlasnego bosa misji, ta misja jest aktualnie nie dostepna",255,0,0)
setTimer(function()
outputChatBox("Moja mafia Cie zabije..",255,0,0)
end, 2000, 1)
destroyElement(Target4)
destroyElement(hitPerson4Blip)
destroyElement(hitPerson4)
removeEventHandler("onClientPedWasted", hitPerson4, HitDown14)
setTimer(function()
local AngryWorkerChat1 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat1][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
setTimer(function()
local AngryWorkerChat2 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat2][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
end, 10000,1)
end, 6000,1)
end, 1000,1)
end
end
function DefendTheHit4(attacker)
removeEventHandler ( "onClientPedDamage", hitPerson4, DefendTheHit4 )
triggerServerEvent ( "onDefense", resourceRoot, attacker )
end
function HitDown14( killer )
if (killer == getLocalPlayer ()) then
removeEventHandler("onClientPedWasted", hitPerson4, HitDown14)
destroyElement(hitPerson4Blip)
outputChatBox("Misja ukonczona, dostajesz +1 range",0,222,0)
triggerServerEvent ( "onPayPlayer", resourceRoot, killer )
removeEventHandler("onClientPedWasted", Target4, HitBossDown4)
Target4Blip = createBlipAttachedTo ( Target4, 59, 1, 255, 255, 255, 255, 1, 200 )
addEventHandler ( "onClientPedDamage", Target4, MissionStart1point24 )
removeEventHandler ( "onClientPedDamage", Target4, MissionStart2point24 )
end
end
--Hitman 4 END-------------------------------------------------------------------------
--Hitman 5-------------------------------------------------------------------------
function MissionStart1point25(attacker)
if (attacker == getLocalPlayer ()) then
destroyElement(Target5Blip)
removeEventHandler( "onClientPedDamage", Target5, MissionStart1point25)
addEventHandler( "onClientPedWasted", Target5, HitBossDown5)
local ListyDoodle = math.random(#PedsXYZ)
local chat1 = math.random(#Chats)
outputChatBox(Chats[chat1][1],0,0,190)
outputChatBox("Wrog zostal oznaczony symbolem $. Za zabicie celu dostaniesz rank up!.",222,0,0)
if not (hitPerson5) or ( isPedDead ( hitPerson5 ) ) then
hitPerson5 = createPed ( math.random(9,162),PedsXYZ[ListyDoodle][1], PedsXYZ[ListyDoodle][2], PedsXYZ[ListyDoodle][3], 0.0 )
hitPerson5Blip = createBlipAttachedTo ( hitPerson5, 52, 4, 255, 255, 255, 255, 1, 99999 )
addEventHandler("onClientPedWasted", hitPerson5, HitDown15)
addEventHandler ( "onClientPedDamage", Target5, MissionStart2point25 )
addEventHandler ( "onClientPedDamage", hitPerson5, DefendTheHit5 )
end
end
end
function MissionStart2point25( attacker )
if (attacker == getLocalPlayer ()) then
local chat2 = math.random(#Chats2)
outputChatBox(Chats2[chat2][1],0,0,190)
removeEventHandler ( "onClientPedDamage", Target5, MissionStart2point25 )
end
end
function HitBossDown5( killer )
if (killer == getLocalPlayer ()) then
setTimer(function()
outputChatBox("Zabiles wlasnego bosa misji, ta misja jest aktualnie nie dostepna",255,0,0)
setTimer(function()
outputChatBox("Moja mafia Cie zabije..",255,0,0)
end, 2000, 1)
destroyElement(Target5)
destroyElement(hitPerson5Blip)
destroyElement(hitPerson5)
removeEventHandler("onClientPedWasted", hitPerson5, HitDown15)
setTimer(function()
local AngryWorkerChat1 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat1][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
setTimer(function()
local AngryWorkerChat2 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat2][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
end, 10000,1)
end, 6000,1)
end, 1000,1)
end
end
function DefendTheHit5(attacker)
removeEventHandler ( "onClientPedDamage", hitPerson5, DefendTheHit5 )
triggerServerEvent ( "onDefense", resourceRoot, attacker )
end
function HitDown15( killer )
if (killer == getLocalPlayer ()) then
removeEventHandler("onClientPedWasted", hitPerson5, HitDown15)
destroyElement(hitPerson5Blip)
outputChatBox("Misja ukonczona, dostajesz +1 range",0,222,0)
triggerServerEvent ( "onPayPlayer", resourceRoot, killer )
removeEventHandler("onClientPedWasted", Target5, HitBossDown5)
Target5Blip = createBlipAttachedTo ( Target5, 59, 1, 255, 255, 255, 255, 1, 200 )
addEventHandler ( "onClientPedDamage", Target5, MissionStart1point25 )
removeEventHandler ( "onClientPedDamage", Target5, MissionStart2point25 )
end
end
--Hitman 5 END-------------------------------------------------------------------------
--Hitman 6-------------------------------------------------------------------------
function MissionStart1point26(attacker)
if (attacker == getLocalPlayer ()) then
destroyElement(Target6Blip)
removeEventHandler( "onClientPedDamage", Target6, MissionStart1point26)
addEventHandler( "onClientPedWasted", Target6, HitBossDown6)
local ListyDoodle = math.random(#PedsXYZ)
local chat1 = math.random(#Chats)
outputChatBox(Chats[chat1][1],0,0,190)
outputChatBox("Wrog zostal oznaczony symbolem $. Za zabicie celu dostaniesz rank up!.",222,0,0)
if not (hitPerson6) or ( isPedDead ( hitPerson6 ) ) then
hitPerson6 = createPed ( math.random(9,162),PedsXYZ[ListyDoodle][1], PedsXYZ[ListyDoodle][2], PedsXYZ[ListyDoodle][3], 0.0 )
hitPerson6Blip = createBlipAttachedTo ( hitPerson6, 52, 4, 255, 255, 255, 255, 1, 99999 )
addEventHandler("onClientPedWasted", hitPerson6, HitDown16)
addEventHandler ( "onClientPedDamage", Target6, MissionStart2point26 )
addEventHandler ( "onClientPedDamage", hitPerson6, DefendTheHit6 )
end
end
end
function MissionStart2point26( attacker )
if (attacker == getLocalPlayer ()) then
local chat2 = math.random(#Chats2)
outputChatBox(Chats2[chat2][1],0,0,190)
removeEventHandler ( "onClientPedDamage", Target6, MissionStart2point26 )
end
end
function HitBossDown6( killer )
if (killer == getLocalPlayer ()) then
setTimer(function()
outputChatBox("Zabiles wlasnego bosa misji, ta misja jest aktualnie nie dostepna",255,0,0)
setTimer(function()
outputChatBox("Moja mafia Cie zabije..",255,0,0)
end, 2000, 1)
destroyElement(Target6)
destroyElement(hitPerson6Blip)
destroyElement(hitPerson6)
removeEventHandler("onClientPedWasted", hitPerson6, HitDown16)
setTimer(function()
local AngryWorkerChat1 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat1][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
setTimer(function()
local AngryWorkerChat2 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat2][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
end, 10000,1)
end, 6000,1)
end, 1000,1)
end
end
function DefendTheHit6(attacker)
removeEventHandler ( "onClientPedDamage", hitPerson6, DefendTheHit6 )
triggerServerEvent ( "onDefense", resourceRoot, attacker )
end
function HitDown16( killer )
if (killer == getLocalPlayer ()) then
removeEventHandler("onClientPedWasted", hitPerson6, HitDown16)
destroyElement(hitPerson6Blip)
outputChatBox("Misja ukonczona, dostajesz +1 range",0,222,0)
triggerServerEvent ( "onPayPlayer", resourceRoot, killer )
removeEventHandler("onClientPedWasted", Target6, HitBossDown6)
Target6Blip = createBlipAttachedTo ( Target6, 59, 1, 255, 255, 255, 255, 1, 200 )
addEventHandler ( "onClientPedDamage", Target6, MissionStart1point26 )
removeEventHandler ( "onClientPedDamage", Target6, MissionStart2point26 )
end
end
--Hitman 6 END-------------------------------------------------------------------------
--Hitman 7-------------------------------------------------------------------------
function MissionStart1point27(attacker)
if (attacker == getLocalPlayer ()) then
destroyElement(Target7Blip)
removeEventHandler( "onClientPedDamage", Target7, MissionStart1point27)
addEventHandler( "onClientPedWasted", Target7, HitBossDown7)
local ListyDoodle = math.random(#PedsXYZ)
local chat1 = math.random(#Chats)
outputChatBox(Chats[chat1][1],0,0,190)
outputChatBox("Wrog zostal oznaczony symbolem $. Za zabicie celu dostaniesz rank up!.",222,0,0)
if not (hitPerson7) or ( isPedDead ( hitPerson7 ) ) then
hitPerson7 = createPed ( math.random(9,162),PedsXYZ[ListyDoodle][1], PedsXYZ[ListyDoodle][2], PedsXYZ[ListyDoodle][3], 0.0 )
hitPerson7Blip = createBlipAttachedTo ( hitPerson7, 52, 4, 255, 255, 255, 255, 1, 99999 )
addEventHandler("onClientPedWasted", hitPerson7, HitDown17)
addEventHandler ( "onClientPedDamage", Target7, MissionStart2point27 )
addEventHandler ( "onClientPedDamage", hitPerson7, DefendTheHit7 )
end
end
end
function MissionStart2point27( attacker )
if (attacker == getLocalPlayer ()) then
local chat2 = math.random(#Chats2)
outputChatBox(Chats2[chat2][1],0,0,190)
removeEventHandler ( "onClientPedDamage", Target7, MissionStart2point27 )
end
end
function HitBossDown7( killer )
if (killer == getLocalPlayer ()) then
setTimer(function()
outputChatBox("Zabiles wlasnego bosa misji, ta misja jest aktualnie nie dostepna",255,0,0)
setTimer(function()
outputChatBox("Moja mafia Cie zabije..",255,0,0)
end, 2000, 1)
destroyElement(Target7)
destroyElement(hitPerson7Blip)
destroyElement(hitPerson7)
removeEventHandler("onClientPedWasted", hitPerson7, HitDown17)
setTimer(function()
local AngryWorkerChat1 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat1][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
setTimer(function()
local AngryWorkerChat2 = math.random(#AngryWorkerChat)
outputChatBox(AngryWorkerChat[AngryWorkerChat2][1],255,0,0)
triggerServerEvent ( "onKillBoss", resourceRoot,killer )
end, 10000,1)
end, 6000,1)
end, 1000,1)
end
end
function DefendTheHit7(attacker)
removeEventHandler ( "onClientPedDamage", hitPerson7, DefendTheHit7 )
triggerServerEvent ( "onDefense", resourceRoot, attacker )
end
function HitDown17( killer )
if (killer == getLocalPlayer ()) then
removeEventHandler("onClientPedWasted", hitPerson7, HitDown17)
destroyElement(hitPerson7Blip)
outputChatBox("Misja ukonczona, dostajesz +1 range",0,222,0)
triggerServerEvent ( "onPayPlayer", resourceRoot, killer )
removeEventHandler("onClientPedWasted", Target7, HitBossDown7)
Target7Blip = createBlipAttachedTo ( Target7, 59, 1, 255, 255, 255, 255, 1, 200 )
addEventHandler ( "onClientPedDamage", Target7, MissionStart1point27 )
removeEventHandler ( "onClientPedDamage", Target7, MissionStart2point27 )
end
end