MrZig 0 Posted April 13, 2004 First of all, add this to whatever tank's init you want to be eligable to be stolen <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addaction ["Open hatch","nade.sqs"] <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;;nade.sqs _vcl = _this select 0 _act = _this select 1 _action = _this select 2 _vcl reveal _act ?locked _vcl : goto "Locked" _commander = commander _vcl _gunner = gunner _vcl _driver = driver _vcl ?ISNull _gunner && ISNull _driver && ISNull _commander || (!alive _gunner) && (!alive _driver) && (!alive _commander) : goto "noguys" _vcl removeaction _action _vcl addaction ["Throw grenade into hatch","Throw.sqs"] exit #locked _act sidechat "Damn, the hatch is locked!" exit #noguys _act sidechat "This tank is empty." _vcl removeaction _action exit <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;;throw.sqs _vcl = _this select 0 _act = _this select 1 _action = _this select 2 _array = magazines _act _miniarray = "HandGrenade" ?side _vcl == side _act : _act sidechat "The T72 is on our side!"; _vcl removeaction _action;exit ?_miniarray In _array && skill commander _vcl <=0.8 : goto "found" ?_miniarray In _array && skill commander _vcl >0.8 : goto "random" goto "nonade" #random ?(local server) : r = random 2; publicvariable "r" ?(R <=1) : goto "thrownadeout" #found ?Alive _act : _act playmove "CombatThrowGrenadeEnd"; _vcl removeaction _action _act sidechat "FIRE IN THE HOLE!" ~5 _grenade = "grenade" camcreate getpos _vcl driver _vcl setdammage 1 gunner _vcl setdammage 1 commander _vcl setdammage 1 exit #thrownadeout ?Alive _act : _act playmove "CombatThrowGrenadeEnd" _vcl removeaction _action _act sidechat "FIRE IN THE HOLE!" ~2.4 _vcl globalchat "SHIT! THROW IT OUT!" ~0.6 _grenade = "grenade" camcreate getpos _vcl _vcl addaction ["Throw grenade into hatch","Throw.sqs"] exit #nonade _act sidechat "I have no handgrenade to lob in! Shiza!" exit It was created real quick so there might be some errors. Enjoy. Edit: Updated script Share this post Link to post Share on other sites