Message not showing
#1

I have a message on my admin script thats supposed to show a message either when you connect,
Or when you request a class, It dosent show,

Im using seifadmin,
Code on seifadmin:
pawn Код:
public OnPlayerConnect(playerid)
{
  AccountInfo[playerid][Jail] = 0;
  AccountInfo[playerid][AdminLevel] = 0;
  AccountInfo[playerid][Warns] = 0;
  AccountInfo[playerid][Logged] = 0;
  AccountInfo[playerid][Mute] = 0;
  format(AccountInfo[playerid][Password], 128, " ");
  format(AccountInfo[playerid][WarnReason1], 128, "NONE");
  format(AccountInfo[playerid][WarnReason2], 128, "NONE");
  format(AccountInfo[playerid][WarnReason3], 128, "NONE");
  Drugs[playerid] = 0;
  Hide[playerid] = 0;
  SuperPunch[playerid] = 0;
  ViewCmds[playerid] = 0;
  PlayerDelVeh[playerid] = INVALID_VEHICLE_ID;
  PMBlock[playerid] = false;
  if (strcmp(ServerLockPass, "-", true))
  {
    SendClientMessage(playerid, ADMIN_RED, "|- Server is locked -|");
    ShowPlayerDialog(playerid, DIALOG_TYPE_SERVLOCKPASS, DIALOG_STYLE_INPUT, "Server is currently locked.", "Enter the password to access it:", "Enter", "Cancel");
  }
  new string[128];
  new ip[20];
  new sendername[MAX_PLAYER_NAME];
  GetPlayerName(playerid, sendername, sizeof(sendername));
  GetPlayerIp(playerid, ip, sizeof ip);
  strmid(AccountInfo[playerid][IP], ip, 0, strlen(ip), 128);
    format(string, sizeof(string), "/sAccounts/%s.seifadmin", sendername);
    if (!fexist(string)) return SendClientMessage(playerid,WHITE,"SERVER: Your account isn't registered. Please register ( /register [password] )");
    #if defined ENABLE_AUTO_LOGIN
    {
        new File:user = fopen(string, io_read);
        if (user)
        {
          new pass[128];
          new passres[128], value[128];
          new loop = 1;
          WHILE:
          while (fread(user, pass))
          {
            printf("line: %s", pass);
            strmid(passres, GetFileString(pass), 0, strlen(GetFileString(pass)), 128);
              if (loop == 1)
              {
                if (!strcmp("IPAddress", passres)) printf("IP; %s", GetFileValue(pass));
                  if (!strcmp("Password", passres))
                    {
                        value = GetFileValue(pass);
                        strmid(AccountInfo[playerid][Password], value, 0, strlen(value)-1, 128);
                        loop = 2;
                        goto WHILE;
                    }
                }
                else if (loop == 2)
                {
                  if (!strcmp("IPAddress", passres))
                    {
                        printf("%s", passres);
                        strmid(passres, value, 0, strlen(value)-1, 20);
                        printf("file-ip: %s | player-ip: %s", GetFileValue(pass), AccountInfo[playerid][IP]);
                        if (!strcmp(AccountInfo[playerid][IP], passres, true))
                        {
                          SendClientMessage(playerid, YELLOW, "|- Auto Login -|");
                          fclose(user);
                          OnPlayerLogin(playerid, AccountInfo[playerid][Password]);
                          return 1;
                        }
                        else
                        {
                          if (fexist(string))
                            {
                                SendClientMessage(playerid, WHITE, "SERVER: That account is registered.");
                                SendClientMessage(playerid, ORANGE, "Please login to retrieve your account stats ( /login [password] )");
                            }
                            fclose(user);
                        }
                    }
                }
            }
            fclose(user);
        }
    }
    #else
    {
        if (fexist(string))
        {
            SendClientMessage(playerid, WHITE, "SERVER: That account is registered.");
            SendClientMessage(playerid, ORANGE, "Please login to retrieve your account stats ( /login [password] )");
        }
    }
    #endif
    return 1;
}
And theres nothing on my gamemode code,
Anyone know why it isent showing..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)