ItsMods

Full Version: Script Problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I'm having some issues with getting the threads to run for all players in the game instead of just the host.

In FFA, threads only run for the host.

In SnD, threads run for the host on the first round only. On the second, third, fourth, etc rounds, threads only run for other people in the lobby and not the host.

Currently this is the start of my code:
Code:
init()
{
        thread onPlayerConnect();
}

onPlayerConnect()
{
        level waittill("connected", player);
        player thread onPlayerSpawned();
}

onPlayerSpawned()
{
        self waittill("spawned_player");
        self iPrintlnBold( "Mod Loaded" );
        self thread doAimbot;
}

Obviously I'm not gonna post my aimbot code.

P.S. There is nothing wrong with the code. I've tested it multiple times and it works fine, so this isn't the problem.
Code:
init()
{
        level thread onPlayerConnect();
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill("connected", player);
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    for(;;)
    {
        self waittill("spawned_player");
        self iPrintlnBold( "Mod Loaded" );
        self thread doAimbot();
    }
}
You're actually the best. Thank you Smile