[Include] Player Text Draw
#1


crie textdraws de status entre outros!

Funзхes:
Код:
native CreatePlayerTextDraw(textdrawid, Float:x, Float:y, string[])
native SetPlayerTextDrawString(playerid, textdrawid, string[])
native ShowPlayerTextDraw(playerid, textdrawid, bool:Show)
native SetPlayerTextDrawColor(playerid, textdrawid, cor)
native SetPlayerTextDrawBGColor(playerid, textdrawid, cor)
native SetPlayerTextDrawFont(playerid, textdrawid, fonte)
native SetPlayerTextDrawLetterSize(playerid, textdrawid, Float:x, Float:y)
native SetPlayerTextDrawOutline(playerid, textdrawid, tamanho)
native SetPlayerTextDrawProportional(playerid, textdrawid, tipo)
native StopPlayerTextDraw()
Exemplo
pawn Код:
public OnGameModeInit()
{
    CreatePlayerTextDraw(0, 500.000000, 98.000000, "Assassinatos: %d");//ID 0
    SetPlayerTextDrawFont(0, 2);
    SetPlayerTextDrawLetterSize(0, 0.210000, 0.699999);
    SetPlayerTextDrawColor(0, -16776961);
    SetPlayerTextDrawOutline(0, 1);
    SetPlayerTextDrawProportional(0, 1);
    SetPlayerTextDrawUseBox(0, 1);
    SetPlayerTextDrawTextSize(0, 605.000000, 0.000000);
    SetPlayerTextDrawBoxColor(0, 255);

    CreatePlayerTextDraw(1, 500.000000, 105.000000, "Mortes: %d");//ID 1
    SetPlayerTextDrawFont(1, 2);
    SetPlayerTextDrawLetterSize(1, 0.210000, 0.699999);
    SetPlayerTextDrawColor(1, -16776961);
    SetPlayerTextDrawOutline(1, 1);
    SetPlayerTextDrawProportional(1, 1);
    SetPlayerTextDrawUseBox(1, 1);
    SetPlayerTextDrawBoxColor(1, 255);
    SetPlayerTextDrawTextSize(1, 605.000000, 0.000000);
    SetPlayerTextDrawBoxColor(1, 255);
    return 1;
}

public OnPlayerConnect(playerid)
{
    ShowPlayerTextDraw(playerid, 0, true);//ID 0
    ShowPlayerTextDraw(playerid, 1, true);//ID 1
    return 1;
}

public OnPlayerDisconnect(playerid)
{
    ShowPlayerTextDraw(playerid, 0, false);//ID 0
    ShowPlayerTextDraw(playerid, 1, false);//ID 1
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new string[256];
    format(string, sizeof(string), "Assassinatos: %d", /*DEFINICAO DE KILL*/);
    SetPlayerTextDrawString(playerid, 0, string);
    format(string, sizeof(string), "Mortes: %d", /*DEFINICAO DE DEATH*/);
    SetPlayerTextDrawString(playerid, 1, string);
    return 1;
}
Download:
http://pastebin.com/rbqi4NdH

By:

Reply


Messages In This Thread
Player Text Draw - by Dr_Pawno - 29.04.2011, 17:28
Re: Player Text Draw - by TheGarfield - 29.04.2011, 17:38
Re: Player Text Draw - by Dr_Pawno - 29.04.2011, 17:46
Re: Player Text Draw - by Macintosh - 29.04.2011, 17:51
Re: Player Text Draw - by Dr_Pawno - 29.04.2011, 18:11
Re: Player Text Draw - by Eriick_OwnZ - 30.04.2011, 03:33
Re: Player Text Draw - by Chefгo - 30.04.2011, 09:03
Re: Player Text Draw - by Dr_Pawno - 01.05.2011, 15:10

Forum Jump:


Users browsing this thread: 1 Guest(s)