[Help] Loading user file's
#1

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
Reply
#2

Nobody?
Reply
#3

Post your script
Reply
#4

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;
}
Reply
#5

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?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)