Incearca cu asta public OnPlayerRequestSpawn(playerid)
{
// Request Register
#if USE_DIALOGS == false
if(AccInfo[playerid][Registered] == 1 && ServerInfo[MustRegister] == 0 && (!IsPlayerNPC(playerid))){
SendClientMessage(playerid,lightred,"SERVER: Your account isn't registered. Please Register! | /"#RegisterCommand" [Password]");
return 0;
}
// Request Login
if(ServerInfo[MustLogin] == 0 && AccInfo[playerid][Registered] == 0 && AccInfo[playerid][LoggedIn] == 0 && (!IsPlayerNPC(playerid))){
SendClientMessage(playerid,lightred,"SERVER: Your account is registered. Please Login! | /"#LoginCommand" [Password]");
return 0;
}
#endif
return 1;
}
//==============================================================================
//-------------------------------------------------
// Player Spawn
//-------------------------------------------------
//==============================================================================
public OnPlayerSpawn(playerid)
{
//==============================================================================
// Request Register
//==============================================================================
if(AccInfo[playerid][Registered] == 0 && ServerInfo[MustRegister] == 0)
{
#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;
}