Idk why can't attack.

  • 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.

NkoRikusen

Member
Jan 26, 2017
16
0
1
34
Japan Hokkaido
i tried this code, and i cant attack player.
please tell me why we cant attack player.

Skript Version: Skript 2.3 (beta?)
Skript Author: forgot. i'm sorry.
Minecraft Version: 1.10.2
---
Full Code:
here: https://hastebin.com/pasutasuba.vbs

Errors on Reload:

No Errors


Other Useful Info:
Addons using (including versions):
Nothing.

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I have tried search and fix code, but doesn't work.

(edited.)
 
Last edited:
i tried this code, and i cant attack player on standing in adventure.
can you tell me why we cant attack player.
code_language.skript:
on damage of a player:
    if attacker's gamemode is creative:
        stop
if you want to cancel players that have creative attack others you have too use:
code_language.skript:
on damage of a player:
    if attacker's gamemode is creative:
        cancel event
 
code_language.skript:
on damage:
    attacker is a player
    victim is a player
    "%gamemode of attacker%" = "creative":
        cancel the event

If someone wants to attack anybody while he is in gamemode, the system will cancel it.
Every other gamemode should be allowed to attack someone.
 
code_language.skript:
on damage:
    attacker is a player
    victim is a player
    "%gamemode of attacker%" = "creative":
        cancel the event

If someone wants to attack anybody while he is in gamemode, the system will cancel it.
Every other gamemode should be allowed to attack someone.
i tried it, but i cant give damage to them :emoji_frowning:
 
Are you sure it isn't an external plugin conflicting? Maybe WorldGuard, pvp not enabled in server.properties, something else?
hmm, i see config and server.properties, pvp was on.
[doublepost=1486638830,1486638715][/doublepost]
Please explain again what you want to achieve in clear english.

Edit: And please use this format: https://forums.skunity.com/wiki/help-request-layout/
thanks. i edtied the thread.
and i cant speak clear english because my english is bad, and im learning. sorry.
 
hmm, i see config and server.properties, pvp was on.
[doublepost=1486638830,1486638715][/doublepost]
thanks. i edtied the thread.
and i cant speak clear english because my english is bad, and im learning. sorry.
So the problem is that the player's can't damage any one? And you want to only allow players in creative to not deal damage? If so usin every damage be cancelled because this code:
code_language.skript:
attacker is a player
    "%gamemode of attacker%" = "creative":
        cancel the event

    if {duel.attack::%attacker%} is 1:
        cancel the event

    else:
        cancel event
This will cause every damage to be cancelled.
 
Status
Not open for further replies.