#pvp toggle
1 messages · Page 1 of 1 (latest)
we arent here to give you scripts, we are here to teach you how to resolve your problem
do you want an admin using this command to enable/disable PVP for all players, or do you want each player to be able to opt-in individually?
And the first step is to always try creating something yourself and send us the code youre having issues with.
make a command that toggles a variable between true and false for each player
on damage, if pvp is off, cancel event
give me 2.99 usd first
lmfao shut up
{pvp} is one global variable, meaning its being shared across every player
so anyone with the perms is just toggling pvp for the entire server if it works
i dont think "pvp mode" exists though
you could put the variables into a list, making it independent for each player
you can put permission and permission message before the trigger in the command, I would recommend that
PvP isn't false by default
instead, check if {PvP::%player's uuid%} isnt set, then set it to true or delete it
that way, you use less variables
!format
:technologist: Code Blocks
To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:
```
Code here
```
:technologist: Code Blocks
To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:
```
Code here
```
that just makes your code look fancy so we can better see it and indentaion;
```on join:
set the join message to "%player% logged on"```
turns into
set the join message to "%player% logged on"```