Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

no load player textdraw all

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?

ID
d6ouivnilegovhg7bmpg
author
nbx2000's avatar

nbx2000

@nbx2000


View profile
Copy link
  Report member
started
Jan 29, 2021
replies
4
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
no load player textdraw all
nbx2000's avatar

nbx2000

@nbx2000


View profile
Copy link
  Report member
• 5y
Pawn Scripting

no load player textdraw all

pawn

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?

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;
}

0 likes4 replies
  1. radical's avatar

    Radical

    @radical


    View profile
    Copy link
      Report member
    • 5y

    Try this:

    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;
    
    }
  2. nbx2000's avatar

    nbx2000

    @nbx2000


    View profile
    Copy link
      Report member
    • 5y

    does not follow the same problem only textdraw is shown to the first player connected to the rest they do not load textdraw

  3. nbx2000's avatar

    nbx2000

    @nbx2000


    View profile
    Copy link
      Report member
    • 5y

    help?

  4. nbx2000's avatar

    nbx2000

    @nbx2000


    View profile
    Copy link
      Report member
    • 5y

    help How can I make the textdraw stats show up at all?because my code does not work. only works for one

Please sign up or log in to reply