Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function movecamera()
- x, y, z = getElementPosition(camobj)
- th, tj, tk = getElementPosition(tarobj)
- setCameraMatrix(x, y, z, th, tj, tk)
- end
- function shotfunc()
- if alpha <= 255 and alpha > 0 then
- alpha = alpha - 1
- dxDrawText(text, 576, 544, 778, 601, tocolor(255, 200, 0, alpha), 2, "sans", "center", "top", false, false, false)
- end
- end
- addEventHandler("onClientRender", root, shotfunc)
- text = " "
- alpha = 0
- function goodguy1()
- dxDrawLine3D(th, tj, tk, th + (hx - th - (hx - th + 0.2)), tj + (hy - tj - (hy - tj + 0.2)), tk + (hz - tk - (hz - tk + 0.2)), tocolor(64, 64, 64, 255))
- end
- function goodguy2()
- dxDrawLine3D(tv, tb, tn, tv + (hx - tv - (hx - tv + 0.2)), tb + (hy - tb - (hy - tb + 0.2)), tn + (hz - tn - (hz - tn + 0.2)), tocolor(64, 64, 64, 255))
- end
- function movereciever()
- tv, tb, tn = getElementPosition(target)
- h, j, k = getElementPosition(localPlayer)
- setCameraMatrix(h + 5, j + 5, k + 5, tv, tb, tn)
- end
- function killcam(tz, tx, tc, hjx, hjy, hjz, bodypart, moving, reciever, weapon)
- setGameSpeed(0.05)
- camobj = createObject(327, tz + 2.5, tx + 2.5, tc + 2.5)
- tarobj = createObject(327, tz, tx, tc)
- setElementAlpha(camobj, 0)
- setElementAlpha(tarobj, 0)
- moveObject(camobj, 4000, hjx + 5, hjy + 5, hjz + 5)
- if bodypart == 9 then
- moveObject(tarobj, 5000, hjx, hjy, hjz + 1)
- else
- moveObject(tarobj, 5000, hjx, hjy, hjz)
- end
- hx = hjx
- hy = hjy
- hz = hjz
- addEventHandler("onClientRender", root, movecamera)
- addEventHandler("onClientRender", root, goodguy1)
- function killz()
- triggerServerEvent("onKillCamFinish", root, localPlayer, reciever, weapon)
- fxAddBlood(hjx, hjy, hjz, 0, 0, 0, 5, 1)
- removeEventHandler("onClientRender", root, goodguy1)
- setGameSpeed(0.2)
- end
- setTimer(killz, 5000, 1)
- if bodypart == 3 then
- if moving then
- text = "MOVING KILL"
- else
- text = "KILL"
- end
- elseif bodypart == 4 then
- if moving then
- text = "MOVING TESTICLE SHOOT"
- else
- text = "TESTICLE SHOT"
- end
- elseif bodypart == 9 then
- if moving then
- text = "MOVING HEADSHOT"
- else
- text = "HEADSHOT"
- end
- end
- function setnormalcam()
- removeEventHandler("onClientRender", root, movecamera)
- setCameraTarget(localPlayer)
- destroyElement(camobj)
- setGameSpeed(1)
- alpha = 255
- end
- setTimer(setnormalcam, 6000, 1)
- end
- addEvent("onSniperHeadshot", true)
- addEventHandler("onSniperHeadshot", root, killcam)
- function recievehs(shx, shy, shz, hitx, hity, hitz)
- setGameSpeed(0.05)
- target = createObject(327, shx, shy, shz)
- setElementAlpha(target, 0)
- moveObject(target, 5000, hitx, hity, hitz)
- hx = hitx
- hy = hity
- hz = hitz
- addEventHandler("onClientRender", root, movereciever)
- addEventHandler("onClientRender", root, goodguy2)
- function gods()
- removeEventHandler("onClientRender", root, goodguy2)
- setGameSpeed(0.2)
- end
- setTimer(gods, 5000, 1)
- function endcam()
- removeEventHandler("onClientRender", root, movereciever)
- destroyElement(target)
- setCameraTarget(localPlayer)
- setGameSpeed(1)
- end
- setTimer(endcam, 6000, 1)
- end
- addEvent("onRecieveSniperHeadshot", true)
- addEventHandler("onRecieveSniperHeadshot", root, recievehs)
- function bloodhead(weapon, ammo, ammoclip, hx, hy, hz, hitelement, sx, sy, sz)
- if weapon == 34 then
- a = hx
- s = hy
- d = hz
- function bloods()
- fxAddBlood(a, s, d, 0, 0, 0, 5, 1)
- end
- setTimer(fxAddBlood, 3500, 1)
- end
- end
- addEventHandler("onClientWeaponFire", root, bloodhead)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement