How to Not enable spawn, without registering
#1

Right now the system is set to where people can spawn without registering there account, however if the account is taken it wont let them spawn without logging in.
I want it to where when they connect, if they dont have an account, they have to /register before spawning. Heres my onrequest spawn:
Код:
public OnPlayerRequestSpawn( playerid )
{
	if( INI_Exist ( pName( playerid ) ) )
	{
		if( GetPVarInt( playerid, "pLog" ) == 0 )
		{
			SendClientMessage( playerid, green, "This name is already registered. Please /login password to login to this account. ");
			return ( 0 );
		}
	}
	return ( 1 );
}
Heres my onplayerconnect:
Код:
public OnPlayerConnect( playerid )
{
 	if( GetPVarInt( playerid, "pLog" ) == 0 )
	{
		if( INI_Exist ( pName( playerid ) ) )
		{
			SystemMsg( playerid, "This name is already registered. Please /login [password] to login." );
		}
		else SystemMsg( playerid, "This name is not registered. /register password for free $150,000!" );
	}
	return ( 1 );
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)