SA-MP Forums Archive
Help quick please with <Login Player>. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help quick please with <Login Player>. (/showthread.php?tid=428973)



Help quick please with <Login Player>. - Luca12 - 07.04.2013

Hello everywone i have a problem so my friend is on the server and i loggin in and login dialog doesn't show me when someone on the server when I'm alone on the server then works. I mean show me the dialog for login, and when someone is on the server, and I'm going then I do not show the login dialog.


AW: Help quick please with <Login Player>. - [AK]Nazgul - 07.04.2013

Please post the code of the part where it should show the dialog


Re: Help quick please with <Login Player>. - Luca12 - 07.04.2013

So I worked Yini system save and load a player's variables here are part of the OnPlayerConnect di watching whether the player or not Regan

first I give you a part from onplayerconnect public

Quote:

if(fexist(Path(playerid)))
{
ShowLogin(playerid);
}
else
{
ShowIntro(playerid);
TextDrawShowForPlayer(playerid,crni);
SetPlayerColor(playerid,COLOR_GRAD2);
return 1;
}

then showlogin
showlogin shows that if a player is regan to switch ga ga over there or to switch to the login part

you will see login state that is where show dialog login. Sorry for my bad english

Quote:

stock ShowLogin(playerid)
{
if(IsPlayerConnected(playerid))
{
SetPVarInt(playerid, "loginstate", 1); //INTRO 1.
}
return 1;
}
//-----------------------[ LOGIN STATE ]-----------------------------------------//
public LoginCheck(playerid) {
for(new i=0;i<MAX_PLAYERS;i++) {
if(IsPlayerConnected(i) && GetPVarInt(i, "loginstate") != 0) {
if(GetPVarInt(i, "loginstate") == 1) {
SetTimerEx("PostaviKameru",1000,false,"d",i);
new name[MAX_PLAYER_NAME],loginstring[512];
GetPlayerName(i,name,sizeof(name));
KillTimer(IntroLogin[playerid]);
INI_ParseFile(Path(i),"loadaccount_%s", .bExtra = true, .extra = i);
format(loginstring,sizeof(loginstring),"{00C0FF}__ ___________________________________\n\n{FFFFFF}Dob rodoĆĄao na G-Unit RolePlay/Dm Server! {00C0FF}\n\n%s\n{FFFFFF}Vas je korisnicki racun pronadjen!\n\nMolimo upisi lozinku da udjes na server:\n{00C0FF}_________________________________ ______",name);
ShowPlayerDialog(i,dlogin,DIALOG_STYLE_PASSWORD,"P rijava",loginstring,"Logiraj","Izlaz"); } } } //}

return 1;
}


Re: Help quick please with <Login Player>. - Luca12 - 08.04.2013

please, anywone