File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,9 +312,27 @@ static bool mDisableMPSet = [] {
312312 return DisableMPSet == " true" || DisableMPSet == " 1" ;
313313}();
314314
315+ static auto GetSettingName = [](int id) -> const char * {
316+ switch (id) {
317+ case 0 : return " Debug" ;
318+ case 1 : return " Private" ;
319+ case 2 : return " MaxCars" ;
320+ case 3 : return " MaxPlayers" ;
321+ case 4 : return " Map" ;
322+ case 5 : return " Name" ;
323+ case 6 : return " Description" ;
324+ case 7 : return " InformationPacket" ;
325+ default : return " Unknown" ;
326+ }
327+ };
328+
315329void LuaAPI::MP::Set (int ConfigID, sol::object NewValue) {
316330 if (mDisableMPSet ) {
317- beammp_info (" This feature has been disabled by your server provider." );
331+ beammp_lua_error (
332+ std::string (" A script tried to call MP.Set to change setting '" )
333+ + GetSettingName (ConfigID)
334+ + " ' but this was blocked by your server provider."
335+ );
318336 return ;
319337 }
320338
You can’t perform that action at this time.
0 commit comments