Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Tangonun popo kodu
- @outputs X Y Z Pos
- @persist X Y Z Killerpos:vector N:number
- #ifdef entity:plySpawn()
- #else
- error("This server does not have plycore installed, which this needs to work.")
- #endif
- if(first() | dupefinished()){
- runOnDeath(1)
- N = 0
- Murdered = 0
- function funcDeathCheck() {
- local Murdered = lastDeathAttacker(owner())
- if (!Murdered) {
- print("Died, but not murdered!")
- return
- }
- if (Murdered) {
- Killer = lastDeathAttacker(owner())
- Killerpos = Killer:pos()
- print("Murdered by: ", Killer)
- N = 1
- X = Killerpos:x()
- Y = Killerpos:y()
- Z = Killerpos:z() # 10 units above the ground surface
- print("DEBUG X: ", X)
- print("DEBUG Y: ", Y)
- print("DEBUG Z: ", Z)
- print("DEBUG N: ", N)
- timer("resetdeathstate", 500) # Trigger timer in 2 seconds from now, to reset N
- }
- } #END OF FUNCTION
- } #END OF FIRST
- if(!owner():isAlive()){
- funcDeathCheck()
- }
- if(clk("resetdeathstate")){
- N = 0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement