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
#2

Just block onplayerrequestspawn until they are logged in.
https://sampwiki.blast.hk/wiki/OnPlayerRequestSpawn

Either that or just create your own class selection screen.
Reply
#3

Please read everything I posted before you say.
Please anyone help me
LIKE THIS

Reply
#4

Please help
Reply
#5

eh so you want a dialog to popup before they select their skin? or ??
Reply
#6

No before the BUTTONS FOR ([<<] [>>] [SPAWN]) SHOW
Reply
#7

That is nearly impossible.
In some occasions the dialog might delay and the arrows will appear first.

( this is an opinion only ) I don't think there is anyway to make the dialog appear first than these buttons. On some occasions you might find the dialog appearing first before the button, and in some situations, the buttons might appear first (depending on how the client's PC/net loads - OPINION ONLY)
Reply
#8

LOOOKKKKK AT THE PICTURE I POSTED
Reply
#9

Do you know how to read? We are trying to help you, and you are showing us your attitude? Seriously dude?

Learn to read next time, let me re-post the lines where in I explain the thing you are trying to do.

"( this is an opinion only ) I don't think there is anyway to make the dialog appear first than these buttons. On some occasions you might find the dialog appearing first before the button, and in some situations, the buttons might appear first (depending on how the client's PC/net loads - OPINION ONLY)"

If you keep the attitude you had right now, there's no one who will help you.
Reply
#10

oooh you helped me soo much now =(
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)