cgallagher21 (10-30-2010),chrisdavis97 (10-30-2010),JoeAbunga (10-30-2010),justas1234 (11-14-2010),Kingkiller272 (10-30-2010),Lemon30 (10-30-2010),MuLtiHuNTeR (10-31-2010),rkaf (10-31-2010),TheLynx (10-30-2010),TheSaboteur (10-31-2010)
These are functions, not a gametype, don't ask how to play or where are the files.
This is really good and easy to use, best of all no overflows
Few examples:
Functions for creating text:
Code:createText(TextID, Text, textSize, Place1, Place2, offset1, offset2) destroyText(TextID) renameText(TextID, Text) replaceText(TextID, Place1, Place2, offset1, offset2) resizeText(TextID, newFont)TextID - must be different each time you create text, it's the ID for the text.Code:createText(TextID, Text, textSize, Place1, Place2, offset1, offset2)
Text - the text itself
testSize - basically text size
Place1 - place, where at? "TOP", "CENTER" etc
place2 - same
offset1 - offset?
offset2 - same
The text ID to be destroyed.Code:destroyText(TextID)
TextID - the text ID to renameCode:renameText(TextID, Text)
Text - new text
TextID - the text ID to put in new placeCode:replaceText(TextID, Place1, Place2, offset1, offset2)
place1/place2 - TOP/CENTER etc..
offset1/2 - offset?
TextID - the text ID to resizeCode:resizeText(TextID, newFont)
newFont - new size for the text
Examples:
Code:self thread createText(0, "^2Sup Dawg", 2.5, "CENTER", "CENTER", 50, 50); self thread createText(1, "^2I am cool", 2.5, "CENTER", "CENTER", 150, 150); wait 5; self thread renameText(0, "^1I AM AWESOME!"); self thread renameText(1, "^5To bad."); self thread resizeText(1, 14);
Functions for creating numbers (just like text, but use it if it's number only)
Code:createNumber(NumberID, Number, numberSize, Place1, Place2, offset1, offset2, color) createNumber(NumberID, Number, numberSize, Place1, Place2, offset1, offset2, colorz) replaceNumber(NumberID, Place1, Place2, offset1, offset2) resizeNumber(NumberID, newFont)
NumberID - Must be different for each time you create it. Note: if you created a text with the same ID as the number, it wouldn't matter.Code:createNumber(NumberID, Number, numberSize, Place1, Place2, offset1, offset2, color)
Number - basically the number to write
numberSize - number size
Place1/2 - CENTER/TOP
offset1/2 - offset
color - the color itself. Note: must be a character, like "blue" or "green" and etc.
NumberID - the number ID to renameCode:renameNumber(NumberID, Number, color)
Number - new number to write
color - the color itself. Note: must be a character, like "blue" or "green" and etc.
NumberID - the number ID to replaceCode:replaceNumber(NumberID, Place1, Place2, offset1, offset2)
Place1/2 - CENTER/TOP etc
offset1/2 - offset
NumberID - the number ID to resizeCode:resizeNumber(NumberID, newFont)
newFont - new size for the number
Examples:
Things that you should know:Code:self thread createNumber(0, 137, 2.5, "CENTER", "CENTER", 50, 50, "green"); wait 5; self thread renameNumber(0, 1337, "red"); self thread resizeNumber(0, 12);
- If you use a number and a text, and both have the same ID, it won't matter.
- Just need to createText/Number without setting stuff blablabla.
- Text/Number will auto remove from screen when you die.
https://pastebin.com/RnWfS8WJ
Enjoy!
cgallagher21 (10-30-2010),chrisdavis97 (10-30-2010),JoeAbunga (10-30-2010),justas1234 (11-14-2010),Kingkiller272 (10-30-2010),Lemon30 (10-30-2010),MuLtiHuNTeR (10-31-2010),rkaf (10-31-2010),TheLynx (10-30-2010),TheSaboteur (10-31-2010)
you wouldn't of posted this if you never looked in my mod :P
none the less, gj
setValue is from your mod only
wow really helpful, should be stickied
--
"Life is tough. It's tougher if you're stupid."
Spiritwo |
How will this help me? Honestly, please explain!
- No overflows.
- 1 line instead 3 to create a text.
- can be used in any thread, it has an ID, so if you create it in _rank.gsc, you can remove it in _weapons.gsc, I mean can be used globally.
- JUST EASIER K?
Yes Very helpful indeed
/Sticky?
/Thanked
How about some prettier text?
If u count up with numbers or something. and u count from 0 to 300 and it's not crashing it works. I'm going to test it thx !
Here is a nice little way you can easy add this to a mod:
1. Save the following as _textfunc.gsc and put it in maps\mp\gametypes:
[php]#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
createText(TextID, Text, textSize, Place1, Place2, offset1, offset2)
{
self.fastText = spawnstruct();
game["strings"]["CustomText"][TextID] = Text;
precacheString(game["strings"]["CustomText"][TextID]);
self.fastText.ie[TextID] = game["strings"]["CustomText"][TextID];
self.NewText[TextID] = self createFontString( "default", textSize );
self.NewText[TextID] setPoint( Place1, Place2, offset1, offset2);
self.NewText[TextID] setText(self.fastText.ie[TextID]);
self thread destroyOnDeath(self.NewText[TextID]);
}
destroyText(TextID)
{
self.NewText[TextID] destroy();
}
renameText(TextID, Text)
{
self.fastText.ie[TextID] = Text;
self.NewText[TextID] setText(self.fastText.ie[TextID]);
}
replaceText(TextID, Place1, Place2, offset1, offset2)
{
self.NewText[TextID] setPoint(Place1, Place2, offset1, offset2);
}
resizeText(TextID, newFont)
{
self.NewText[TextID].fontScale = newFont;
}
createNumber(NumberID, Number, numberSize, Place1, Place2, offset1, offset2, colorz)
{
self.fastNumber = spawnstruct();
self.fastNumber.ie[NumberID] = Number;
self.NewNumber[NumberID] = self createFontString( "default", numberSize );
self.NewNumber[NumberID] setPoint( Place1, Place2, offset1, offset2);
self.NewNumber[NumberID] setValue(Number);
self thread destroyOnDeath(self.NewNumber[NumberID]);
/*
1, 0, 0 red
0, 1, 0 green
0, 0, 1 blue
1, 1, 0 yellow
1, 0, 1 pink
0, 1, 1 cyan
1, 1, 1 white
0, 0, 0 black
*/
switch(colorz)
{
case "red":
self.NewNumber[NumberID].color = (1, 0, 0);
break;
case "green":
self.NewNumber[NumberID].color = (0, 1, 0);
break;
case "blue":
self.NewNumber[NumberID].color = (0, 0, 1);
break;
case "yellow":
self.NewNumber[NumberID].color = (1, 1, 0);
break;
case "pink":
self.NewNumber[NumberID].color = (1, 0, 1);
break;
case "cyan":
self.NewNumber[NumberID].color = (0, 1, 1);
break;
case "white":
self.NewNumber[NumberID].color = (1, 1, 1);
break;
case "black":
self.NewNumber[NumberID].color = (0, 0, 0);
break;
default:
self.NewNumber[NumberID].color = (1, 1, 1);
break;
}
}
renameNumber(NumberID, Number, colorz)
{
self.NewNumber[NumberID] setValue(Number);
switch(colorz)
{
case "red":
self.NewNumber[NumberID].color = (1, 0, 0);
break;
case "green":
self.NewNumber[NumberID].color = (0, 1, 0);
break;
case "blue":
self.NewNumber[NumberID].color = (0, 0, 1);
break;
case "yellow":
self.NewNumber[NumberID].color = (1, 1, 0);
break;
case "pink":
self.NewNumber[NumberID].color = (1, 0, 1);
break;
case "cyan":
self.NewNumber[NumberID].color = (0, 1, 1);
break;
case "white":
self.NewNumber[NumberID].color = (1, 1, 1);
break;
case "black":
self.NewNumber[NumberID].color = (0, 0, 0);
break;
default:
self.NewNumber[NumberID].color = self.NewNumber[NumberID].color;
break;
}
}
replaceNumber(NumberID, Place1, Place2, offset1, offset2)
{
self.NewNumber[NumberID] setPoint(Place1, Place2, offset1, offset2);
}
resizeNumber(NumberID, newFont)
{
self.NewNumber[NumberID].fontScale = newFont;
}
destroyOnDeath(obj)
{
self waittill("death");
obj destroy();
}
[/php]
2. At the start of the file you want to use these functions in, add this:
[php]#include maps\mp\gametypes\_textfunc;[/php]
Now you can use the text functions without making your GSC look messy!
[php]self thread createText(0, "Yay, you are a genius!", 1, "TOPRIGHT", "TOPRIGHT", 0, -10)[/php]
-----------------------------------
You should allow an option to change the font (optional), something like this:
[php]createText(TextID, Text, textSize, font, Place1, Place2, offset1, offset2)
{
self.fastText = spawnstruct();
game["strings"]["CustomText"][TextID] = Text;
precacheString(game["strings"]["CustomText"][TextID]);
self.fastText.ie[TextID] = game["strings"]["CustomText"][TextID];
if(isDefined(font))
self.NewText[TextID] = self createFontString( font, textSize );
else
self.NewText[TextID] = self createFontString( "default", textSize );
self.NewText[TextID] setPoint( Place1, Place2, offset1, offset2);
self.NewText[TextID] setText(self.fastText.ie[TextID]);
self thread destroyOnDeath(self.NewText[TextID]);
}
changeFont(NumberID, newFont)
{
self.NewNumber[NumberID].font = newFont;
}
[/php]
Fonts:
- default
- bighud
- bigfixed
- hudbig
- smallfixed
- objective
- arial
Last edited by master131; 10-31-2010 at 03:07 AM.
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
Nice release. But this will only work with numbers. If you use strings (text) it will overflow. Btw in your video the title is east text :P
[YOUTUBE]Ja7-WnJcMcs[/YOUTUBE]