14.05.2012, 20:32
Pessoal , criei uma textdraw aqui usando Foreach , para o contador de FPS, problema й que nгo estou conseguindo mudar a posiзгo dela mesmo mudando as cordenadas , queria saber se isto й possivel de alguma forma.
#include <foreach>
foreach(Player, p)
{
FPS[p] = TextDrawCreate(300, 410, "FPS:");
TextDrawBackgroundColor(FPS[p], 255);
TextDrawFont(FPS[p], 1);
TextDrawLetterSize(FPS[p], 0.440000, 1.500000);
TextDrawColor(FPS[p], -1);
TextDrawSetOutline(FPS[p], 0);
TextDrawSetProportional(FPS[p], 1);
TextDrawSetShadow(FPS[p], 1);
}
//OnPlayerConnect
TextDrawShowForPlayer(playerid, FPS[playerid]);
pawn Code:
|
//OnPlayerConnect
FPS[playerid] = TextDrawCreate(300, 410, "FPS:");
TextDrawBackgroundColor(FPS[playerid], 255);
TextDrawFont(FPS[playerid], 1);
TextDrawLetterSize(FPS[playerid], 0.440000, 1.500000);
TextDrawColor(FPS[playerid], -1);
TextDrawSetOutline(FPS[playerid], 0);
TextDrawSetProportional(FPS[playerid], 1);
TextDrawSetShadow(FPS[playerid], 1);
TextDrawShowForPlayer(playerid, FPS[playerid]);
//OnPlayerDisconnect
TextDrawHideForAll(FPS[playerid]);
TextDrawDestroy(FPS[playerid]);
pawn Code:
|
new PlayerText:T_FPS[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
T_FPS[playerid] = CreatePlayerTextDraw(playerid, 300, 410, "FPS:");
PlayerTextDrawBackgroundColor(playerid, T_FPS[playerid], 255);
PlayerTextDrawFont(playerid, T_FPS[playerid], 1);
PlayerTextDrawLetterSize(playerid, T_FPS[playerid], 0.440000, 1.500000);
PlayerTextDrawColor(playerid, T_FPS[playerid], -1);
PlayerTextDrawSetOutline(playerid, T_FPS[playerid], 0);
PlayerTextDrawSetProportional(playerid, T_FPS[playerid], 1);
PlayerTextDrawSetShadow(playerid, T_FPS[playerid], 1);
PlayerTextDrawShow(playerid, T_FPS[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid)
{
PlayerTextDrawHide(playerid, T_FPS[playerid]);
PlayerTextDrawDestroy(playerid, T_FPS[playerid]);
return 1;
}
Tanto faz?
pawn Code:
|