mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 16:14:35 +00:00
Tabs
This commit is contained in:
parent
22474421bc
commit
485e1d8285
1 changed files with 43 additions and 43 deletions
|
|
@ -203,53 +203,53 @@ function GameBaseData::onAdd(%data, %obj)
|
||||||
// Throw Spam fix
|
// Throw Spam fix
|
||||||
function serverCmdThrow(%client, %data)
|
function serverCmdThrow(%client, %data)
|
||||||
{
|
{
|
||||||
if(%client.tossLock)
|
if(%client.tossLock)
|
||||||
{
|
{
|
||||||
if(getSimTime() - %client.tossLockTime < 30000)
|
if(getSimTime() - %client.tossLockTime < 30000)
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
%client.tossLock = 0;
|
%client.tossLock = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getSimTime() - %client.tossTime < 128)
|
if(getSimTime() - %client.tossTime < 128)
|
||||||
{
|
{
|
||||||
%client.tossCounter++;
|
%client.tossCounter++;
|
||||||
if(%client.tossCounter > 30)
|
if(%client.tossCounter > 30)
|
||||||
{
|
{
|
||||||
if(%client.tossLockWarning)
|
if(%client.tossLockWarning)
|
||||||
{
|
{
|
||||||
echo(%client.nameBase SPC "was Banned for exceeding" SPC %client.tossCounter SPC "Toss Limit.");
|
echo(%client.nameBase SPC "was Banned for exceeding" SPC %client.tossCounter SPC "Toss Limit.");
|
||||||
messageAll('msgAll',"\c3" @ %client.namebase SPC "is attempting to lag the server!");
|
messageAll('msgAll',"\c3" @ %client.namebase SPC "is attempting to lag the server!");
|
||||||
messageClient(%client, 'onClientBanned', "");
|
messageClient(%client, 'onClientBanned', "");
|
||||||
messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client );
|
messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client );
|
||||||
if(isObject(%client.player))
|
if(isObject(%client.player))
|
||||||
%client.player.scriptKill(0);
|
%client.player.scriptKill(0);
|
||||||
if (isObject(%client))
|
if (isObject(%client))
|
||||||
{
|
{
|
||||||
%client.setDisconnectReason("Item Spew scripts are not allowed on this server." );
|
%client.setDisconnectReason("Item Spew scripts are not allowed on this server." );
|
||||||
%client.schedule(700, "delete");
|
%client.schedule(700, "delete");
|
||||||
}
|
}
|
||||||
BanList::add(%client.guid, %client.getAddress(), $Host::BanTime);
|
BanList::add(%client.guid, %client.getAddress(), $Host::BanTime);
|
||||||
%client.tossLock = 1;
|
%client.tossLock = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo(%client.nameBase SPC "throwing items has been temporarily suspended for exceeding" SPC %client.tossCounter SPC "throw limit.");
|
echo(%client.nameBase SPC "throwing items has been temporarily suspended for exceeding" SPC %client.tossCounter SPC "throw limit.");
|
||||||
centerprint(%client, "You are recieving this warning for throw spamming items.\nContinuing to use throw spew scripts will result in a ban.", 10, 2);
|
centerprint(%client, "You are recieving this warning for throw spamming items.\nContinuing to use throw spew scripts will result in a ban.", 10, 2);
|
||||||
messageClient(%client, '', "Throwing items has been temporarily suspended.");
|
messageClient(%client, '', "Throwing items has been temporarily suspended.");
|
||||||
%client.tossLockTime = getSimTime();
|
%client.tossLockTime = getSimTime();
|
||||||
%client.tossLock = 1;
|
%client.tossLock = 1;
|
||||||
%client.tossLockWarning = 1;
|
%client.tossLockWarning = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
%client.tossCounter = 0;
|
%client.tossCounter = 0;
|
||||||
|
|
||||||
parent::serverCmdThrow(%client, %data);
|
parent::serverCmdThrow(%client, %data);
|
||||||
%client.tossTime = getSimTime();
|
%client.tossTime = getSimTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue