When player login to the server[/register & /login]
#6

The language isn't important. Plus, you don't need two variables to store if a player is registered or not.

Can you tell me exactly the name of the variables you use to store whether a player is logged-in and registered?

EDIT: Also, this should be under OnPlayerRequestSpawn since you are forcing him to login before he can spawn.

EDIT2:
Try doing something like this:

Code:
public OnPlayerRequestClass(playerid,classid)
{
	PlayerInfo[playerid][pModel] = Peds[classid][0];
	return 1;
}
Code:
public OnPlayerRequestSpawn(playerid)
{
	new string[128];
	PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
	
	if(IsPlayerNPC(playerid))
	{
		SpawnPlayer(playerid);
		return 1;
	}
	
	if(RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] == 0)
	{
		ClearChatbox(playerid, 10);
		format(string, sizeof(string), "Welcome to --, Version: %s", SCRIPT_VERSION);
		SendClientMessage(playerid, COLOR_YELLOW, string);
		SendClientMessage(playerid,COLOR_YELLOW5,"____________________________________________________");
	
		if(gPlayerAccount[playerid] == 1) SendClientMessage(playerid, COLOR_YELLOW2, "User-Name Found! Recive Your Server Stats, /Login [Password]");
		
		else SendClientMessage(playerid, COLOR_YELLOW2, "User-Name Is Not Registered! Register A New Account, /Register [Password]");
		
		SendClientMessage(playerid,COLOR_YELLOW5,"____________________________________________________");
		SetPlayerPos(playerid, 172.591888, -1951.659057, 3.773437);
		SetPlayerFacingAngle(playerid, 59.557853);
		SetPlayerCameraLookAt(playerid, 172.591888, -1951.659057, 3.773437);
		SetPlayerCameraPos(playerid, 172.591888 + (10 * floatsin(-59.557853, degrees)), -1951.659057 + (10 * floatcos(-59.557853, degrees)), 3.773437);
		
		SetPlayerTeamFromClass(playerid,classid);
	}
	else if(gPlayerLogged[playerid] == 1)
	{
		SetPlayerTeamFromClass(playerid,classid);
		SpawnPlayer(playerid);
	}
	return 0;
}
Reply


Messages In This Thread
When player login to the server[/register & /login] - by Taz86 - 20.06.2010, 08:33
Re: When player login to the server[/register & /login] - by DJDhan - 20.06.2010, 08:47
Re: When player login to the server[/register & /login] - by Taz86 - 20.06.2010, 08:53
Re: When player login to the server[/register & /login] - by NitroSWA - 20.06.2010, 09:04
Re: When player login to the server[/register & /login] - by Taz86 - 20.06.2010, 09:05
Re: When player login to the server[/register & /login] - by DJDhan - 20.06.2010, 09:09

Forum Jump:


Users browsing this thread: 1 Guest(s)