Annoying dialog
#1

Well, after a normal player register an account ( /register <password> ) and completes the tutorial, the dialog won't dissaperar, even if he relogs. Afte the player registered a new account, the dialog keeps showing up, asking him if he wants to register a new accoun when he already have one. ( If he /login it works )

Quote:

public OnPlayerRequestClass(playerid, classid)
{
PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
{
ClearChatbox(playerid, 10);
SetPlayerInterior(playerid,0);
LoginScreen(playerid);
SetPlayerVirtualWorld(playerid,1);
PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
Account[playerid][pInt] = 0;
Header1[playerid] = TextDrawCreate(265.000000,115.000000,"Account");
TextDrawAlignment(Header1[playerid],0);
TextDrawBackgroundColor(Header1[playerid],0x000000ff);
TextDrawFont(Header1[playerid],0);
TextDrawLetterSize(Header1[playerid],1.000000,1.000000);
TextDrawColor(Header1[playerid],0x00ffff66);
TextDrawSetOutline(Header1[playerid],1);
TextDrawSetProportional(Header1[playerid],1);
TextDrawSetShadow(Header1[playerid],1);
if(gPlayerAccount[playerid] == 1)
{
Login1[playerid] = TextDrawCreate(179.000000,124.000000,"~w~Welcome Back, in order to play just type ~r~/login [password]~w~~n~~n~If you need any information just visit ~g~http://evolution-gaming.co.uk");
TextDrawUseBox(Login1[playerid],1);
TextDrawBoxColor(Login1[playerid],0x00000066);
TextDrawTextSize(Login1[playerid],480.000000,0.000000);
TextDrawAlignment(Login1[playerid],0);
TextDrawBackgroundColor(Login1[playerid],0x000000ff);
TextDrawFont(Login1[playerid],1);
TextDrawLetterSize(Login1[playerid],0.399999,1.000000);
TextDrawColor(Login1[playerid],0xffffffff);
TextDrawSetOutline(Login1[playerid],1);
TextDrawSetProportional(Login1[playerid],1);
TextDrawSetShadow(Login1[playerid],1);
TextDrawShowForPlayer(playerid,Login1[playerid]);
TextDrawShowForPlayer(playerid,Header1[playerid]);
SetTimerEx("KickTimer",120000,0,"i",playerid);
}
else
{
Register1[playerid] = TextDrawCreate(179.000000,124.000000,"~w~Welcome, it seems that you are new here, type ~r~/register [password]~w~ that you want.~n~~n~If you need any information just visit ~g~http://evolution-gaming.co.uk");
TextDrawUseBox(Register1[playerid],1);
TextDrawBoxColor(Register1[playerid],0x00000066);
TextDrawTextSize(Register1[playerid],480.000000,0.000000);
TextDrawAlignment(Register1[playerid],0);
TextDrawBackgroundColor(Register1[playerid],0x000000ff);
TextDrawFont(Register1[playerid],1);
TextDrawLetterSize(Register1[playerid],0.399999,1.000000);
TextDrawColor(Register1[playerid],0xffffffff);
TextDrawSetOutline(Register1[playerid],1);
TextDrawSetProportional(Register1[playerid],1);
TextDrawSetShadow(Register1[playerid],1);
TextDrawShowForPlayer(playerid,Register1[playerid]);
TextDrawShowForPlayer(playerid,Header1[playerid]);
SpawnPlayer(playerid);
//Kick(playerid);
}
SetPlayerTeamFromClass(playerid,classid);
}
else SpawnPlayer(playerid);
return false;
}

Screenshot : /imageshack/img836/3585/samp470b.png


Thank you.
Reply
#2

Ewww!!! You create that textdraw PER PLAYER?! That's some ugly code!

It should be one textdraw created OnGameModeInit, and show/hide as necessary.
Reply
#3

Quote:
Originally Posted by Austin
Посмотреть сообщение
Ewww!!! You create that textdraw PER PLAYER?! That's some ugly code!

It should be one textdraw created OnGameModeInit, and show/hide as necessary.
I'm not the one who made the login system, it is from a gamemode I downloaded from this forum.
Reply
#4

Anyone?


Thank you.
Reply
#5

Quote:
Originally Posted by marko94
Посмотреть сообщение
I'm not the one who made the login system, it is from a gamemode I downloaded from this forum.
Then post your doubt on gamemode thread.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)