25.06.2011, 18:46
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_LOGIN:
{
if(!response)
{
SendClientMessage(playerid, COLOUR_RED, "Kick due to : Quitted login");
return Kick(playerid);
}
if(CheckUserLogin(playerid, inputtext))
{
if( PlayerInfo[playerid][tutorial] == 0)
{
SendClientMessage(playerid, COLOUR_BEACH, "Welcome to TT:AA. This is a quick test, followed by a tutorial to help you survive!" );
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDeathmilk", "Select", "Quit");
}
if( PlayerInfo[playerid][tutorial] >= 1)
{
LoginUser(playerid);
SpawnPlayer(playerid);
}
}
else
{
SendClientMessage(playerid, COLOUR_RED, "Wrong password, please try again");
return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Type in your password to login", "Login", "Quit");
}
}