Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin1="MI-6|NanoBob[SS]"
- admin2="MI-6|Ranger[L]"
- admin3="MI-6|El_Kebeer[VL]"
- admin4="MI-6|NextRom[CoS]"
- --admin5=""
- --admin6=""
- --admin7=""
- -- to add an admin remove the "--" before "admin[number]" and write the name behind the =
- --MI6 base
- " MI.6 ")
- copcar2=createVehicle(598,1249,-1823.5,13.2,0,0,0," MI.6 ")
- copcar3=createVehicle(598,1254.5,-1823.5,13.2,0,0,0," MI.6 ")
- copcar4=createVehicle(598,1259.59998,-1823.5,13.2,0,0,0," MI.6 ")
- sgt=createVehicle(506,1265.30005,-1822.5,13.2,0,0,0," MI.6 ")
- huntley=createVehicle(579,1269.30005,-1822.5,13.2,0,0,0," MI.6 ")
- beagle=createVehicle(511,1194.59998,-1799.90002,35.4,0,0,-90)
- maverick1=createVehicle(497,1264,-1789,33.71,0,0,90)
- maverick2=createVehicle(497,1264,-1748,33.71,0,0,90)
- setVehicleColor(copcar1,240,240,240,240,240,240)
- setVehicleColor(copcar2,240,240,240,240,240,240)
- setVehicleColor(copcar3,240,240,240,240,240,240)
- setVehicleColor(copcar4,240,240,240,240,240,240)
- setVehicleColor(sgt,240,240,240,240,240,240)
- setVehicleColor(huntley,240,240,240,240,240,240)
- setVehicleColor(beagle,240,240,240,240,240,240)
- setVehicleColor(maverick1,240,240,240,240,240,240)
- setVehicleColor(maverick2,240,240,240,240,240,240)
- end
- function respawnvehs(source)
- sourcename=getPlayerNametagText(source)
- if sourcename==admin1 or sourcename==admin2 or sourcename==admin3 or sourcename==admin4 or sourcename==admin5 or sourcename==admin6 then
- destroyElement(copcar1)
- destroyElement(copcar2)
- destroyElement(copcar3)
- destroyElement(copcar4)
- destroyElement(sgt)
- destroyElement(huntley)
- destroyElement(beagle)
- destroyElement(maverick1)
- destroyElement(maverick2)
- setTimer(vehcreate,1000,1)
- end
- end
- addCommandHandler("respawnvehicles",respawnvehs)
- gate1=createObject(980,1172.2,-1805.3,15.2,0,0,0)
- gate2=createObject(980,1183.9,-1787.8000488281,15.2)
- weaponlockerdoor=createObject(2634,1317.1999511719,-1825.4000244141,-99)
- marker1=createMarker(1219,-1812.2,17.60000038147,"arrow",2)
- marker2=createMarker(1237,-1783.7,34.9,"arrow",2)
- marker3=createMarker(1211,-1750,15.6,"arrow",2)
- marker4=createMarker(1296.3000488281,-1783.1999511719,-67.699996948242,"arrow",2)
- gate1col=createColSphere(1172.2,-1805.3,15.2,8)
- gate2col=createColSphere(1183.9,-1787.8000488281,15.2,8)
- marker1col=createColSphere(1219,-1812.2,16.60000038147,1)
- marker2col=createColSphere(1237,-1783.7,33.9,1)
- marker3col=createColSphere(1211,-1750,13.1,1)
- marker4col=createColSphere(1296.3000488281,-1783.1999511719,-69.699996948242,1)
- paramarker=createMarker(1247.9398193359,-1772.3311767578,32.651016235352,"cylinder",2,0,153,255)
- paramarkercol=createColSphere(1247.9398193359,-1772.3311767578,33.651016235352,2)
- intgate=createObject(2930,1209.3,-1750.1,15.,0,0,44.9)
- heligate=createObject(2930,1232.4,-1786.9,35.3,0,0,90)
- frontgate=createObject(2930,1195.64,-1747.25,15.1)
- intgatecol=createColSphere(1209.3,-1750.1,15,3)
- heligatecol=createColSphere(1232.4,-1786.9,35.3,3)
- frontgatecol=createColSphere(1195.64,-1747.25,15.1,3)
- killmarker=createMarker(-383.15,2304.33,35.12,"cylinder",2,0,0,0)
- killmarkercol=createColSphere(-383.15,2304.33,36.12,2)
- function killfunction()
- explosionx,explosiony,explosionz=getElementPosition(source)
- createExplosion(explosionx,explosiony,explosionz,10)
- createExplosion(explosionx,explosiony,explosionz,10)
- createExplosion(explosionx,explosiony,explosionz,10)
- end
- addEventHandler("onColShapeHit",killmarkercol,killfunction)
- keypad1=createColSphere(1320.0999755859,-1825.4000244141,-98.7,2)
- keypad2=createColSphere(1318.9000244141,-1826,-98.69999694824,2)
- setElementDoubleSided(gate1,true)
- setElementDoubleSided(gate2,true)
- function openintgate()
- moveObject(intgate,1000,1209.3,-1750.1,12.6)
- end
- function closeintgate()
- moveObject(intgate,1000,1209.3,-1750.1,15)
- end
- function openfrontgate()
- moveObject(frontgate,1000,1195.64,-1748.75,15.1)
- end
- function closefrontgate()
- moveObject(frontgate,1000,1195.64,-1747.25,15.1)
- end
- function opengate1()
- moveObject(gate1,1000,1172.2,-1805.3,20.2)
- end
- function closegate1()
- moveObject(gate1,5000,1172.2,-1805.3,15.2)
- end
- function opengate2()
- moveObject(gate2,1000,1183.9,-1787.8000488281,20.2)
- end
- function closegate2()
- moveObject(gate2,5000,1183.9,-1787.8000488281,15.2)
- end
- function openheligate()
- moveObject(heligate,1000,1232.4,-1786.9,37.8)
- end
- function closeheligate()
- moveObject(heligate,1000,1232.4,-1786.9,35.3)
- end
- function marker1go(source)
- setTimer(function()setElementPosition(source,1237,-1786,33.9)end,1050,1)
- setTimer(fadeblack,50,1,source)
- end
- function marker2go(source)
- setTimer(function()setElementPosition(source,1223,-1812.2,16.60000038147)end,1050,1)
- setTimer(fadeblack,50,1,source)
- end
- function marker3go(source)
- setTimer(function()setElementPosition(source,1292.3000488281,-1783.1999511719,-69.699996948242)end,1050,1)
- setTimer(fadeblack,50,1,source)
- end
- function marker4go(source)
- setTimer(function()setElementPosition(source,1209,-1751,13.6)end,1050,1)
- setTimer(fadeblack,50,1,source)
- end
- function weaponlockerdooropen()
- moveObject(weaponlockerdoor,10000,1316.3000488281,-1824.4000244141,-99,0,0,45)
- setTimer(weaponlockerdoorclose,20000,1)
- end
- function weaponlockerdoorclose()
- moveObject(weaponlockerdoor,10000,1317.1999511719,-1825.4000244141,-99,0,0,-45)
- end
- addEventHandler("onColShapeHit",intgatecol,openintgate)
- addEventHandler("onColShapeHit",heligatecol,openheligate)
- addEventHandler("onColShapeHit",frontgatecol,openfrontgate)
- addEventHandler("onColShapeLeave",intgatecol,closeintgate)
- addEventHandler("onColShapeLeave",heligatecol,closeheligate)
- addEventHandler("onColShapeLeave",frontgatecol,closefrontgate)
- addEventHandler("onColShapeHit",marker1col,marker1go)
- addEventHandler("onColShapeHit",marker2col,marker2go)
- addEventHandler("onColShapeHit",marker3col,marker3go)
- addEventHandler("onColShapeHit",marker4col,marker4go)
- addEventHandler("onColShapeHit",keypad1,weaponlockerdooropen)
- addEventHandler("onColShapeHit",keypad2,weaponlockerdooropen)
- addEventHandler("onColShapeHit",gate1col,opengate1)
- addEventHandler("onColShapeHit",gate2col,opengate2)
- addEventHandler("onColShapeLeave",gate1col,closegate1)
- addEventHandler("onColShapeLeave",gate2col,closegate2)
- addCommandHandler("noobbase",creation)
- -- /MI6 base
- -- nocloud
- function clouds()
- setCloudsEnabled(false)
- end
- addEventHandler ("onResourceStart",getRootElement(),clouds)
- -- /nocloud
- -- weapons
- -- no minigun
- function checkweap(previousWeaponID,currentWeaponID,weapon)
- if currentWeaponID==38 then
- takeWeapon(source,38)
- outputChatBox("#ff0000 NO MINIGUN!",source,0,0,0,true)
- end
- end
- function checkweapfired(weapon,ammo,ammoInClip,hitX, hitY, hitZ,hitElement,firerer)
- if weapon==38 then
- takeWeapon(source,38)
- outputChatBox("#ff0000 NO MINIGUN!",source,0,0,0,true)
- end
- end
- function shotgunslow(hitElement,firerer)
- if getElementType(hitElement)=="player" and shotgunenable~="false" then
- shotgunenable="false"
- setTimer(function()
- shotgunenable="true"
- end
- ,5000,1)
- if (getPlayerTeam(firerer) == cop) and (getPlayerTeam(hitElement) == crim) then
- outputChatBox("You have succesfully hit a criminal with rubber bullets",firerer,200,200,200)
- outputChatBox("You were hit by rubber bullets, you are hurt for 4 seconds",hitElement,200,200,200)
- toggleControl(hitElement,"sprint",false)
- setTimer(function()
- toggleControl(hitElement,"sprint",true)
- end
- ,4000,1)
- end
- end
- end
- addEvent("shotgunfire",true)
- addEventHandler("shotgunfire",getRootElement(),shotgunslow)
- addEvent("checkweaponfired",true)
- addEventHandler("checkweaponfired",getRootElement(),checkweapfired)
- addEventHandler("onPlayerWeaponSwitch",getRootElement(),checkweap)
- -- /no minigun
- --explosive M4
- function M4createexplosion(hitX,hitY,hitZ)
- createExplosion(hitX,hitY,hitZ,12)
- laserfire="yes"
- setTimer(function()
- laserfire="no"
- end,1000,1,1)
- end
- addEvent("M4explosion",true)
- addEventHandler("M4explosion",getRootElement(),M4createexplosion)
- function M4createexplosionOP(hitX,hitY,hitZ,shooter,gun)
- createExplosion(hitX,hitY,hitZ,7)
- createExplosion(hitX,hitY,hitZ,7)
- createExplosion(hitX,hitY,hitZ,7)
- setWeaponAmmo(shooter,31,15000,ammoInClip+1)
- end
- addEvent("M4explosionOP",true)
- addEventHandler("M4explosionOP",getRootElement(),M4createexplosion)
- function takeawaynade(creator)
- takeWeapon(creator,16)
- if messageenabled~="no" then
- outputChatBox("you can throw another nade in 10 seconds!",creator)
- messageenabled="no"
- setTimer(function() messageenabled="yes" end ,500,1)
- end
- setTimer(function() giveWeapon(creator,16,666) end ,10000,1)
- end
- addEvent("removenades",true)
- addEventHandler("removenades",getRootElement(),takeawaynade)
- -- /explosive M4
- -- /weapons
- -- spawn
- function wait()
- setTimer(spawn,5000,1,source)
- setTimer(fadeblack,4050,1,source)
- end
- function spawn(source)
- spawnPlayer(source,1222,-1814,16.59)
- setPlayerTeam(source,MI6)
- fadeCamera(source,true)
- setCameraTarget(source,source)
- player=source
- setTimer(skin,50,1,player)
- end
- function skin(player)
- setElementInterior(player,0)
- setElementModel(player,163)
- createBlipAttachedTo (player,0, 2,0,153,255)
- setPlayerBlurLevel(player,0)
- end
- -- team()
- MI6=createTeam("MI6",0,153,255)
- crim=createTeam("crim",255,0,0)
- cop=createTeam("cop",0,0,255)
- redGT=createTeam("redGT",255,0,0)
- blueGT=createTeam("blueGT",0,0,255)
- -- end
- function welcome()
- spawnPlayer(source,1222,-1814,16.59)
- setPlayerBlurLevel(source,0)
- setPlayerTeam(source,MI6)
- outputChatBox("#f0f0f0Welcome to the#0099ff MI6 #f0f0f0training server", source,255,255,255,true)
- outputChatBox("scripts by NanoBob", source,255,255,255,true)
- setElementModel(source,163)
- createBlipAttachedTo (source,0, 2,0,153,255)
- fadeCamera(source,true)
- setCameraTarget(source,source)
- setPlayerTeam(source,MI6)
- setPlayerNametagColor(source,false)
- bindKey(source,"r","down","reload")
- fadeCamera(source,false,0)
- triggerClientEvent(source,"joint",getRootElement())
- end
- addEventHandler("onPlayerJoin",getRootElement(),welcome)
- addEventHandler("onPlayerWasted",getRootElement(),wait)
- -- /spawn
- -- Para test
- function win(source)
- name=getPlayerNametagText(source)
- outputChatBox(name.." landed on 35")
- end
- function middlecolmaker()
- middlecol=createColSphere(1245.4825,-1762.848266,33.6486,0.7)
- addEventHandler("onColShapeHit",middlecol,win)
- end
- function startparatest(source)
- sourcename=getPlayerNametagText(source)
- if sourcename==admin1 or sourcename==admin2 or sourcename==admin3 or sourcename==admin4 or sourcename==admin5 or sourcename==admin6 then
- allyoarses=getElementsByType( "player" )
- outputChatBox("Parachuting test started")
- for theKey,thePlayer in ipairs(allyoarses) do
- setElementPosition(thePlayer,1265.0999755859,-1691.5999755859,1030)
- giveWeapon(thePlayer,46,1,true)
- end
- end
- end
- addCommandHandler("paratest",startparatest)
- function markerparatest(source)
- thePlayer=source
- setTimer(function()setElementPosition(thePlayer,1265.0999755859,-1691.5999755859,1030)
- giveWeapon(thePlayer,46,1,true)end,1050,1)
- setTimer(fadeblack,50,1,source)
- end
- addEventHandler("onColShapeHit",paramarkercol,markerparatest)
- addCommandHandler("wincol",middlecolmaker)
- -- /Para test
- -- extra
- function carlock(source)
- vehfromplayer=getPedOccupiedVehicle(source)
- locked=isVehicleLocked(vehfromplayer)
- if locked then
- setVehicleLocked(vehfromplayer,false)
- outputChatBox("Unlocked your vehicle",source,0,255,0)
- else
- setVehicleLocked(vehfromplayer,true)
- outputChatBox("locked your vehicle",source,0,255,0)
- end
- end
- addCommandHandler("lock",carlock)
- function countdown(player,command,arg1)
- number=arg1
- function compare(nubmer)
- if number ~= 0 then
- outputChatBox(number)
- number=number-1
- setTimer(compare,1000,1,number)
- elseif number==0 then
- outputChatBox("go!")
- number=nil
- removeEventHandler("runf1",getRootElement(),compare)
- end
- end
- addEvent("runf1",false)
- addEventHandler("runf1",getRootElement(),compare)
- triggerEvent("runf1",getRootElement())
- end
- addCommandHandler("countdown",countdown)
- function reloadfunc(source)
- reloadPedWeapon(source)
- unbindKey(source,"r","down","reload")
- bindKey(source,"r","down","reload")
- end
- addCommandHandler("reload",reloadfunc)
- function dfunc()
- destroyElement(getRootElement())
- end
- addCommandHandler("destroy",dfunc)
- -- arrest stuff
- function crimskin(source)
- crimskinnum=math.random(19,23)
- setElementModel(source,crimskinnum)
- whichshotgunuwant=math.random(26,27)
- giveWeapon(source,whichshotgunuwant,9000)
- giveWeapon(source,28,9000)
- giveWeapon(source,31,9000)
- giveWeapon(source,16,666)
- giveWeapon(source,24,9000)
- giveWeapon(source,34,2500)
- giveWeapon(source,46,1)
- setPlayerTeam(source,crim)
- createBlipAttachedTo (source,0, 2,255,0,0)
- outputChatBox(" Do not move. Only start moving on 3 in the countdown.",source,200,200,200)
- outputChatBox(" Only start shooting after [go]",source,200,200,200)
- if setcoords=="false" then
- setElementPosition(source,tpx,tpy,tpz)
- elseif setcoords~="false" then
- setcoords="false"
- setTimer(function() setcoords="true" end ,30000,1)
- whichcoords=math.random(1,12)
- if whichcoords== 1 then
- tpx,tpy,tpz=1920,-1203,19.9
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 2 then
- tpx,tpy,tpz=2167,-981,75.3
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 3 then
- tpx,tpy,tpz=2604,-1209,65
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 4 then
- tpx,tpy,tpz=2770,-1508,39.7
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 5 then
- tpx,tpy,tpz=1111,1646,5.82
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 6 then
- tpx,tpy,tpz=-2328,-1634,483.7
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 7 then
- tpx,tpy,tpz=-2681,1770,68.4
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 8 then
- tpx,tpy,tpz=-2429,1265,35.4
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 9 then
- tpx,tpy,tpz=-1922,1000,35
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 10 then
- tpx,tpy,tpz=1076,2317,10.8
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 11 then
- tpx,tpy,tpz=2346,-2005,13.5
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 12 then
- tpx,tpy,tpz=1542,-1353,329
- setElementPosition(source,tpx,tpy,tpz)
- end
- end
- end
- function copskin(source)
- copskinnum=math.random(280,286)
- setElementModel(source,copskinnum)
- createBlipAttachedTo (source,0, 2,0,0,255)
- outputChatBox(" Do not move. Only start moving on [Go] after the countdown.",source,200,200,200)
- giveWeapon(source,25,15000)
- giveWeapon(source,41,5000)
- giveWeapon(source,46,1)
- if setcoords=="false" then
- setElementPosition(source,tpx,tpy,tpz)
- elseif setcoords~="false" then
- setcoords="false"
- setTimer(function() setcoords="true" end ,30000,1)
- whichcoords=math.random(1,12)
- if whichcoords== 1 then
- tpx,tpy,tpz=1920,-1203,19.9
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 2 then
- tpx,tpy,tpz=2167,-981,75.3
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 3 then
- tpx,tpy,tpz=2604,-1209,65
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 4 then
- tpx,tpy,tpz=2770,-1508,39.7
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 5 then
- tpx,tpy,tpz=1111,1646,5.82
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 6 then
- tpx,tpy,tpz=-2328,-1634,483.7
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 7 then
- tpx,tpy,tpz=-2681,1770,68.4
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 8 then
- tpx,tpy,tpz=-2429,1265,35.4
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 9 then
- tpx,tpy,tpz=-1922,1000,35
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 10 then
- tpx,tpy,tpz=1076,2317,10.8
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 11 then
- tpx,tpy,tpz=2346,-2005,13.5
- setElementPosition(source,tpx,tpy,tpz)
- elseif whichcoords== 12 then
- tpx,tpy,tpz=1542,-1353,329
- setElementPosition(source,tpx,tpy,tpz)
- end
- end
- end
- function tpcrim(source)
- takeAllWeapons(source)
- crimplayer=getPlayerNametagText(source)
- outputChatBox("#ff0000"..crimplayer.."#f0f0f0 Joined the #ff0000criminals",getRootElement(),0,0,0,true)
- setPlayerTeam(source,crim)
- setTimer(fadeblack,50,1,source)
- setTimer(crimskin,1050,1,source)
- end
- function tpcop(source)
- takeAllWeapons(source)
- copplayer=getPlayerNametagText(source)
- outputChatBox("#0000ff"..copplayer.."#f0f0f0 Joined the #0000ffcops",getRootElement(),0,0,0,true)
- setPlayerTeam(source,cop)
- giveWeapon(source,23,500)
- giveWeapon(source,3,1)
- setTimer(fadeblack,50,1,source)
- setTimer(copskin,1050,1,source)
- end
- createMarker(1276.21,-1787.29,12.7,"cylinder",2,0,0,255)
- createMarker(1270.24,-1787.29,12.7,"cylinder",2,255,0,0)
- crimcolsphere=createColSphere(1270.24,-1787.29,12.7,2)
- copcolsphere=createColSphere(1276.21,-1787.29,12.7,2)
- addEventHandler("onColShapeHit",crimcolsphere,tpcrim)
- addEventHandler("onColShapeHit",copcolsphere,tpcop)
- function meeleearrester(attacker,hitted)
- if (hitted ~= nil) then
- if getElementType ( hitted ) == "player" then
- if (getPlayerTeam(hitted) == crim) then
- if (getPlayerTeam(attacker) == cop) then
- arrester=getPlayerNametagText(attacker)
- arrested=getPlayerNametagText(hitted)
- willIarrest=math.random(1,2)
- if willIarrest==2 then
- if arrestmessageenabled~="no" then
- outputChatBox("#ff0000"..arrested.."#f0f0f0 has been arrested by #0000ff"..arrester,getRootElement(),255,255,255,true)
- messageenabled="no"
- setPlayerTeam(hitted,MI6)
- setElementModel(hitted,163)
- takeAllWeapons(hitted)
- setElementHealth(hitted,100)
- createBlipAttachedTo (hitted,0, 2,0,153,255)
- setTimer(function() arrestmessageenabled="yes" end ,500,1)
- end
- setElementPosition(hitted,1283.66,-1838.588,13.72)
- end
- end
- end
- end
- end
- end
- addEvent("meeleearrest",true)
- addEventHandler("meeleearrest",getRootElement(),meeleearrester)
- function stickarrester(attacker,hitted)
- if (hitted ~= nil) then
- if getElementType ( hitted ) == "player" then
- if (getPlayerTeam(hitted) == crim) then
- if (getPlayerTeam(attacker) == cop) then
- willIarrest=math.random(1,5)
- if willIarrest==2 then
- arrester=getPlayerNametagText(attacker)
- arrested=getPlayerNametagText(hitted)
- if arrestmessageenabled~="no" then
- outputChatBox("#ff0000"..arrested.."#f0f0f0 has been arrested by #0000ff"..arrester,getRootElement(),255,255,255,true)
- messageenabled="no"
- setPlayerTeam(hitted,MI6)
- setElementModel(hitted,163)
- takeAllWeapons(hitted)
- setElementHealth(hitted,100)
- createBlipAttachedTo (hitted,0, 2,0,153,255)
- setTimer(function() arrestmessageenabled="yes" end ,500,1)
- end
- setElementPosition(hitted,1283.66,-1838.588,13.72)
- end
- end
- end
- end
- end
- end
- addEvent("stickarrest",true)
- addEventHandler("stickarrest",getRootElement(),stickarrester)
- -- /arrest stuff
- -- Gt warps
- function redskin(source)
- takeAllWeapons(source)
- setElementPosition(source,-424.05,2240.87,42.42)
- setPlayerTeam(source,redGT)
- setElementModel(source,167)
- giveWeapon(source,31,9000)
- createBlipAttachedTo (source,0, 2,255,0,0)
- outputChatBox("Take your position. Only start shooting at the countdown. Listen to the top ranked MI6 member to know the rules for this match.",source,200,200,200)
- end
- function blueskin(source)
- takeAllWeapons(source)
- setElementPosition(source,-360.18,2246.64,42.48)
- setPlayerTeam(source,blueGT)
- setElementModel(source,287)
- giveWeapon(source,31,9000)
- createBlipAttachedTo (source,0, 2,0,0,255)
- outputChatBox("Take your position. Only start shooting at the countdown. Listen to the top ranked MI6 member to know the rules for this match.",source,200,200,200)
- end
- function tpredGT(source)
- giveWeapon(source,31,4000)
- setTimer(fadeblack,50,1,source)
- setTimer(redskin,1050,1,source)
- end
- function tpblueGT(source)
- giveWeapon(source,31,4000)
- setTimer(fadeblack,50,1,source)
- setTimer(blueskin,1050,1,source)
- end
- createMarker(1261.41,-1790.97,12.7,"cylinder",2,255,0,0)
- createMarker(1265.70,-1790.97,12.7,"cylinder",2,0,0,255)
- redGTcol=createColSphere(1261.38,-1790.97,13.40,2)
- blueGTcol=createColSphere(1265.70,-1790.97,13.40,2)
- addEventHandler("onColShapeHit",redGTcol,tpredGT)
- addEventHandler("onColShapeHit",blueGTcol,tpblueGT)
- -- /Gt warps
- function fadeblack(source)
- fadeCamera(source,false,1,0,0,0)
- setTimer(fadeback,1000,1,source)
- end
- function fadeback(source)
- fadeCamera(source,true,2)
- end
- function regroup(source)
- sourcename=getPlayerNametagText(source)
- if sourcename==admin1 or sourcename==admin2 or sourcename==admin3 or sourcename==admin4 or sourcename==admin5 or sourcename==admin6 then
- allyoarses=getElementsByType( "player" )
- outputChatBox("Regrouped players!")
- for theKey,thePlayer in ipairs(allyoarses) do
- setElementHealth(thePlayer,100)
- takeAllWeapons(thePlayer)
- setElementModel(thePlayer,163)
- setPlayerTeam(thePlayer,MI6)
- setElementPosition(thePlayer,1213.06,-1840.27,13.38)
- createBlipAttachedTo (thePlayer,0, 2,0,153,255)
- end
- end
- end
- addCommandHandler("regroup",regroup)
- --settings
- setWeaponProperty(23,"std","maximum_clip_ammo",1)
- setWeaponProperty(23,"pro","maximum_clip_ammo",1)
- setWeaponProperty(23,"poor","maximum_clip_ammo",1)
- setWeaponProperty(23,"std","damage",1)
- setWeaponProperty(23,"pro","damage",1)
- setWeaponProperty(23,"poor","damage",1)
- setWeaponProperty(23,"std","weapon_range",5)
- setWeaponProperty(23,"pro","weapon_range",5)
- setWeaponProperty(23,"poor","weapon_range",5)
- setWeaponProperty(25,"pro","damage",1)
- --settings
- function ped (source)
- pedid=math.random(1,299)
- px,py,pz=getElementPosition(source)
- createPed(pedid,px,py-8,pz)
- end
- addCommandHandler("ped", ped)
- -- blips stuff
- function onPlayerQuit ()
- destroyBlipsAttachedTo ( source )
- end
- function onPlayerWasted ( totalammo, killer, killerweapon )
- destroyBlipsAttachedTo ( source )
- end
- addEventHandler ( "onPlayerWasted", getRootElement(), onPlayerWasted )
- addEventHandler ( "onPlayerQuit", getRootElement(), onPlayerQuit )
- function removeblips(source)
- sourcename=getPlayerNametagText(source)
- if sourcename==admin1 or sourcename==admin2 or sourcename==admin3 or sourcename==admin4 or sourcename==admin5 or sourcename==admin6 then
- allplayers=getElementsByType( "player" )
- for theKey,player in ipairs(allplayers) do
- destroyBlipsAttachedTo(player)
- end
- end
- end
- addCommandHandler("blip",removeblips)
- function destroyBlipsAttachedTo(player)
- local attached = getAttachedElements ( player )
- if ( attached ) then
- for k,element in ipairs(attached) do
- if getElementType ( element ) == "blip" then
- destroyElement ( element )
- end
- end
- end
- end
- function copcarmaker(source)
- sourcename=getPlayerNametagText(source)
- if sourcename==admin1 or sourcename==admin2 or sourcename==admin3 or sourcename==admin4 or sourcename==admin5 or sourcename==admin6 then
- carx,cary,carz=getElementPosition(source)
- rot1,rot2,rot3=getElementRotation(source)
- copcar=createVehicle(596,carx,cary,carz,rot1,rot2,rot3," MI.6 ")
- warpPedIntoVehicle(source,copcar)
- setVehicleHandling(copcar,"maxVeolocity",205)
- setVehicleHandling(copcar,"numberOfGears",5)
- setVehicleHandling(copcar,"driveType","awd")
- setVehicleHandling(copcar,"engineType",petrol)
- setVehicleHandling(copcar,"engineAcceleration",19)
- setVehicleHandling(copcar,"brakeBias",0.9)
- end
- end
- function crimcarmaker(source)
- sourcename=getPlayerNametagText(source)
- if sourcename==admin1 or sourcename==admin2 or sourcename==admin3 or sourcename==admin4 or sourcename==admin5 or sourcename==admin6 then
- carx,cary,carz=getElementPosition(source)
- rot1,rot2,rot3=getElementRotation(source)
- crimcar=createVehicle(560,carx,cary,carz,rot1,rot2,rot3,"criminal")
- warpPedIntoVehicle(source,crimcar)
- setVehicleHandling(crimcar,"maxVeolocity",205)
- setVehicleHandling(crimcar,"numberOfGears",5)
- setVehicleHandling(crimcar,"driveType","awd")
- setVehicleHandling(crimcar,"engineType",petrol)
- setVehicleHandling(crimcar,"engineAcceleration",21)
- setVehicleHandling(crimcar,"brakeBias",0.9)
- end
- end
- function criminalcarmaker(source)
- sourcename=getPlayerNametagText(source)
- if sourcename==admin1 or sourcename==admin2 or sourcename==admin3 or sourcename==admin4 or sourcename==admin5 or sourcename==admin6 then
- carx,cary,carz=getElementPosition(source)
- rot1,rot2,rot3=getElementRotation(source)
- criminalcar=createVehicle(560,carx,cary,carz,rot1,rot2,rot3,"criminal")
- warpPedIntoVehile(source,criminalcar)
- setVehicleHandling(criminalcar,"maxVeolocity",205)
- setVehicleHandling(criminalcar,"numberOfGears",5)
- setVehicleHandling(criminalcar,"driveType","awd")
- setVehicleHandling(criminalcar,"engineType",petrol)
- setVehicleHandling(criminalcar,"engineAcceleration",21)
- setVehicleHandling(criminalcar,"brakeBias",0.9)
- end
- end
- function policecarmaker(source)
- carx,cary,carz=getElementPosition(source)
- rot1,rot2,rot3=getElementRotation(source)
- policeveh=createVehicle(596,carx,cary,carz,rot1,rot2,rot3," MI.6 ")
- setVehicleHandling(policeveh,"maxVelocity",205)
- setVehicleHandling(policeveh,"numberOfGears",5)
- setVehicleHandling(policeveh,"driveType","awd")
- setVehicleHandling(policeveh,"engineType",petrol)
- setVehicleHandling(policeveh,"engineAcceleration",19)
- setVehicleHandling(policeveh,"brakeBias",0.9)
- end
- addCommandHandler("criminalcar",criminalcarmaker)
- addCommandHandler("crimcar",crimcarmaker)
- addCommandHandler("policecar",policecarmaker)
- addCommandHandler("copcar",copcarmaker)
- -- /blip stuff
- function bluroff(source)
- setPlayerBlurLevel(source,0)
- outputChatBox("disabled your motion blur",source,200,200,200)
- end
- addCommandHandler("noblur",bluroff)
- function sendmes()
- triggerClientEvent("metal")
- end
- addCommandHandler("\m/",sendmes)
- --/ extra
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement