if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
if(!$RTB::RTBR_ServerControl_Hook)
exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
RTB_registerPref("Enable Server VIP Build","Server VIP Build","ServerVIPBuild::Enabled","bool","Script_ServerVIPBuild",1,0,0);
}
else
{
$ServerVIPBuild::Enabled = 1;
}
exec("./Script_ServerVIPBuild.cs");
function serverCmdAddTrust(%client, %name)
{
if(%client.isAdmin)
{
%target = findClientByName(%name);
if(isObject(%target))
{
messageClient(%client, '', '\c6%1 can now build on this server.', %target.getPlayerName());
messageClient(%target, '', "\c6You can now build on this server.");
$Pref::Server::HasTrust[%target.bl_ID] = 1;
}
}
else
{
messageClient(%client, '', "\c6You must be an admin to use this command.");
}
}
//Now make it so you can remove people's trust
function serverCmdRevokeTrust(%client, %name)
{
if(%client.isAdmin)
{
%target = findClientByName(%name);
if(isObject(%target))
{
messageClient(%client, '', '\c6%1 can no longer build on this server.', %target.getPlayerName());
messageClient(%target, '', "\c6You can no longer build on this server.");
$Pref::Server::HasTrust[%target.bl_ID] = 0;
}
}
else
{
messageClient(%client, '', "\c6You must be an admin to use this command.");
}
}
package ServerVIPBuild
{
function serverCmdPlantBrick(%client)
{
if($ServerVIPBuild::Enabled)
{
if($Pref::Server::HasTrust[%client.bl_id])
{
Parent::serverCmdPlantBrick(%client);
}
else
centerPrint(%client,"You are not allowed to build on this server.",2,2);
return;
}
else
Parent::serverCmdPlantBrick(%client);
}
};
activatePackage(ServerVIPBuild);
My first script.