First Time
#1

How to check if is the first time the player enters in the server?
Reply
#2

ontop:

Код:
new entrance[MAX_PLAYERS];
connect:

Код:
if(entrance[playerid] == 0)
{
// do something
entrance[playerid] = 1;
}
else if(entrance[playerid] == 1)
{
// do sumthng.
}
return 1;
}
And i suggest save the entrance to a file or maybe this would work:

OnPlayerDisconnect:

Код:
entrace[playerid] = 1;
if not save it to a file onplayerdisconnect:

Код:
new Data[256];
  format(Data, 255, "Entrance/%s.ini", pName(playerid));
	dini_IntSet(Data, "Entrance", entrance[playerid]);
make sure you have pName function, or if u have another replace the pName with your function.

EDIT: If u use saving system make sure onplayerconnect u read it if he has entrance 1. (Or if it works without it then nvm this line.)
Reply
#3

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)