• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] no load player textdraw all
#1
hello I have problems with player textdraw stats is only shown to a player and alos player is not shown they do not load why?
Code:
new PlayerText:Stat[MAX_PLAYERS];

new PlayerText:FPG[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{

? ? HCB(playerid);


public OnPlayerSpawn(playerid)
{

PlayerTextDrawShow(playerid, FPG[playerid]);
PlayerTextDrawShow(playerid, Stat[playerid]);

return;1
forward UpdatePlayer(playerid);
public UpdatePlayer(playerid)
{
new sstring[256];
format(sstring,sizeof(sstring),"~r~~h~score: ~w~%d ~r~~h~kills: ~w~%d ~r~~h~deaths: ~w~%d ~r~~h~vip: ~w~%d ~r~~h~Exp: ~w~%d ~r~~h~HeadShoot: ~w~%d ~r~~h~rank: ~w~%s",GetPlayerScore(playerid),PlayerInfo[playerid][Kills],
PlayerInfo[playerid][Deaths],PlayerInfo[playerid][vip],PlayerInfo[playerid][XPX],PlayerInfo[playerid][HST],GetXP(playerid));
? ? PlayerTextDrawSetString(playerid,Stat[playerid], sstring);

new FPSSS = GetPlayerDrunkLevel(playerid), fps;
if (FPSSS < 100) { SetPlayerDrunkLevel(playerid, 2000);
} else {
if (FPSSS != FPSS[playerid])
{
? fps = FPSS[playerid] - FPSSS;
? if (fps > 0 && fps < 200) FPS[playerid] = fps; FPSS[playerid] = FPSSS;
? }
}// BY Tribisk
new Fstring[60];
format(Fstring,sizeof(Fstring),"~r~~h~fps:~w~ %d? ~r~~h~Ping: ~w~%d",FPS[playerid],GetPlayerPing(playerid));
? ? PlayerTextDrawSetString(playerid,FPG[playerid], Fstring);
return 1;
}

stock HCB(playerid)
{

Stat[playerid] = CreatePlayerTextDraw(playerid, 302.588287, 426.416839, "_");
PlayerTextDrawLetterSize(playerid, Stat[playerid], 0.235881, 0.958333);
PlayerTextDrawAlignment(playerid, Stat[playerid], 2);
PlayerTextDrawColor(playerid, Stat[playerid], -1);
PlayerTextDrawSetShadow(playerid, Stat[playerid], 0);
PlayerTextDrawSetOutline(playerid, Stat[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Stat[playerid], 51);
PlayerTextDrawFont(playerid, Stat[playerid], 2);
PlayerTextDrawSetProportional(playerid, Stat[playerid], 1);

FPG[playerid] = CreatePlayerTextDraw(playerid, 547.765014, 28.000236, "_");
PlayerTextDrawLetterSize(playerid, FPG[playerid], 0.155411, 1.284999);
PlayerTextDrawAlignment(playerid, FPG[playerid], 1);
PlayerTextDrawColor(playerid, FPG[playerid], -1);
PlayerTextDrawSetShadow(playerid, FPG[playerid], 0);
PlayerTextDrawSetOutline(playerid, FPG[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, FPG[playerid], 51);
PlayerTextDrawFont(playerid, FPG[playerid], 2);
PlayerTextDrawSetProportional(playerid, FPG[playerid], 2);
return 1;
}
  Reply
#2
Try this:
Code:
new PlayerText:Stat[MAX_PLAYERS];

new PlayerText:FPG[MAX_PLAYERS];



public OnPlayerConnect(playerid)

{

? ? HCB(playerid);

? ? return 1;

}



public OnPlayerSpawn(playerid)

{

? ? PlayerTextDrawShow(playerid, FPG[playerid]);

? ? PlayerTextDrawShow(playerid, Stat[playerid]);

? ? return 1;

}



forward UpdatePlayer(playerid);

public UpdatePlayer(playerid)

{

new sstring[256];

format(sstring,sizeof(sstring),"~r~~h~score: ~w~%d ~r~~h~kills: ~w~%d ~r~~h~deaths: ~w~%d ~r~~h~vip: ~w~%d ~r~~h~Exp: ~w~%d ~r~~h~HeadShoot: ~w~%d ~r~~h~rank: ~w~%s",GetPlayerScore(playerid),PlayerInfo[playerid][Kills],

PlayerInfo[playerid][Deaths],PlayerInfo[playerid][vip],PlayerInfo[playerid][XPX],PlayerInfo[playerid][HST],GetXP(playerid));

? ? PlayerTextDrawSetString(playerid,Stat[playerid], sstring);



new FPSSS = GetPlayerDrunkLevel(playerid), fps;

if (FPSSS < 100) { SetPlayerDrunkLevel(playerid, 2000);

} else {

if (FPSSS != FPSS[playerid])

{

? fps = FPSS[playerid] - FPSSS;

? if (fps > 0 && fps < 200) FPS[playerid] = fps; FPSS[playerid] = FPSSS;

? }

}// BY Tribisk

new Fstring[60];

format(Fstring,sizeof(Fstring),"~r~~h~fps:~w~ %d? ~r~~h~Ping: ~w~%d",FPS[playerid],GetPlayerPing(playerid));

? ? PlayerTextDrawSetString(playerid,FPG[playerid], Fstring);

? ? return 1;

}



stock HCB(playerid)

{

Stat[playerid] = CreatePlayerTextDraw(playerid, 302.588287, 426.416839, "_");

PlayerTextDrawLetterSize(playerid, Stat[playerid], 0.235881, 0.958333);

PlayerTextDrawAlignment(playerid, Stat[playerid], 2);

PlayerTextDrawColor(playerid, Stat[playerid], -1);

PlayerTextDrawSetShadow(playerid, Stat[playerid], 0);

PlayerTextDrawSetOutline(playerid, Stat[playerid], 1);

PlayerTextDrawBackgroundColor(playerid, Stat[playerid], 51);

PlayerTextDrawFont(playerid, Stat[playerid], 2);

PlayerTextDrawSetProportional(playerid, Stat[playerid], 1);



FPG[playerid] = CreatePlayerTextDraw(playerid, 547.765014, 28.000236, "_");

PlayerTextDrawLetterSize(playerid, FPG[playerid], 0.155411, 1.284999);

PlayerTextDrawAlignment(playerid, FPG[playerid], 1);

PlayerTextDrawColor(playerid, FPG[playerid], -1);

PlayerTextDrawSetShadow(playerid, FPG[playerid], 0);

PlayerTextDrawSetOutline(playerid, FPG[playerid], 1);

PlayerTextDrawBackgroundColor(playerid, FPG[playerid], 51);

PlayerTextDrawFont(playerid, FPG[playerid], 2);

PlayerTextDrawSetProportional(playerid, FPG[playerid], 2);

return 1;

}
  Reply
#3
does not follow the same problem only textdraw is shown to the first player connected to the rest they do not load textdraw
  Reply
#4
help?
  Reply
#5
help How can I make the textdraw stats show up at all?because my code does not work. only works for one
  Reply


Forum Jump: