| Blockland Forums > Modification Help |
| Need help fixing Iban's Lockpick. |
| (1/4) > >> |
| Bloxxed:
I need some help fixing the script, it's a edited script by JJStorm, it somewhat doesn't work, and I do not know why, it's two pieces of codes, it's the Lockpick code and the Baton code as they are both broken, I don't know what to do because I don't know about JVS's new content. Thanks if you can help. --- Code: ---function CityRPGPicklockImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal) { %client = %obj.client; if(%col.getType() & $TypeMasks::FxBrickObjectType) { if($CityRPG::pref::canpicklockadmindoors != 1) { if(getrandom(0,3) == 2) { %col.JVSOpen(%client); 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 { commandToclient(%client, 'centerprint', "\c6Lock Is unpickable", 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); } --- End code --- This code, the door does not open for some strange reason. --- Code: ---function CityRPGBatonImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal) { %client = %obj.client; if(%col.getClassName() $= "fxDTSBrick") { %col.JVSOpen(%client); } else if(%col.getClassName() $= "Player") { if((%col.getType() & $typeMasks::playerObjectType) && isObject(%col.client)) { if(%col.client.getWantedLevel()) { if(%col.getDatablock().maxDamage - (%col.getDamageLevel() + 25) < %this.raycastDirectDamage) { %col.setDamageLevel(%this.raycastDirectDamage + 1); %col.client.arrest(%client); } else commandToClient(%client, 'CenterPrint', "\c3" @ %col.client.name SPC "\c6is resisting arrest!", 3); } else if(CityRPGData.getData(%col.client.bl_id).valueBounty > 0) commandToClient(%client, 'CenterPrint', "\c3" @ %col.client.name SPC "\c6is not wanted alive.", 3); else %doNoEvil = true; } } if(%doNoEvil) { %this.raycastDirectDamage = 0; } parent::onHitObject(%this, %obj, %slot, %col, %pos, %normal); if(%doNoEvil) { %this.raycastDirectDamage = 25; } } --- End code --- |
| DontCare4Free:
Ah, the all too common DoesntWorkException. :cookieMonster: Seriously though, what is the error? What happens? Have you even tried debugging this yourself? |
| Bloxxed:
--- Quote from: DontCare4Free on April 17, 2011, 02:32:53 PM ---Ah, the all too common DoesntWorkException. :cookieMonster: Seriously though, what is the error? What happens? Have you even tried debugging this yourself? --- End quote --- I've tried, I can't figure it out The doors will not open at all, I want it so that the door opens. |
| DontCare4Free:
--- Quote from: Bloxxed on April 17, 2011, 02:34:27 PM ---I've tried, I can't figure it out The doors will not open at all, I want it so that the door opens. --- End quote --- Do you get any error in the console? |
| Bloxxed:
--- Quote from: DontCare4Free on April 17, 2011, 02:35:03 PM ---Do you get any error in the console? --- End quote --- No, it's just that the door won't open. |
| Navigation |
| Message Index |
| Next page |