26.06.2011, 14:36
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] >= 1)
{
TogglePlayerSpectating(playerid, false);
LoginUser(playerid);
SpawnPlayer(playerid);
}
if( PlayerInfo[playerid][tutorial] == 0)
{
SendClientMessage(playerid, RED, "You left during the tutorial, not to worry here it is now.
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "What is meant by DM", "Deadmen\nDeathmatching\nDeathmaking\nDudemoaning", "Select", "Quit");
}
}
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");
}
}