CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Call of Duty: Black Ops 2 Scripts Questions
Call of Duty: Black Ops 2 Answered Questions
Best way to call an Overflow Fix?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="P!X" data-source="post: 4369" data-attributes="member: 24"><p>use self thread or just thread</p><p></p><p>without "thread" it waits until the called function is done</p><p></p><p>example:</p><p>[CODE]onPlayerSpawned()</p><p>{</p><p> self endon("disconnect");</p><p> self.isFirstSpawn = true;</p><p> for(;;)</p><p> {</p><p> self waittill("spawned_player");</p><p> if(self.isFirstSpawn==true)</p><p> {</p><p> if(self isHost())</p><p> {</p><p> self iprintln("YAY");//runs wait for done and move on</p><p> self test();//runs wait for done and move on</p><p> overflowfix();//runs wait for done but since there is a infinite "for" loop in the function it will wait forever</p><p> self test();//doesnt run cause you forgot "thread" overflowfix()</p><p> }</p><p> self.isFirstSpawn = false;</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p>ohh and dont use "level.isFirstSpawn" use "self.isFirstSpawn" to seperate it for every single player</p></blockquote><p></p>
[QUOTE="P!X, post: 4369, member: 24"] use self thread or just thread without "thread" it waits until the called function is done example: [CODE]onPlayerSpawned() { self endon("disconnect"); self.isFirstSpawn = true; for(;;) { self waittill("spawned_player"); if(self.isFirstSpawn==true) { if(self isHost()) { self iprintln("YAY");//runs wait for done and move on self test();//runs wait for done and move on overflowfix();//runs wait for done but since there is a infinite "for" loop in the function it will wait forever self test();//doesnt run cause you forgot "thread" overflowfix() } self.isFirstSpawn = false; } } }[/CODE] ohh and dont use "level.isFirstSpawn" use "self.isFirstSpawn" to seperate it for every single player [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Black Ops 2
Call of Duty: Black Ops 2 Mods and Scripts
Call of Duty: Black Ops 2 Scripts
Call of Duty: Black Ops 2 Scripts Questions
Call of Duty: Black Ops 2 Answered Questions
Best way to call an Overflow Fix?
CabConModding is now on facebook! Check the latest Updates, the Site Status and much more now!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top