Welcome TextDraw...
#3

Quote:
Originally Posted by PotH3Ad
Посмотреть сообщение
Try this:

pawn Код:
new Text:bienvenido;

public OnFilterScriptInit()
{
    bienvenido = TextDrawCreate(8.000000, 420.000000, "_");
    TextDrawBackgroundColor(bienvenido, 255);
    TextDrawFont(bienvenido, 0);
    TextDrawLetterSize(bienvenido, 0.689999, 2.499999);
    TextDrawColor(bienvenido, -1);
    TextDrawSetOutline(bienvenido, 0);
    TextDrawSetProportional(bienvenido, 1);
    TextDrawSetShadow(bienvenido, 1);
    TextDrawHideForAll(bienvenido);
    return 1;
}

public OnFilterScriptExit()
{
    TextDrawDestroy(bienvenido);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    Bienvenida(playerid);
    return 1;
}

stock Bienvenida(playerid)
{
    new str[60], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, sizeof(str), "Bienvenido %s", pName);
    TextDrawSetString(bienvenido, str);
    TextDrawShowForPlayer(playerid, bienvenido);
    SetTimerEx("TerminarBienvenida", 4000, 0, "i", playerid);
}

public TerminarBienvenida(playerid)
{
    TextDrawHideForPlayer(playerid, bienvenido);
    return 1;
}
The problem there is.. is the same textdraw name "bienvenido" and if appears in a player and enter another player at the same time.. is a bug will change the string veri fats and dont said the correct name... i need to use diferente textdraws for every single player.. i used bienvenido[MAX_PLAYERS] for that but i think my code is wrong...

Sorry For My Bad English.. i speak spanish...
Reply


Messages In This Thread
Welcome TextDraw... - by Zafire1410 - 06.08.2010, 02:48
Re: Welcome TextDraw... - by PotH3Ad - 06.08.2010, 03:40
Re: Welcome TextDraw... - by Zafire1410 - 06.08.2010, 14:10

Forum Jump:


Users browsing this thread: 2 Guest(s)