Fix error messages on sendnotification

This commit is contained in:
Tixx 2024-10-04 20:24:30 +02:00
parent 3ade7f5743
commit f039f57f11

View File

@ -217,11 +217,11 @@ std::pair<bool, std::string> LuaAPI::MP::SendNotification(int ID, const std::str
auto c = MaybeClient.value().lock();
if (!c->IsSynced()) {
Result.first = false;
Result.second = "Player still syncing data";
Result.second = "Player is not synced yet";
return Result;
}
if (!Engine->Network().Respond(*c, StringToVector(Packet), true)) {
beammp_errorf("Failed to send notification back to sender (id {}) - did the sender disconnect?", ID);
beammp_errorf("Failed to send notification to player (id {}) - did the player disconnect?", ID);
Result.first = false;
Result.second = "Failed to send packet";
}