SA-MP Forums Archive
[Help] Loading user file's - 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: [Help] Loading user file's (/showthread.php?tid=130093)



[Help] Loading user file's - dclaw - 25.02.2010

In my server.
I got if you register, ur Registered will be set to 1. that works fine
I maked if ur register = 0. u get an message. Please register.
But that message and the message Please login. are not working.
I know how i can make them work. but idk how to script that.
Who can help my.

What i think thats the problem is:
If you come in-game and you do /login ur stats will be loaded. so the onplayerconnect cant see if you are registered.

What 2 make:
under function OnPlayerConnect
something like. if ur userfile is created. Load Registered.


IM AM USING DINI

i will thank u in advance


Re: [Help] Loading user file's - dclaw - 25.02.2010

Nobody?


Re: [Help] Loading user file's - kmzr - 25.02.2010

Post your script


Re: [Help] Loading user file's - Niixie - 25.02.2010

Guess that'll work

Код:
public OnPlayerConnect(playerid, blabla)
{
   format(file, sizeof(file), "%s.ini", playername);
   if(!dini_exists(file))
   {
     SendClientMessage(playerid, COLOR_GREEN, "Please register your account");
   }
   else
   {
     SendClientMessage(playerid, COLOR_GREEN, "An account is already created to that nickname, please /login or change name");
   }
   return 1;
}



Re: [Help] Loading user file's - dclaw - 25.02.2010

Quote:
Originally Posted by Niixie
Guess that'll work

Код:
public OnPlayerConnect(playerid, blabla)
{
  format(file, sizeof(file), "%s.ini", playername);
  if(!dini_exists(file))
  {
     SendClientMessage(playerid, COLOR_GREEN, "Please register your account");
  }
  else
  {
     SendClientMessage(playerid, COLOR_GREEN, "An account is already created to that nickname, please /login or change name");
  }
  return 1;
}
Is that working same as auto login, but without message?