I am working on my own gamemode for my network and i have a bugg:
When a player kills a other player he get coins and the player that died loses coins.
I also have in my skript that when a player walks into the water he dies:
Now i have the bugg that when a player walks into the water, the sever says "You are killed by {player}" instead of just nothing.
Example:
A player gets killed by a player named: Test123
He respawns walks into the water and it again says the player got killed by Test123
Is it maybe possible that when a player dies and he respawns, i can skript that he has a clear history about who hit him the last time.
This is my skript for when player dies:
When a player kills a other player he get coins and the player that died loses coins.
I also have in my skript that when a player walks into the water he dies:
code_language.skript:
on walk on water:
kill player
Now i have the bugg that when a player walks into the water, the sever says "You are killed by {player}" instead of just nothing.
Example:
A player gets killed by a player named: Test123
He respawns walks into the water and it again says the player got killed by Test123
Is it maybe possible that when a player dies and he respawns, i can skript that he has a clear history about who hit him the last time.
This is my skript for when player dies:
code_language.skript:
on death:
attacker is a player
victim is player
add 1 to {gungame:kills:%attacker%}
add 1 to {gungame:killstreak:%attacker%}
execute console command "/gglvl %attacker%"
add 5 to {gungame:coins:%attacker%}
remove 2 from {gungame:coins:%victim%}
send "{@GG} &7You have been killed by &e%attacker% &8[&c-2 coins&8]" to victim
send "{@GG} &7you have killed &e%victim% &8[&a+5 coins&8]" to attacker
if {gungame:coins:%victim%} is less than 0:
set {gungame:coins:%victim%} to 0