I started posting this in a different thread, but then after going thru rtb's code some more i felt like it was mesessary to post this in a new one. Most of this i copyied over so it might not make a whole lot a sense, so i'll try to help with that.
[talking about the function imprisonplayer]
I was searching thru my rtb scripts a little to see if i could find it and i found the function in rtb/server/scripts/SWP/lightsabre.cs from lines 273-343. here it is in its entirety-
function ImprisonPlayer(%client,%victim)
{
if(%client.team $= "Cops" && %victim.team $= "Robbers")
{
if(%victim.isImprisoned == 0)
{
for(%t = 0; %t < MissionCleanup.GetCount(); %t++)
{
%brick = MissionCleanup.getObject(%t);
if(%brick.isJail == 1)
{
if(%brick.JailCount < %brick.JailMaxCount)
{
if(isobject(%victim.player))
{
%brick.JailCount++;
%victim.isImprisoned = 1;
%victim.money = 0;
messageClient(%victim,'MsgUpdateMoney',"",%victim.money);
%trans = %brick.getWorldBoxCenter();
%x = getWord(%trans,0);
%y = getWord(%trans,1);
%z = getWord(%trans,2)+0.5;
%victim.player.setTransform(%x SPC %y SPC %z);
%victim.JailBrick = %brick;
messageAll("",'\c0%1\c5 was Imprisoned by \c0%2',%victim.name,%client.name);
%victim.player.unMountImage($HeadSlot);
%victim.player.mountImage(%victim.chestCode , $decalslot, 1, 'Town-Inmate');
%victim.player.mountImage(%victim.faceCode , $faceslot, 1, 'smirk2');
%victim.player.setSkinName('orange');
%totalImprisonedPeople = %totalImprisonedPeople + %brick.JailCount;
if(%totalImprisonedPeople >= $TotalRobbers)
{
messageAll("","\c5COPS WIN!!!");
messageAll("","\c5Everyone swaps sides!");
schedule(5000,0,"RestartCR");
}
}
return;
}
else
{
%totalImprisonedPeople = %totalImprisonedPeople + %brick.JailMaxCount;
%JailFull = 1;
}
}
}
if(%JailFull == 1)
{
messageAll("","\c4We've run out of jails");
}
else
{
messageClient(%client,"","\c4There is no jail built...");
}
}
else
{
%victim.isImprisoned = 0;
%victim.player.setTransform(%victim.TeamSpawn.getTransform());
%victim.JailBrick.JailCount--;
messageAll("",'\c0%1\c5 was freed by \c0%2',%victim.name,%client.name);
%victim.player.mountImage($headCode[$RobHat],$HeadSlot,1,'black');
%victim.player.mountImage(%client.chestCode , $decalslot, 1, 'Town-Inmate');
%victim.player.mountImage(%client.faceCode , $faceslot, 1, 'evil');
%victim.player.setSkinName('black');
}
}
}
Now, from what i understand about how code works, i think that is for a certain game "type" or mode for RtB. But even still, mocheeze, you said it yourself
Doesn't break the rules if he doesn't post it in the mods section. Last time I checked it wasn't breaking the rules to ask for help.
I'm pretty sure rtB is posted in the mods section....Badspot, are you reading this?
EDIT: I've found another function that breaks the mod rules.
function serverCmdJailPlayer(%client,%victim,%time)
{
if(%client.isAdmin || %client.isSuperAdmin || %client.isTempAdmin)
{
if(%victim.isTimeout != 1)
{
%jailbricks = 0;
for(%t = 0; %t < MissionCleanup.getCount(); %t++)
{
%jail = MissionCleanup.getObject(%t);
if(%jail.isDetBrick $= 1)
{
%jailbricks++;
}
}
if(%jailbricks >= 1)
{
for(%t = 0; %t < MissionCleanup.getCount(); %t++)
{
%jail = MissionCleanup.getObject(%t);
if(%jail.isDetBrick $= 1)
{
%trans = %jail.getTransform();
%x = getWord(%trans,0);
%y = getWord(%trans,1);
%z = getWord(%trans,2);
%player = %victim.player;
%player.setTransform(%x SPC %y SPC %z);
%victim.isTimeout = 1;
%STime = %time*60;
%STime = %STime*1000;
%victim.TimeoutSchedule = Schedule(%STime,0,"FreeVictim",%client,%victim,%time);
messageClient(%victim, '', '\c3You have been jailed by an Admin for %1 minutes!', %time);
messageClient(%client, '', '\c3You have jailed %1 for %2 minutes.', %victim.namebase, %time);
messageAllExcept(%victim, '\c3%1 was Jailed by %2 (%3 Minutes).', %victim.name, %client.name, %time);
}
}
}
else
{
messageClient(%client, '', '\c3It appears no jails brick has been specified!');
}
}
else
{
cancel(%victim.TimeoutSchedule);
messageClient(%victim, '', '\c3An Admin has released you from Jail!');
messageClient(%client, '', '\c3You have released %1 from Jail.', %victim.namebase);
%victim.isTimeout = 0;
%victim.player.kill();
}
}
}
This one was located in admincommands.cs from lines 125-179. From what i understand it allows any admin, super, or "temp" admin to send a player into a closed area, for a given amount of time. THis is just sick
btw, i have just realized that when a player is "jailed", he cannot Self Delete out of the jail, but instead must stay there until his freedom is given. This clearly is in violation of the mod rules. In fact,i'm not sure, but even if you leave the server you might be automatically sent back into the jail.
btw, why is the imprison function located in some obscure file like lightsabre.cs? Is this to hide the function or something? :\ this isn't very good to see these functions in rtb... :|
So, there you have it. I am just wondering, are the mod rules a joke or something? Because i have also noticed that PTTA, and perhaps AiO even breaks the mod rules.