Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Specific Script reloading?

Featured Replies

Is it possible to reload a specific script in IV?

Because the "Settings.Save(); Settings.Load();" Do not seem to work without issuing 'reloadscripts' I was wondering if its possible to reload just a single script?


if (Interval < 10000)

			{

				GTA.Game.Console.Print("Interval Value: " + Settings.GetValueInteger("Interval", "SETTINGS", 20000));

				GTA.Game.Console.Print("Interval Value being set automatically to 20 seconds");

				Settings.SetValue("Interval", "SETTINGS", 20000); Settings.Save();

				GTA.Game.Console.Print("Interval Value set to default");

				Wait(10000); Settings.Load();

			}

			else

			{

				GTA.Game.Console.Print("Congrats Interval Value is greater than or equal to 10 seconds");

				GTA.Game.Console.Print("Interval Value: " + Settings.GetValueInteger("Interval", "SETTINGS", 20000));

			}

I cant seem to get it to go to the "ELSE" statement without issues "reloadscripts" in the console. Any tips?

Edit; TBH I think I posted in the wrong section.... Think this should be more of a Gameplay/Misc Mod question.

Edited by Revan

[center][url="http://steamcommunity.com/id/Darth_Revan"][img]http://i1192.photobucket.com/albums/aa340/iconography1/Revan3.jpg[/img][/url] [color=#ff8c00][i][b]Thanks Iconography[/b][/i][/color] OS #1: Windows 7 x64 CPU: AMD Phenom II X4 940 ~3.0Ghz --- GPU: Nvidia GTS 250 (1GB) --- RAM: 4GB Keyboard: Logitech G15 --- Mouse: Logitech G500[/center]

I can't be sure because I can't see the entire script, but are you setting the interval value from the ini anywhere?

Interval = Settings.GetValueInteger("Interval", "SETTINGS", 20000);

You are using the WRONG right theme!

[ WIPs | Donate | 🌌 Join Mod Multiverse!]
Flashing LED lightbar in British configuration

  • Author

Here is a good chunk of the code, for you to look at (I commented out what im working on since it fails to work as I would like it to)

	    public Speed()

	    {

		    //set interval

		    //Interval = 20000;

		    //replaced with INI file for easier end user edits

		    Interval = Settings.GetValueInteger("Interval", "SETTINGS", 20000);

 

		    //disabled, fails to update properly

		    //BindConsoleCommand("value", new GTA.ConsoleCommandDelegate(this.Value));



		    //bind tick event

		    this.Tick += new EventHandler(speedTick);



	    }



	    //public void Value(GTA.ParameterCollection _params)

	    //{

	    //    if (Interval < 10000)

	    //    {

	    //	    GTA.Game.Console.Print("Interval Value: " + Settings.GetValueInteger("Interval", "SETTINGS", 20000));

	    //	    GTA.Game.Console.Print("Interval Value being set automatically to 20 seconds");

	    //	    Settings.SetValue("Interval", "SETTINGS", 20000); Settings.Save();

	    //	    GTA.Game.Console.Print("Interval Value set to default");

	    //	    Wait(10000); Settings.Load();

	    //    }

	    //    else

	    //    {

	    //	    GTA.Game.Console.Print("Congrats Interval Value is greater than or equal to 10 seconds");

	    //	    GTA.Game.Console.Print("Interval Value: " + Settings.GetValueInteger("Interval", "SETTINGS", 20000));

	    //    }

	    //}

I got it working if I replace "Settings.Load();" with "GTA.Game.Console.SendCommand("reloadscripts");" but based on the fact that I run 34 scripts it wouldnt be exactly 'friendly' to force that.

The reason I have it based around a console command at the moment is so I can run it when I want to, without having to let my script tick, and I think running the script every 10/20 seconds with checking the interval wouldnt be very friendly either..

[center][url="http://steamcommunity.com/id/Darth_Revan"][img]http://i1192.photobucket.com/albums/aa340/iconography1/Revan3.jpg[/img][/url] [color=#ff8c00][i][b]Thanks Iconography[/b][/i][/color] OS #1: Windows 7 x64 CPU: AMD Phenom II X4 940 ~3.0Ghz --- GPU: Nvidia GTS 250 (1GB) --- RAM: 4GB Keyboard: Logitech G15 --- Mouse: Logitech G500[/center]

The stuff in Speed() only gets run once meaning

Interval = Settings.GetValueInteger("Interval", "SETTINGS", 20000);

will not get updated unless you reloadscripts, you need to have it somewhere it can get run again such as speedTick().

You are using the WRONG right theme!

[ WIPs | Donate | 🌌 Join Mod Multiverse!]
Flashing LED lightbar in British configuration

  • Author

I tried that it still doesnt work right, I got a screenshot to show you what I mean.

http://cloud.steampowered.com/ugc/576706062984179515/DAE4439C827A67080A77D9075CCD10EC431EF83E/

http://cloud.steampowered.com/ugc/576706062984177726/B5F8398E63CB6322132F531ADA1071C057A5A232/

This might help explain the issue I am having.

I might just end up having to force "reloadscripts" at this rate. To me the code looks fine... but, then again im still not very good with it.

Edited by Revan

[center][url="http://steamcommunity.com/id/Darth_Revan"][img]http://i1192.photobucket.com/albums/aa340/iconography1/Revan3.jpg[/img][/url] [color=#ff8c00][i][b]Thanks Iconography[/b][/i][/color] OS #1: Windows 7 x64 CPU: AMD Phenom II X4 940 ~3.0Ghz --- GPU: Nvidia GTS 250 (1GB) --- RAM: 4GB Keyboard: Logitech G15 --- Mouse: Logitech G500[/center]

This is a support topic.
Only reply here to offer help or assistance to Revan. Off-topic or "me too" replies will be removed.

Need support yourself? Make a new topic instead.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.