[Ajuda] TextDraw PPC_Trucking
#4

olha aki eu tenho o FS maos nao sei colocar o local q ta ali na imagem alguem pode me ajuda...

pawn Код:
#include <a_samp>

new updatetimer[MAX_PLAYERS];


//Player Textdraws:
new PlayerText:Textdraw0[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw1[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};


forward update(playerid);
public OnPlayerConnect(playerid)
{
    Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 498.398, 100.799, "Score - -=-");
    PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw0[playerid], -1);
    PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
    PlayerTextDrawFont(playerid, Textdraw0[playerid], 2);
    PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawShow(playerid, Textdraw0[playerid]);
   
    Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 497.600, 120.212, "Ping - -=- ms");
    PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw1[playerid], -1);
    PlayerTextDrawSetOutline(playerid, Textdraw1[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw1[playerid], 51);
    PlayerTextDrawFont(playerid, Textdraw1[playerid], 2);
    PlayerTextDrawSetProportional(playerid, Textdraw1[playerid], 1);
    PlayerTextDrawShow(playerid, Textdraw1[playerid]);
   
    updatetimer[playerid] = SetTimerEx("update", 1000, true, "d", playerid);
    return 1;
}


public update(playerid)
{
    new score[16], ping[16];
    format(score, sizeof(score), "Score - %d", GetPlayerScore(playerid));
    format(ping, sizeof(ping), "Ping - %d ms", GetPlayerPing(playerid));
    PlayerTextDrawSetString(playerid, Textdraw0[playerid], score);
    PlayerTextDrawSetString(playerid, Textdraw1[playerid], ping);
    return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
    PlayerTextDrawDestroy(playerid, Textdraw0[playerid]);
    Textdraw0[playerid] = PlayerText:INVALID_TEXT_DRAW;

    PlayerTextDrawDestroy(playerid, Textdraw1[playerid]);
    Textdraw1[playerid] = PlayerText:INVALID_TEXT_DRAW;
   
    KillTimer(updatetimer[playerid]);

    return 1;
}
Reply


Messages In This Thread
TextDraw PPC_Trucking - by comanfiss - 17.04.2014, 02:15
Re: TextDraw PPC_Trucking - by Stroon - 17.04.2014, 05:27
Re: TextDraw PPC_Trucking - by comanfiss - 17.04.2014, 09:54
Re: TextDraw PPC_Trucking - by comanfiss - 20.04.2014, 17:14
Re: TextDraw PPC_Trucking - by N3XTMapper - 20.04.2014, 17:35
Re: TextDraw PPC_Trucking - by comanfiss - 20.04.2014, 17:56
Re: TextDraw PPC_Trucking - by N3XTMapper - 20.04.2014, 18:02
Re: TextDraw PPC_Trucking - by Wellington1999 - 20.04.2014, 18:23
Re: TextDraw PPC_Trucking - by Deli - 20.04.2014, 18:42
Re: TextDraw PPC_Trucking - by comanfiss - 20.04.2014, 19:21
Re: TextDraw PPC_Trucking - by N3XTMapper - 20.04.2014, 19:38

Forum Jump:


Users browsing this thread: 2 Guest(s)