ItsMods

Full Version: How to make Text in your mod!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello Today i learn you how to make text in your mod so it look like in your game... As you see in many mods are text so tutorial is :

1.Ok so open your _rank.gsc file and find this :

Code:
onJoinedSpectators()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("joined_spectators");
        self thread removeRankHUD();
    }
}

2.Then down of that type this :

Code:
ModInfo()
{
self endon( "disconnect" );
info = self createFontString("hudbig", 2.0);
while(true)
{
info setPoint("TOP", "TOP", -5, 0);
info setText("Your name text here");
wait .5;
}
}

So final code :

Code:
onJoinedSpectators()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("joined_spectators");
        self thread removeRankHUD();
    }
}

ModInfo()
{
self endon( "disconnect" );
info = self createFontString("hudbig", 2.0);
while(true)
{
info setPoint("TOP", "TOP", -5, 0);
info setText("Text here");
wait .5;
}
}

Colors :

^1text (red)
^2text (green)
^3text (yellow)
^4text (blue)
^5text (light blue)
^6text (purple)
^7text (white default)
^8text (grey)
^9text (brown)
^0text (black)

Now the code with my text :

Code:
ModInfo()
{
self endon( "disconnect" );
info = self createFontString("hudbig", 2.0);
while(true)
{
info setPoint("TOP", "TOP", -5, 0);
info setText("^4Text Mod ^6By ^7Ivankec");
wait .5;
}
}

Up it will be look like this : Text Mod By : Ivankec

Thanks for reading tutorial... btw PLEASE THANK YOU Big Grin
you only share the code you dont "teach" it ..
but nice .
ye nvm...
its nice but the people who don't know how to code will get an error because u never showed then to called the thread Modinfo
(02-28-2011, 09:42)No One Wrote: [ -> ]its nice but the people who don't know how to code will get an error because u never showed then to called the thread Modinfo

I want to figure how to use the code i want to make a mod but i need to know how to code. can someone teach me?
there are alot of good tutorials here, helps you to start
(04-01-2011, 23:48)d0h! Wrote: [ -> ]there are alot of good tutorials here, helps you to start

ok u know of any good tutorials that would help me code.
snipah add me -.- i would help you alot

Hey doing this on my phone but to use put
Code:
Self thread ModInfo();
In onplayerspawned
Or read my tut http://www.itsmods.com/forum/Thread-Basi...orial.html
no on player spawned on this :

Code:
player.explosiveKills[0] = 0;
player.xpGains = [];

player thread ModInfo();
player thread onPlayerSpawned();
player thread onJoinedTeam();
player thread onJoinedSpectators();

something like that..
Pages: 1 2