[HELP] This is weird?
#1

I'm using gPlayerLogged from an RP script (not the GF one). Now I made a timer that activates TextDraws once a player is not logged in, then it deactivates the TextDraws when the player logs on. Here's the code.

pawn Код:
public LoginTextDraw()
{
  for(new i = 0; i <= MAX_PLAYERS; i++)
  {
    if(gPlayerLogged[i] == 0)
    {
            TextDrawShowForPlayer(i, Textdraw0);
            TextDrawShowForPlayer(i, Textdraw1);
            TextDrawShowForPlayer(i, Textdraw2);
            TextDrawShowForPlayer(i, Textdraw3);
        }
        if(gPlayerLogged[i] == 1)
        {
            TextDrawHideForPlayer(i, Textdraw0);
            TextDrawHideForPlayer(i, Textdraw1);
            TextDrawHideForPlayer(i, Textdraw2);
            TextDrawHideForPlayer(i, Textdraw3);
        }
    }
    return 1;
}
Now, the TextDraw activates all normally on log on but when I login the server it does not hide the TextDraws. I been working on trying to fix this for half an hour and I can't find NOTHING that helps. If you know what to do please reply, thanks.
Reply
#2

try to put this on:

pawn Код:
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
at the bottom of

pawn Код:
OnPlayerLogIn
and this

pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
to
pawn Код:
OnPlayerConnect
or
pawn Код:
OnPlayerRequestClass
try
Reply
#3

Just hide the textdraws in your login command?
Reply
#4

Okay thanks Im_BanK , worked.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)