![]() |
|
Help Script Problems - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Call of Duty Franchise (https://www.itsmods.com/Forum-Call-of-Duty-Franchise.html) +--- Forum: Call of Duty: Black Ops II (https://www.itsmods.com/Forum-Call-of-Duty-Black-Ops-II.html) +---- Forum: Scripts (https://www.itsmods.com/Forum-Scripts--155.html) +---- Thread: Help Script Problems (/Thread-Help-Script-Problems.html) |
Script Problems - Ltave5 - 08-31-2014 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. RE: Script Problems - dtx12 - 08-31-2014 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();
}
}RE: Script Problems - Ltave5 - 09-02-2014 You're actually the best. Thank you
|