Autoload Scripts Tutorial

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

SwizzyPlays

Active Poster
CC Dev Team
Active Member
Sep 16, 2015
350
269
123
Hello guys here is a quick tut on how to make "Mod Settings" or auto loads for your menu! A couple days ago I couldn't figure out how to do but I eventually figured it out!

AUTO LOADS SCO'S TUTORIAL
This is a simple auto loader that you could perfect if you wanted! I am not that good at coding lol so this was useful to me!

How to set the autoload function
void godmodescript(void)
{
if (GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT("godmode_uclip") == 0)
{
REQUEST_SCRIPT("godmode_uclip");
//name of sco. Example used here: godmode_uclip
while (!HAS_SCRIPT_LOADED("godmode_uclip"))
WAIT(0);

START_NEW_SCRIPT("godmode_uclip", 1024);
MARK_SCRIPT_AS_NO_LONGER_NEEDED("godmode_uclip");
}
}

Where to call the function(main)
void main(void)
{

protections_load();
godmodescript();
//Where the function is called, I have other set as above & below!
NETWORK_GHOST();
loadmod();
menu_core_startup();
draw_startup();
disablemenuinpause();

while(true)
{
WAIT(0);

if (!IS_STRING_NULL(load_script) && !script_loaded)
load_script_prioritized();

// Core menu function (Catch button press. Set menu).
if (IS_STRING_NULL(load_script))
menu_core();

// Draw background/header/text.
drawWindow();
//drawwindow2();

// Draw button input.
drawFrontend();

drawHeader();
//drawHeader2();
//drawFoot();
//drawFoot2();
menu_draw();

DESTROY_MOBILE_PHONE();

TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME("disablemenu");
HIDE_HELP_TEXT_THIS_FRAME();
HIDE_HUD_AND_RADAR_THIS_FRAME();
}
}



Hope this helped someone! One thing that this does cause is that everytime you open your menu up the sco's reload. Other than that its good!
 
  • Like
Reactions: Devilsdesign
General chit-chat
Help Users
  • No one is chatting at the moment.
  • @ lurch6661:
    good in da hood
  • @ lurch6661:
    bored but good lol
  • @ QM|T_JinX:
    ;lol ya that suck
  • @ lurch6661:
    i can be the hunter or be the prey
  • @ lurch6661:
    lol
  • @ QM|T_JinX:
    lol
  • Chat Bot:
    ★ℳ℮ℳO_o̶ has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Kikkoy is our newest member. Welcome!
  • Chat Bot:
    sdfbdf is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • @ lurch6661:
    got some wireless earbuds i hope they work lol
  • Chat Bot:
    EL PERRITO is our newest member. Welcome!
  • Chat Bot:
    DarkDemise01 is our newest member. Welcome!
  • @ QM|T_JinX:
    @lurch6661 cool bro
  • Chat Bot:
    marcos1 is our newest member. Welcome!
  • Chat Bot:
    raiidz is our newest member. Welcome!
  • Chat Bot:
    raiidz has joined the room.
  • Chat Bot:
    Vinny55 is our newest member. Welcome!
    Chat Bot: Vinny55 is our newest member. Welcome!