1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Throw an error if the given player name is invalid.

This commit is contained in:
Sandu Liviu Catalin 2016-05-24 08:26:47 +03:00
parent 56970f69c2
commit d7c4d389eb

View File

@ -274,7 +274,10 @@ void CPlayer::SetName(CSStr name) const
// Validate the managed identifier // Validate the managed identifier
Validate(); Validate();
// Perform the requested operation // Perform the requested operation
_Func->SetPlayerName(m_ID, name); if (_Func->SetPlayerName(m_ID, name) == vcmpErrorInvalidName)
{
STHROWF("The specified name is invalid");
}
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------