Deadly Water Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

bob

Member
May 29, 2020
1
0
0
23
Hi everyone, I am trying to make a plugin that kills the player when they touch water or move in/on water.
Here is the command I have:

on walking on water:
execute console command "/kill %players%" if player is not op

I also tried

on walking on water:
kill the player if player is not op



What I expected/want it to do:
I wanted my plugin to only kill the specified player that falls in the water. If random guy falls into the water it will only kill him, because he was the one who fell in. Also, I want all people who are opped to be exempt from this plugin.

What it actually did:
I had my friend come on my server and test it out. I opped myself and fell into the water and I did not die. My friend starting dying repeatedly until I got out of the water. I then deoped myself then fell into the water and this time died in the water, when I was in the water though, my friend again starting dying continuously, until I re-spawned and was on land.


Thank you so much
[doublepost=1590714914,1590714717][/doublepost]also for some reason the tabs did not show up in my post, but i have made sure to intent the lines appropriately for the command to not show any errors.
 
Code:
on any move:
    if block at player is water:
        if player is not op:
            kill the player
And for the tabs thing, there's a "+" button at top which you can create code blocks.
 
Status
Not open for further replies.