Vice City: Multiplayer

VC:MP Discussion => Bugs and Crashes => Support => Closed Bug Reports => Topic started by: NicusorN5 on Aug 30, 2017, 05:20 PM

Title: [BUG]Keybindings stop working atfer some time.
Post by: NicusorN5 on Aug 30, 2017, 05:20 PM
Description: Key bindings don't work anymore atfer some days of running the server.

When this happends:Always

What you were doing when the bug happened: Playing on my server, I observed that my Nos system wasn't working anymore, maybe because OnKeyDown and OnKeyUp functions can't be called anymore?

NOS system snippet:
function onKeyDown( player, key )
{
 local vehicle = player.Vehicle;
 if (key == x)
 { 
  if (vehicle != null) {
  local Nos = ReadIniInteger("NOS.ini","NOS",vehicle.ID.tostring());
        if (Nos == null) Nos = 0;
  if (Nos > 0)
  {
  PlaySound( 1, 65, vehicle.Pos );
  if (vehicle.Model < 4000)
  {
  vehicle.SetHandlingData(14, vehicle.GetHandlingData(14) + 100.0);
  vehicle.SetHandlingData(13,vehicle.GetHandlingData(13)+100);
  }
  if (vehicle.Model >= 4000)
  {
  vehicle.RelativeSpeed *= 1.1;
  }
  vehicle.Lights = true
  Nos--;
  WriteIniInteger("NOS.ini","NOS",player.Vehicle.ID.tostring(),Nos);
  }
  else NMessagePlayer("[#ff0000]You don't have any more NO2!",player,"[#ff0000]Nu mai ai NO2!");
  } 
}
}

Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: Xenon on Aug 30, 2017, 08:09 PM
Did you use ReloadScripts() function?
Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: NicusorN5 on Aug 31, 2017, 03:52 PM
Yeah, my friend Angelo22 used it, he said that it was still was not working.
Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: Xenon on Aug 31, 2017, 05:07 PM
I ask you, did you use ReloadScripts() before this happened. Binds stop responding after scripts reload. :P
Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: NicusorN5 on Aug 31, 2017, 06:56 PM
Quote from: Xenon on Aug 31, 2017, 05:07 PMI ask you, did you use ReloadScripts() before this happened. Binds stop responding after scripts reload. :P
Angelo22 reloaded the script, I have no idea when. Is there a way to make them respond again except restarting the server?
Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: EK.IceFlake on Aug 31, 2017, 08:05 PM
Use client-side keybinds. I'm guessing server side ones would be deprecated as well, though don't take my word for it.
Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: NicusorN5 on Aug 31, 2017, 08:32 PM
Quote from: EK.IceFlake on Aug 31, 2017, 08:05 PMUse client-side keybinds. I'm guessing server side ones would be deprecated as well, though don't take my word for it.
My script main.nut on store/scripts does not even load.
Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: NicusorN5 on Aug 31, 2017, 08:55 PM
Quote from: Xenon on Aug 31, 2017, 05:07 PMI ask you, did you use ReloadScripts() before this happened. Binds stop responding after scripts reload. :P
Reloaded the script, NOS still working. What the f*? So KeyBindings stop responding atfer a number of uses?
Title: Re: [BUG]Keybindings stop working atfer some time.
Post by: EK.IceFlake on Aug 31, 2017, 08:59 PM
Quote from: NicusorN5 on Aug 31, 2017, 08:32 PM
Quote from: EK.IceFlake on Aug 31, 2017, 08:05 PMUse client-side keybinds. I'm guessing server side ones would be deprecated as well, though don't take my word for it.
My script main.nut on store/scripts does not even load.
Yeah it should be in store/script not store/scripts