Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Basic self thread Tutorial
#1
A basic self thread Tutorial.

This tutorial is for those who are just starting and have read This or This

Let's start:
so you've made a mod that give's you a gun onplayerspawned
like this
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
                                self giveWeapon ( "famas_dualclip_mp", 0, false );
    
    }
}
and maybe you've added a perk in aswell ie
Code:
self setPerk("specialty_Lightweight");
but sometime's this can get messy so to make life easyer we are going to make a thread for all our weapon's and perk's insted, so to start we add one called Myguns in onPlayerSpawned() like so
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");

        self thread Myguns();
    
    }
}
then at the bottom of the .gsc file is our thread
Code:
Myguns()
{
    self Takeallweapons();
    self giveWeapon ( "famas_dualclip_mp", 0, false );
    self giveWeapon ( "willy_pete_mp", 0, false );
    self giveWeapon ( "frag_grenade_mp", 0, false );
    self switchToWeapon( "famas_dualclip_mp" );
    self clearPerks();
   self setPerk("specialty_Lightweight");
}
and thats the basics of a self thread, hope this help's someone xD
credit's: iAegle for helping a noob Smile
Reply

#2
Reputation +1.
Reply

#3
Good stuff man!
--
Reply

#4
thanks guys wasnt sure if i should , glad i did
Reply

#5
lol simple but helpful +1
Reply

#6
yep simple is what i'm aiming for , i shall relese a nother tut soon hopefuly linking in to this one sweet,short and simple
Reply

#7
(03-30-2011, 15:48)rotceh_dnih Wrote: yep simple is what i'm aiming for , i shall relese a nother tut soon hopefuly linking in to this one sweet,short and simple

maybe u should add whats the difference between level thread and self thread
Reply

#8
Quote:maybe u should add whats the difference between level thread and self thread
i would like to but not sure that i understand it myself is this right,
a level thread would be place in init() and is used for changeing map items ie cp map's or fx in map ???
and self threads are for yourself,you,the player onconnect or spawned??

im not sure i will add it in and give credit if someone can explain it in laymans terms xD

Reply

#9
(04-01-2011, 04:11)rotceh_dnih Wrote:
Quote:maybe u should add whats the difference between level thread and self thread
i would like to but not sure that i understand it myself is this right,
a level thread would be place in init() and is used for changeing map items ie cp map's or fx in map ???
and self threads are for yourself,you,the player onconnect or spawned??

im not sure i will add it in and give credit if someone can explain it in laymans terms xD

well prety much but OnPlayerConnect() you would use player thread. The only time you would use self thread is in when they joined team or spawned

and level thread init() use to create HUDs etc or making a zombie timer.
that is what i know so far. Im no hud master like iAegle
Reply

#10
How do you find rank.gsc file....or do you create one?
Blush
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Basic Mod CheeseToast 10 7,208 11-02-2013, 18:02
Last Post: Yamato
  TUTORIAL CHEAT ENGINE for mw3 [HARD] Tony. 5 4,656 10-24-2013, 15:22
Last Post: Tomsen1410
  Thread removed [HARD] Tony. 4 3,859 10-01-2013, 17:53
Last Post: DidUknowiPwn
  Help Thread removed [HARD] Tony. 5 3,979 09-26-2013, 20:26
Last Post: Casper
  Thread removed [HARD] Tony. 3 2,967 09-22-2013, 16:23
Last Post: d0h!
  Thread removed [HARD] Tony. 2 2,592 09-20-2013, 18:03
Last Post: [HARD] Tony.
  Thread removed [HARD] Tony. 3 3,073 09-20-2013, 16:00
Last Post: Nekochan
  Help Official Teckno Gods Thread [Stickied] aceed 3 3,280 08-27-2013, 16:55
Last Post: SuperNovaAO
Question Tutorial addon! [HARD] Tony. 2 2,886 04-30-2013, 13:55
Last Post: [HARD] Tony.
  [TUTORIAL] Various Statements KrypTiK 2 2,926 01-07-2013, 21:00
Last Post: kokole

Forum Jump:


Users browsing this thread:
3 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.