Bump. I still need some help, but with a different problem now.
I've found a work around, by fakekilling the block, the only problem is that.
It fakekills the any brick, but not a JVS door.
It gives demerits if you hit a brick, but not a door.
function CityRPGPicklockImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal)
{
%client = %obj.client;
if(%col.getType() & $TypeMasks::FxBrickObjectType)
{
if(getrandom(0,3) == 2)
{
if (!isObject(%col.shape))
{
%col.fakeKillBrick(1, 3);
commandToClient(%client, 'centerPrint', "\c6You have commited a crime. [\c3Breaking and Entering\c6]", 3);
CityRPG_AddDemerits(%client.bl_id, $CityRPG::demerits::breakingAndEntering);
return;
}
else
{
commandToclient(%client, 'centerprint', "\c6Picking Lock...", 3);
}
}
}
else if(%col.getType() & $TypeMasks::VehicleObjectType)
{
if(%col.locked)
{
%col.locked = false;
CityRPG_AddDemerits(%obj.client.bl_id, $CityRPG::demerits::grandTheftAuto);
commandToClient(%client, 'centerPrint', "\c6You have committed a crime. [\c3Grand Theft Auto\c6]", 5);
}
}
parent::onHitObject(%this, %obj, %slot, %col, %pos, %normal);
}
Thanks if you can help.