trying to make a friend system

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

MeowKing5

Member
Aug 22, 2021
2
1
3
18
hey im trying to make a friend system but i cant figure out how to
- make the name not yellow and to follow the prefix's color

heres the code:
Code:
        else if arg-1 is "add":
            if arg-2 is set:
                set {arg2player} to arg-2 parsed as offline player
                if {arg2player} has played before:
                    send "&9----------------------------------------------------"
                    send "&eYou sent a friend request to %{arg2player}%&e! They have 5 minutes to accept it!"
                    send "&9----------------------------------------------------"
                    if {arg2player} is online:
                        send "&9&m----------------------------------------------------" to {arg2player}
                        send "&eFriend request from %player's prefix%%player's displayname%" to {arg2player}
                        send "&a&l[ACCEPT] &8- &c&l[DENY] &8- &7&l[IGNORE]" to {arg2player}
                        send "&9&m----------------------------------------------------" to {arg2player}
                    wait 5 minutes
                    send "&9----------------------------------------------------"
                    send "&eThe friend request to %{arg2player}%&e has expired."
                    send "&9----------------------------------------------------"
                else:
                    send "&cNo player found with the name %arg-2%&c!"
            else:
                send "&9----------------------------------------------------"
                send "&cInvalid Usage! Valid usage: /friend add Player"
                send "&9----------------------------------------------------"
 
Last edited:
  • Like
Reactions: Jacob105
^^^^^^
[doublepost=1629599443,1629598574][/doublepost]
hey im trying to make a friend system but i cant figure out how to
- make the name not yellow and to follow the prefix's color
- not add myself (/f add MeowKing5)

heres the code:
Code:
        else if arg-1 is "add":
            if arg-2 is set:
                set {arg2player} to arg-2 parsed as offline player
                if {arg2player} has played before:
                    send "&9----------------------------------------------------"
                    send "&eYou sent a friend request to %{arg2player}%&e! They have 5 minutes to accept it!"
                    send "&9----------------------------------------------------"
                    if {arg2player} is online:
                        send "&9&m----------------------------------------------------" to {arg2player}
                        send "&eFriend request from %player's prefix%%player's displayname%" to {arg2player}
                        send "&a&l[ACCEPT] &8- &c&l[DENY] &8- &7&l[IGNORE]" to {arg2player}
                        send "&9&m----------------------------------------------------" to {arg2player}
                    wait 5 minutes
                    send "&9----------------------------------------------------"
                    send "&eThe friend request to %{arg2player}%&e has expired."
                    send "&9----------------------------------------------------"
                else:
                    send "&cNo player found with the name %arg-2%&c!"
            else:
                send "&9----------------------------------------------------"
                send "&cInvalid Usage! Valid usage: /friend add Player"
                send "&9----------------------------------------------------"
we don't need the "not adding ourselves" we just need the first one.
upload_2021-8-21_22-29-35.png

it's white, how do we make it follow from the luckperms prefix??
[doublepost=1629599594][/doublepost]
unknown.png

wait no like this ****
 
if you wanna reset it so it doesn't show &e use &r then your color code. very easy. if you wanna look into color codes. if you have essentials. do /kit color
 
use. set {_color} to player's prefix parused colour
Code:
set {_color} to player's prefix parused colour
send "%player's prefix% %{_color}%%player%" to player
idk if I spelled parused wrong but I hope it works. (NOT TESTED)
 
use. set {_color} to player's prefix parused colour
Code:
set {_color} to player's prefix parused colour
send "%player's prefix% %{_color}%%player%" to player
idk if I spelled parused wrong but I hope it works. (NOT TESTED)
imma try this out! thanks!
[doublepost=1629656454,1629656223][/doublepost]
use. set {_color} to player's prefix parused colour
Code:
set {_color} to player's prefix parused colour
send "%player's prefix% %{_color}%%player%" to player
idk if I spelled parused wrong but I hope it works. (NOT TESTED)
yeah i tried parused & parsed they both don't work
 
hey im trying to make a friend system but i cant figure out how to
- make the name not yellow and to follow the prefix's color

heres the code:
Code:
        else if arg-1 is "add":
            if arg-2 is set:
                set {arg2player} to arg-2 parsed as offline player
                if {arg2player} has played before:
                    send "&9----------------------------------------------------"
                    send "&eYou sent a friend request to %{arg2player}%&e! They have 5 minutes to accept it!"
                    send "&9----------------------------------------------------"
                    if {arg2player} is online:
                        send "&9&m----------------------------------------------------" to {arg2player}
                        send "&eFriend request from %player's prefix%%player's displayname%" to {arg2player}
                        send "&a&l[ACCEPT] &8- &c&l[DENY] &8- &7&l[IGNORE]" to {arg2player}
                        send "&9&m----------------------------------------------------" to {arg2player}
                    wait 5 minutes
                    send "&9----------------------------------------------------"
                    send "&eThe friend request to %{arg2player}%&e has expired."
                    send "&9----------------------------------------------------"
                else:
                    send "&cNo player found with the name %arg-2%&c!"
            else:
                send "&9----------------------------------------------------"
                send "&cInvalid Usage! Valid usage: /friend add Player"
                send "&9----------------------------------------------------"

I don't understand
Code:
%player's displayname%
already does this

upload_2021-8-23_12-22-10.png

upload_2021-8-23_12-22-55.png
 

Attachments

  • upload_2021-8-23_12-20-12.png
    upload_2021-8-23_12-20-12.png
    16.3 KB · Views: 116
  • upload_2021-8-23_12-20-34.png
    upload_2021-8-23_12-20-34.png
    16.3 KB · Views: 108
use a spaced prefix
it does that because the player's prefix in luckperms is like that to fix that just make a space either in the config, or just remake the prefix, but add a space this time
 
it does that because the player's prefix in luckperms is like that to fix that just make a space either in the config, or just remake the prefix, but add a space this time
we did add in a space originally using the command
[lp group owner meta setprefix "&c[OWNER] &c"].
 
Status
Not open for further replies.