#one time usable command problem

1 messages · Page 1 of 1 (latest)

mental mural
#

If someone can help me to rewrite it to be good

#
        if {server::command::gradess::%player%} is not set:
            set {server::command::gradess::%player%} to "Vous avez déjà le grade"       
        else if {playtime.%player%} >= 140:
            send "&7%{server::command::gradess::%player%}%"
            execute player command "lp user %player% parent set vip"
            message "Vous êtes passé VIP gg"
        if {playtime.%player%} < 140:
            send "vous ne disposez pas d'assez de temps de jeux" to player ```
feral rain
#

format

mental mural
feral rain
#

send code formatted

#

use 3 `

#

in end

#

and start

mental mural
feral rain
#

Yes

#

And

#

Don’t ping me please

#

what is the problem i don't understand

#

also

#

instead of %player% use %player's uuid%

#

its better

granite onyx
#

i prefer to use like

set {_u} to uuid of player
set {playtime::%{_u}%} to 0
feral rain
#

yea thats valid

#

basically the same thing

granite onyx
#

but shorter

#

if ur writing alot of them

feral rain
#

yea

granite onyx
feral rain
mental mural
#

Look the second screen

granite onyx
#

?

mental mural
#

It is doing both of condition

#

While I want to execute the commands only if he never used it

#

Like a one time command

feral rain
#

Check if he has permission ig

#

Also, execute console command would it be im pretty sure

granite onyx
#
    trigger:
        if {server::command::gradess::%player%} is not set:
            set {server::command::gradess::%player%} to "Vous avez déjà le grade"       
        else if {playtime.%player%} >= 140:
            send "&7%{server::command::gradess::%player%}%"
            execute player command "lp user %player% parent set vip"
            message "Vous êtes passé VIP gg"
        else if {playtime.%player%} < 140:
            send "vous ne disposez pas d'assez de temps de jeux" to player ```

try this with an extra else
#

that might work

mental mural
#

I will try when I get home

granite onyx
#

k

mental mural
#

Still the same the thing that you changed was already working

#

The thing which is not working is that it isn’t blocking the command

#

Like this

feral rain
#

Set a variable, if not true or not set, do something, Else if true or set, do something Else

mental mural
#

isn't it what i done?

           set {server::command::gradess::%player%} to "Vous avez déjà le grade"       
       else if {playtime.%player%} >= 140 ```
feral rain
#

When are you checking if it is not set?

mental mural
#

?

#

send "&7%{server::command::gradess::%player%}%"

#

there