How to make only logged player saving stats.. :)
#7

It's not really a big deal mate.


If the player is logged in. (true/1)
Then execute your saving code.


--
Quote:
Originally Posted by Abagail
Посмотреть сообщение
You can use this in your save function.

if(IsPlayerLoggedIn(playerid))
{
SavePlayer(playerid);
}

or in a loop for example using foreach and a IsPlayerLoggedIn function:

foreach(Player, i)
{
if(IsLoggedIn(i))
{
SavePlayer(playerid);
continue;
}
}
pawn Код:
foreach(new i : Player)
{
      if(IsLoggedIn(i))
      {
             SavePlayer(i);
             continue;
      }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)