ItsMods
[Tutorial] Basic self thread Tutorial - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Tutorial] Basic self thread Tutorial (/Thread-Tutorial-Basic-self-thread-Tutorial.html)

Pages: 1 2


Basic self thread Tutorial - rotceh_dnih - 03-30-2011

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


RE: Basic self thread Tutorial - surtek - 03-30-2011

Reputation +1.


RE: Basic self thread Tutorial - Eekhoorn - 03-30-2011

Good stuff man!


RE: Basic self thread Tutorial - rotceh_dnih - 03-30-2011

thanks guys wasnt sure if i should , glad i did


RE: Basic self thread Tutorial - Ivankec - 03-30-2011

lol simple but helpful +1


RE: Basic self thread Tutorial - rotceh_dnih - 03-30-2011

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


RE: Basic self thread Tutorial - No One - 03-31-2011

(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


RE: Basic self thread Tutorial - rotceh_dnih - 04-01-2011

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




RE: Basic self thread Tutorial - No One - 04-02-2011

(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



RE: Basic self thread Tutorial - CRUSH3R676 - 05-16-2011

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