Blockland Forums > Suggestions & Requests
Non-Banning Ban Hammer
gr8dayseth:
I did it. yay
I want to release it, but would that be ban-able
No pun intended.
since it's a crap-on or something?
Also, how do you put a kill icon on a weapon?
shyGriff:
i doubt you'd get banned
Demian:
I'll release it in the Add-Ons forum in a few minutes.
MARBLE MAN:
--- Quote from: Demian on March 02, 2013, 03:30:23 PM ---I'll release it in the Add-Ons forum in a few minutes.
--- End quote ---
LOL
--- Code: ---datablock itemData(AdminHammerItem : hammerItem)
{
uiName = "Admin Hammer";
image = AdminHammerImage;
colorShiftColor = "1 0 0 1";
};
datablock shapeBaseImageData(AdminHammerImage : hammerImage)
{
item = AdminHammerItem;
projectile = "";
colorShiftColor = "1 0 0 1";
};
function AdminHammerImage::onFire(%this,%obj,%slot)
{
parent::onFire(%this,%obj,%slot);
if(!%obj.client.isHost || %obj.getClassName() !$= "Player")
//if(%obj.getClassName() !$= "Player")
return;
%tar = %obj.getLookTarget2(3000);
if(!isObject(%tar))
return;
%c = %tar.getClassName();
if(%c $= "Player" || %c $= "AIPlayer")
%tar.kill();
else if(%c $= "WheeledVehicle")
{
%tar.delete();
}
}
function Player::GetLookTarget2(%this,%dist)
{
%start = %this.getEyePoint();
%targets = ($TypeMasks::FxBrickObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StaticObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::VehicleObjectType);
%vec = %this.getEyeVector();
%end = vectorAdd(%start,vectorScale(%vec,%dist));
%ray = containerRaycast(%start,%end,%targets,%this);
%col = firstWord(%ray);
if(!isObject(%col))
return -1;
return %col;
}
--- End code ---
gr8dayseth:
--- Quote from: Demian on March 02, 2013, 03:30:23 PM ---I'll release it in the Add-Ons forum in a few minutes.
--- End quote ---
Ok, I was just now having trouble with it anyway.
--- Quote from: MARBLE MAN on March 02, 2013, 03:32:17 PM ---LOL
--- Code: ---
--- End code ---
--- End quote ---
Wait what