SA-MP Forums Archive
[SOLVED]Problem with (ip login) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Problem with (ip login) (/showthread.php?tid=150950)



[SOLVED]Problem with (ip login) - park4bmx - 28.05.2010

BUG [SOLVED]

AND THANK TO
Conroy
&
DeathOnaStick



Re: Problem with (ip login) - DeathOnaStick - 28.05.2010

OnPlayerConnect: Why does "format" open a bracket? Sry if this is a dumb question somehow, but for me it seems a bit weird.


Re: Problem with (ip login) - Conroy - 28.05.2010

pawn Код:
if(strcmp(rip[playerid], dini_Get(file,"IP")))
replace with:

pawn Код:
if(!strcmp(rip[playerid], dini_Get(file,"IP")))



Re: Problem with (ip login) - DeathOnaStick - 28.05.2010

Quote:
Originally Posted by Conroy
pawn Код:
if(strcmp(rip[playerid], dini_Get(file,"IP")))
replace with:

pawn Код:
if(!strcmp(rip[playerid], dini_Get(file,"IP")))
+bracket wrong set (now i noticed exactly where)

pawn Код:
if(fexist(file))
{
Format(file,sizeof(file),"/mRegistration/%s IP.ini",name);
GetPlayerIp(playerid,rip[playerid],16);
if(strcmp(rip[playerid], dini_Get(file,"IP")))
{
SpawnPlayer(playerid);
IsLogged[playerid] = 1;
TogglePlayerSpectating(playerid, 0);
}
if(!dini_Exists(file))
{
ShowPlayerDialog(playerid, WELCOME2, DIALOG_STYLE_MSGBOX, "Welcome", string, "Register", "Login");
}
I hope this solved the problem so far.


Re: Problem with (ip login) - Conroy - 28.05.2010

As I said in my previous post, strcmp requires a ! if you are wanting to match two variables.


Re: Problem with (ip login) - park4bmx - 28.05.2010

Found the problem

There was a BUG under onplayerconnect
Fixed it and now it works fine

AND THANK YOU VERY MUCH
Conroy
&
DeathOnaStick



Re: [SOLVED}Problem with (ip login) - park4bmx - 28.05.2010

[SOLVED]