26.10.2012, 08:22
Quote:
|
If the register/login automatically appears at spawn, you should just move the code from OnPlayerSpawn to OnPlayerConnect ( Most likely just the check if the player is registered and the first login/register dialog with some if statements. )
Jesse |
_____________________________
pawn Код:
//==============================================================================
// Request Register
//==============================================================================
if(AccInfo[playerid][Registered] == 0 && ServerInfo[MustRegister] == 1)
{
#if USE_DIALOGS == true
new rstring[256];
format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
#endif
return 1;
}
//==============================================================================
// Request Login
//==============================================================================
if(ServerInfo[MustLogin] == 1 && AccInfo[playerid][Registered] == 1 && AccInfo[playerid][LoggedIn] == 0)
{
#if USE_DIALOGS == true
new lstring[256];
format(lstring,256,"Account '%s 'is Registered!\n If you forgot your password post reply in our forum\n\n Login to access your Account:",pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT,"Login Account",lstring,"Login", "");
#endif
return 1;
}


