03-30-2011, 12:24
(This post was last modified: 04-03-2011, 15:55 by rotceh_dnih.)
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 thisand maybe you've added a perk in aswell ie 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 sothen at the bottom of the .gsc file is our thread
and thats the basics of a self thread, hope this help's someone xD
credit's: iAegle for helping a noob
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 );
}
}
Code:
self setPerk("specialty_Lightweight");
Code:
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self thread Myguns();
}
}
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");
}
credit's: iAegle for helping a noob
Go home IW.... your drunk.
Youtube: http://www.youtube.com/user/TheMrStacie
Twitter: https://twitter.com/#!/rotceh_dnih
Youtube: http://www.youtube.com/user/TheMrStacie
Twitter: https://twitter.com/#!/rotceh_dnih