Problem with altering players #2185
-
Hi there, I was trying to do some stuff with players, but nothing was working, and after removing bit by bit I was left with just this and it still wasn't working, what am I doing wrong?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Update: Adding something extra like sending a message in chat seemed to work, so the problem is actually altering the player. |
Beta Was this translation helpful? Give feedback.
-
Modifying the player's data on the server doesn't mean this data is propagated to players. On top of editing their health you'll also need to send this data to those players on your own via a health update packet. Note that this will require SSC. Additionally, since you're editing variables simulated client-side here, please note that due to the game's client-sided nature, locking their health to 100 will not prevent them from dying (as the client simulates its own health and damage events) if they take >100 damage between your health updates. |
Beta Was this translation helpful? Give feedback.
Modifying the player's data on the server doesn't mean this data is propagated to players. On top of editing their health you'll also need to send this data to those players on your own via a health update packet. Note that this will require SSC.
Additionally, since you're editing variables simulated client-side here, please note that due to the game's client-sided nature, locking their health to 100 will not prevent them from dying (as the client simulates its own health and damage events) if they take >100 damage between your health updates.