Anti spawn dialog ????
#1

Hi everyone how to make that it wont show spawn(for request class) until he wont login/register when he connects??


Код:
public OnPlayerConnect(playerid)
{
bla bla bla
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == DIALOG_REGISTER)
{
gPlayerLogged[playerid] = 1;
//bla bla bla
}
if (dialogid == DIALOG_LOGIN)
{
//bla bla bla
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp)
{
//bla bla bla
}
else
{
gPlayerLogged[playerid] = 1;
//bla bla bla
if(!response) return Kick(playerid);
}
}
return 1;
}
function SetupPlayerForClassSelection(playerid)
{
new name[MAX_PLAYER_NAME], file[126];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), PLAYERS, name);
if(fexist(file))
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FF8040}Login!", "{FF0000}Welcome back!\n {44FF00}Please login.", "Login", "Leave");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FF8040}Register", "{FF0000}Welcome!\n You are new here!\n {44FF00}Please register", "Register", "Leave");
}
}
Reply


Messages In This Thread
Anti spawn dialog ???? - by kalanerik99 - 17.04.2015, 19:30
Re: Anti spawn dialog ???? - by Infamous - 18.04.2015, 00:35
Re: Anti spawn dialog ???? - by kalanerik99 - 18.04.2015, 07:57
Re: Anti spawn dialog ???? - by kalanerik99 - 18.04.2015, 11:17
Re: Anti spawn dialog ???? - by Smileys - 18.04.2015, 11:19
Re: Anti spawn dialog ???? - by kalanerik99 - 18.04.2015, 11:24
Re: Anti spawn dialog ???? - by JaKe Elite - 18.04.2015, 11:26
Re: Anti spawn dialog ???? - by kalanerik99 - 18.04.2015, 11:30
Re: Anti spawn dialog ???? - by JaKe Elite - 18.04.2015, 11:32
Re: Anti spawn dialog ???? - by kalanerik99 - 18.04.2015, 11:35

Forum Jump:


Users browsing this thread: 1 Guest(s)