SA-MP Forums Archive
Modify a Login System help - 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: Modify a Login System help (/showthread.php?tid=105619)



Modify a Login System help - DArgo2006 - 30.10.2009

New to scripting and still learning. Can you please tell me where are the wrongs in this script ?
I really have to fix it to add to the server soon

Quote:

public OnPlayerRequestSpawn(playerid)
{
if gPlayerAccount[playerid] = 1;
{
SendClientMessage(playerid,COLOR_GREEN,"Please /login *Password*");
return 0;
}
else
{
SendClientMessage(playerid,COLOR_GREEN,"Please /register *Password*");
return 0;
}
{
if (gPlayerLogged[playerid] != 0)
{
return 1;
}
}
}




Re: Modify a Login System help - Finn - 30.10.2009

Quote:
Originally Posted by DArgo2006
Quote:

if gPlayerAccount[playerid] = 1;

That is the part which goes wrong.

I'll let you find out yourself what's wrong in it.

Edit:
Why did you do the first if-statement that way, if the second one is just how it should be:
Quote:

if (gPlayerLogged[playerid] != 0)