SA-MP Forums Archive
Text Draw doesn't work. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Text Draw doesn't work. (/showthread.php?tid=302493)



Text Draw doesn't work. - printer - 09.12.2011

OnGameModeInit

pawn Код:
foreach(Player, playerid)
    {
        firetraining[playerid] = TextDrawCreate(555.000000, 325.000000, "Welcome!");
        TextDrawBackgroundColor(firetraining[playerid], 255);
        TextDrawFont(firetraining[playerid], 1);
        TextDrawLetterSize(firetraining[playerid], 0.219999, 1.000000);
        TextDrawColor(firetraining[playerid], -1);
        TextDrawSetOutline(firetraining[playerid], 0);
        TextDrawSetProportional(firetraining[playerid], 1);
        TextDrawSetShadow(firetraining[playerid], 1);
        TextDrawUseBox(firetraining[playerid], 1);
        TextDrawBoxColor(firetraining[playerid], 168430456);
        TextDrawTextSize(firetraining[playerid], 629.000000, 41.000000);
    }
OnPlayerSpawn
pawn Код:
TextDrawShowForPlayer(playerid, firetraining[playerid]);
Text draw doesn't work at all, help please!


Re: Text Draw doesn't work. - [MG]Dimi - 09.12.2011

pawn Код:
//Top of script
new Text:firetraining[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    firetraining[playerid] = TextDrawCreate(555.000000, 325.000000, "Welcome!");
    TextDrawBackgroundColor(firetraining[playerid], 255);
    TextDrawFont(firetraining[playerid], 1);
    TextDrawLetterSize(firetraining[playerid], 0.219999, 1.000000);
    TextDrawColor(firetraining[playerid], -1);
    TextDrawSetOutline(firetraining[playerid], 0);
    TextDrawSetProportional(firetraining[playerid], 1);
    TextDrawSetShadow(firetraining[playerid], 1);
    TextDrawUseBox(firetraining[playerid], 1);
    TextDrawBoxColor(firetraining[playerid], 168430456);
    TextDrawTextSize(firetraining[playerid], 629.000000, 41.000000);
    TextDrawShowForPlayer(playerid, firetraining[playerid]);
}



Re: Text Draw doesn't work. - printer - 09.12.2011

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
pawn Код:
//Top of script
new Text:firetraining[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    firetraining[playerid] = TextDrawCreate(555.000000, 325.000000, "Welcome!");
    TextDrawBackgroundColor(firetraining[playerid], 255);
    TextDrawFont(firetraining[playerid], 1);
    TextDrawLetterSize(firetraining[playerid], 0.219999, 1.000000);
    TextDrawColor(firetraining[playerid], -1);
    TextDrawSetOutline(firetraining[playerid], 0);
    TextDrawSetProportional(firetraining[playerid], 1);
    TextDrawSetShadow(firetraining[playerid], 1);
    TextDrawUseBox(firetraining[playerid], 1);
    TextDrawBoxColor(firetraining[playerid], 168430456);
    TextDrawTextSize(firetraining[playerid], 629.000000, 41.000000);
    TextDrawShowForPlayer(playerid, firetraining[playerid]);
}
Still doesn't appear.


Re: Text Draw doesn't work. - §с†¶e®РµРe - 09.12.2011

Quote:
Originally Posted by printer
Посмотреть сообщение
OnGameModeInit

pawn Код:
foreach(Player, playerid)
    {
        firetraining[playerid] = TextDrawCreate(555.000000, 325.000000, "Welcome!");
        TextDrawBackgroundColor(firetraining[playerid], 255);
        TextDrawFont(firetraining[playerid], 1);
        TextDrawLetterSize(firetraining[playerid], 0.219999, 1.000000);
        TextDrawColor(firetraining[playerid], -1);
        TextDrawSetOutline(firetraining[playerid], 0);
        TextDrawSetProportional(firetraining[playerid], 1);
        TextDrawSetShadow(firetraining[playerid], 1);
        TextDrawUseBox(firetraining[playerid], 1);
        TextDrawBoxColor(firetraining[playerid], 168430456);
        TextDrawTextSize(firetraining[playerid], 629.000000, 41.000000);
    }
OnPlayerSpawn
pawn Код:
TextDrawShowForPlayer(playerid, firetraining[playerid]);
Text draw doesn't work at all, help please!
Change this to
pawn Код:
//Top of script
new Text:firetraining;

public OnGameModeInIt()
{
    firetraining = TextDrawCreate(555.000000, 325.000000, "Welcome!");
    TextDrawBackgroundColor(firetraining, 255);
    TextDrawFont(firetraining, 1);
    TextDrawLetterSize(firetraining, 0.219999, 1.000000);
    TextDrawColor(firetraining, -1);
    TextDrawSetOutline(firetraining, 0);
    TextDrawSetProportional(firetraining, 1);
    TextDrawSetShadow(firetraining, 1);
    TextDrawUseBox(firetraining, 1);
    TextDrawBoxColor(firetraining, 168430456);
    TextDrawTextSize(firetraining, 629.000000, 41.000000);
   
}
public OnPlayerConnect(playerid)
{
    //This is used to show the player the textdraw when they connect.
    TextDrawShowForPlayer(playerid, firetraining);
}
This wasn't tested just typed lemme know if it works or not


Re: Text Draw doesn't work. - printer - 09.12.2011

Quote:
Originally Posted by §с†¶e®РµРe
Посмотреть сообщение
Change this to
pawn Код:
//Top of script
new Text:firetraining;

public OnGameModeInIt()
{
    firetraining = TextDrawCreate(555.000000, 325.000000, "Welcome!");
    TextDrawBackgroundColor(firetraining, 255);
    TextDrawFont(firetraining, 1);
    TextDrawLetterSize(firetraining, 0.219999, 1.000000);
    TextDrawColor(firetraining, -1);
    TextDrawSetOutline(firetraining, 0);
    TextDrawSetProportional(firetraining, 1);
    TextDrawSetShadow(firetraining, 1);
    TextDrawUseBox(firetraining, 1);
    TextDrawBoxColor(firetraining, 168430456);
    TextDrawTextSize(firetraining, 629.000000, 41.000000);
   
}
public OnPlayerConnect(playerid)
{
    //This is used to show the player the textdraw when they connect.
    TextDrawShowForPlayer(playerid, firetraining);
}
This wasn't tested just typed lemme know if it works or not
THANKS!


Re: Text Draw doesn't work. - §с†¶e®РµРe - 09.12.2011

Quote:
Originally Posted by printer
Посмотреть сообщение
THANKS!
Please add +rep