Flashlight (v1.0.2)

Author Topic: Flashlight (v1.0.2)  (Read 19126 times)

Probably because they use the same key?

Yeah, most weapon packs and stuff use the light key for reloading.
Maybe a preference or something to only allow the light when not wielding a weapon.

It was broken yesterday on your server too, you just left and we couldn't tell you

Yeah, most weapon packs and stuff use the light key for reloading.
Maybe a preference or something to only allow the light when not wielding a weapon.

Well I have a fix for this but it's quite hacky - not sure if I should update it with it:

Code: [Select]
function pushServerPackageToBack(%package) {
%i = $numClientPackages $= "" ? 0 : $numClientPackages;
%c = getNumActivePackages();

for (%i; %i < %c; %i++) {
%current = getActivePackage(%i);

if (%current !$= %package) {
%stack = trim(%stack SPC %current);
deactivatePackage(%current);
}
}

if (%stack !$= "") {
%c = getWordCount(%stack);

for (%i = 0; %i < %c; %i++) {
activatePackage(getWord(%stack, %i));
}
}
}

pushServerPackageToBack("FlashlightPackage");
« Last Edit: September 02, 2013, 10:56:36 AM by Port »

Whenever I am in a vehicle like a A-10 Thunderbolt II, F-18 Hornet, or any vehicle that uses the light key, when I use the key it will not lower the gear/enable weapons.

« Last Edit: September 02, 2013, 11:16:09 AM by Kamutog »


Whenever I am in a vehicle like a A-10 Thunderbolt II, F-18 Hornet, or any vehicle that uses the light key, when I use the key it will not lower the gear/enable weapons.

Yeah, see the post right above yours.

Cant it work like the default light to where if the weapon doesn't need loaded the light still toggles?

blah blah FIX blah blah
Code: [Select]
fixscript
whatever it is, release it.


wow
a flashlight that is actually good!
« Last Edit: September 02, 2013, 02:12:15 PM by Electrk »

Would be cool to put that on vehicle's headlights
Especially if it could be a Support script

Well I have a fix for this but it's quite hacky - not sure if I should update it with it:
Hmm, well if it works, i see no problems with it.
It is a bit hacky, but it makes sure the other things work over the flashlight, which could be preferred...
I am okay with this.

Hmm, well if it works, i see no problems with it.
It is a bit hacky, but it makes sure the other things work over the flashlight, which could be preferred...
I am okay with this.

Yeah, I've got an updated version which I'll test tomorrow - I'll release that if it works.

Updated to version 1.0.2. Changes:

  • The add-on now pushes all previously activated packages to the front of the stack (in the correct order). This prevents the flashlight from breaking every other add-on that packages the light function, such as most ammo systems.