Sniper / Gun
#1
Hello.
I broke up with Java and fell in love with Cuberite.Heart I didn't found a gun plugin, and so I decided to request. Maybe it is a little bit like the paintball plugin by NiLSPACE.

With a command it should be possible to get the weapon. (Maybe a hors armor with a different name.) If the weapon is choosen and you click right, than it should simulate to aim at the cursor. While pressing the right of the mouse it should lay efffects on the player, like night vision and it should zoom.
Clicking left should shoot. Maybe a very fast snowball or anything like that. Is it possible to detect a head shot? (Would be nice) The person should receive damage (dead at head shot).Tongue

Hmmm Undecided It sounds a bit voilent...

Sry for my horrible english,

Juli
Reply
Thanks given by:
#2
Hmmm since the ctrl zoom is client side AFAIK, you can't let the client zoom in without modifying. Fast snowballs, arrows, etc are possible, effects too. If you want it cruel, even blood splashing should be possible (lava drops instead of blood splashing around)
Reply
Thanks given by:
#3
It should be possible to do this. It's even pretty easy to detect if it's a headshot. Just detect if the height where the projectile hit is roughly the same height as the eyes of the player.
Reply
Thanks given by:
#4
Thx for the first answers!
First: I am peaceful -> no blood
I will write in short time when I have problems with writing the plugin myself...
Reply
Thanks given by:
#5
Okay...
I'm hanging... Given is the X, Y and Z-Position, but I don't know, how I can detect, if it hurts a player or an animal. Any ideas?
Reply
Thanks given by:
#6
Can you show us your code?
Reply
Thanks given by:
#7
There is no function for shooting yet. In spite: http://pastebin.com/pvrp4sRm

Just the begin...
Reply
Thanks given by:
#8
You need a cLineBlockTracer, that will tell you if a projectile hits an entity or a block. http://apidocs.cuberite.org/cLineBlockTracer.html
Reply
Thanks given by:
#9
Oh wait, cLineBlockTracer doesn't report entities. My bad. You'll need to check manually.
Reply
Thanks given by:
#10
No, you can just use the OnProjectileHitEntity hook: http://apidocs.cuberite.org/OnProjectileHitEntity.html
After that use cEntity:IsPlayer() to see if it was a player that was hit.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)