PlayerTextDrawShow not show -
teamz - 23.11.2016
Good day
Why do not you show the text when the player enters? I have another text but it is global
Код:
new PlayerText:Textdraw0[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
public OnPlayerConnect(playerid){
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 501.500000, 2.488790, "FPS 69 Ping 60 PacketLoss 0.0");
PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.202499, 0.927999);
PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw0[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw0[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);
return 1;
}
public OnPlayerSpawn(playerid){
PlayerTextDrawShow(playerid, Textdraw0[playerid] );
return 1;
}
public OnPlayerUpdate(playerid){
new drunk2 = GetPlayerDrunkLevel(playerid);
if(drunk2 < 100)
{
SetPlayerDrunkLevel(playerid,2000);
} else {
if(DLlast[playerid] != drunk2)
{
new fps = DLlast[playerid] - drunk2;
if((fps > 0) && (fps < 200))
FPS2[playerid] = fps;
DLlast[playerid] = drunk2;
}
}
Show2(playerid);
return 1;
}
forward Show2(playerid);
public Show2(playerid){
new ping = GetPlayerPing(playerid);
new string[160];
format(string,sizeof(string),"~w~FPS ~r~%d ~w~Ping ~r~%d ~w~PacketLoss ~r~%.2f ",FPS2[playerid]-1,ping,NetStats_PacketLossPercent(playerid));
printf("%s",string);
PlayerTextDrawSetString(playerid, Textdraw0[playerid],string);
return 1;
}
Re: PlayerTextDrawShow not show -
Tenka - 23.11.2016
Can you try on /cmd ?
I mean put PlayerTextDrawShow(playerid, Textdraw0[playerid] ); in some commands
If thats fine just check your onplayerspawn
Re: PlayerTextDrawShow not show -
BrianFaria - 23.11.2016
You tried to try with TextDrawShowForPlayer?
Код:
TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
Respuesta: PlayerTextDrawShow not show -
teamz - 24.11.2016
Yes Speedpro, but doesn't work, and I tried the command and it did not work
Re: PlayerTextDrawShow not show -
IceBilizard - 24.11.2016
try with this
PHP код:
new PlayerText:Textdraw0[MAX_PLAYERS] = {PlayerText:-1, ...};
public OnPlayerConnect(playerid)
{
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 501.500000, 2.488790, "FPS 69 Ping 60 PacketLoss 0.0");
PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.202499, 0.927999);
PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw0[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw0[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);
return 1;
}
Re: PlayerTextDrawShow not show -
BrianFaria - 24.11.2016
Now what I do not understand, why did you do it in playertextdraw? If anyway walks, and is better the other way, the normal textdraw. But just in case, try this.
Код:
new PlayerText:Textdraw0[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 501.500000, 2.488790, "FPS 69 Ping 60 PacketLoss 0.0");
PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.202499, 0.927999);
PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw0[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw0[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
PlayerTextDrawShow(playerid, Textdraw0[playerid]);
return 1;
}
public OnPlayerUpdate(playerid){
new drunk2 = GetPlayerDrunkLevel(playerid);
if(drunk2 < 100)
{
SetPlayerDrunkLevel(playerid,2000);
} else {
if(DLlast[playerid] != drunk2)
{
new fps = DLlast[playerid] - drunk2;
if((fps > 0) && (fps < 200))
FPS2[playerid] = fps;
DLlast[playerid] = drunk2;
}
}
Show2(playerid);
return 1;
}
forward Show2(playerid);public Show2(playerid)
{
new ping = GetPlayerPing(playerid);
new string[160];
format(string,sizeof(string),"~w~FPS ~r~%d ~w~Ping ~r~%d ~w~PacketLoss ~r~%.2f ",FPS2[playerid]-1,ping,NetStats_PacketLossPercent(playerid));
printf("%s",string);
PlayerTextDrawSetString(playerid, Textdraw0[playerid],string);
return 1;
}