Nic 0 Posted June 11, 2003 Ok So i have a script that starts the jet locked...and unlocks it when you open the canopy. It works fine in the mission editor - but when you try in multiplayer it doesnt unlock when the canopy opens. Here is how i call on the script in the config: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">         class eventhandlers         {             init=[_this select 0] exec "\LWZ_sonicjet\events.sqs", init=[_this select 0] exec "\LWZ_sonicjet\unlock.sqs";         }; Here is what the "events.sqs" looks like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_sonic = _this select 0 _sonic lock true #loopy1 ?(not alive _sonic):goto "exit" _pos = getpos _sonic; _x = _pos select 0; _y = _pos select 1; _z = _pos select 2; ?(_sonic animationphase "canopyanimation">0.5):goto "unlock" ?(speed _sonic>=50):goto "check" ?(_sonic animationphase "canopyanimation"<0.5 and _z<2):goto "lock" ~.2 goto "loopy1" #check ?(_sonic animationphase "canopyanimation">0):goto "close" goto "loopy1" #unlock _sonic lock false ?(speed _sonic>=50):goto "check" goto "loopy1" #lock _sonic lock true ?(speed _sonic>=50):goto "check" goto "loopy1" #close _sonic animate ["canopyanimation",0] goto "loopy1" #exit exit Ok and here is what the "unlock.sqs" looks like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_sonic = _this select 0 #loopy ?(speed _sonic>=60):goto "unlock" ~.2 goto "loopy" #unlock _sonic lock false goto "loopy" Ok so basically the "events.sqs" locks the jet up to start with...cuz it starts with the canopy shut. Then it checks to see if the canopy is opening...if so it unlocks....checks to see if its goin faster than 50 - if so is shuts the canopy......and checks to see if the canopy is shut/plane on the ground - if so it locks it again.   And the "unlock.sqs" checks to see if the jet is goin faster than 60 (assumed flight)..if so it unlocks - that way you can still eject. But like i said everything works fine in the mission editor...but as soon as i connect with someone else and try in MP the jet just stays locked - any ideas guys? You time is much appriciated! Share this post Link to post Share on other sites
Guest BratZ Posted June 11, 2003 For startes ...init eventhandler only runs locally, not sure how that will work in a mp game. And I don't see how that init line is running....Should be something like this: class eventhandlers { init="[_this select 0] exec ""\LWZ_sonicjet\events.sqs"";[_this select 0] exec ""\LWZ_sonicjet\unlock.sqs"""; }; Share this post Link to post Share on other sites
Nic 0 Posted June 11, 2003 init eventhandler only runs locally, not sure how that will work in a mp game. Do you know of which eventhandler i could use for MP maps then?....so that it works globaly? Share this post Link to post Share on other sites
Guest BratZ Posted June 12, 2003 Fuel maybe? Maybe even "GetIn" and such but that may not work well with what you are doing Share this post Link to post Share on other sites
PicVert 0 Posted June 12, 2003 I assume event "init" work on MP I have tested few month ago a cheat for OFP (anti-cheat for server of the Clan) I have modified the original g36a.pbo with a modified .cpp (class CfgVehicle) with event init= for lauching a script and the script worked too much nice RGR... I was unlimited ammo and soke kind of GOD mod.. And now some Servers check addon of Resistance for Anti-Cheating, like G36a.pbo Steyr.pbo etc... Share this post Link to post Share on other sites
Guest BratZ Posted June 12, 2003 That doesnt make sense? How you add a eventhandler to a weapon? You say it has a cfgvehicles? Must be you know something nobody else does...if thats the case then you should be able to attach a light to it or make some hidden selections on it? Where is this g36a? Could help the community. Share this post Link to post Share on other sites
PicVert 0 Posted June 14, 2003 the G36a.pbo is an original weapon addon from BIS for Resistance, you have a CfgVehicle inside do you know to make a weapon work ?? CfgVehicle is used by the Soldier (G36).. For the unlimited ammo I have put a script as the init of event in CfgVehicle, when I have tested on a server on the net I can put every g36 magazine on ground I want 1000 1000000 100000000000 etc... I have make a pseudo God mod but not for me for the Player who was shooting by me I was used 3magazine on the player and he doesn't work please check ur Languages I hate be under attack with word cu Share this post Link to post Share on other sites
uiox 0 Posted June 14, 2003 init event : only server side For MP use other event for start something on all clients. Share this post Link to post Share on other sites
BraTTy 0 Posted June 14, 2003 the G36a.pbo is an original weapon addon from BIS for Resistance, you have a CfgVehicle inside do you know to make a weapon work ?? CfgVehicle is used by the Soldier (G36).. Yes I do, you added the eventhandler to the soldier ,not the weapon. Because a weapon doesnt have a cfgvehicles unfortunately Uiox... init only server side ..yikes See I knew it didnt run on all machines.but was thinking clients.That messes up my manager script i use. I think, i better look it over,Thanx for the info Share this post Link to post Share on other sites