Error in my script
#1

See pastebin link

http://pastebin.com/m1f88369e

Also i am not sure if i made this auto login in a correct way!
Reply
#2

Why put an else there if it does nothing? Also, check your indentation, it's really whack :/
Reply
#3

pawn Код:
new IP[16];
     new name2[MAX_PLAYER_NAME];
     GetPlayerName(playerid, name2, sizeof(name2));
     new string2[90];
     GetPlayerIp(playerid, IP, 16);
     format(string2, sizeof(string2), "IP=%s", dini_Get(name2, "IP"));
     if(strcmp(string2, IP, false)) { return SendClientMessage(playerid, ADMIN,"This account isn't registered! Use /register to register it."); }
       if(strcmp(string2, IP, true)) { OnPlayerLogin(playerid); return 1;}
       
   }
Try this, but its untested.
Reply
#4

@ Jeffry. I used that code, now when i connect it says i am not registered, (because the message). now i just have to /login again. any solutions?

pawn Код:
new IP[16];
  new name2[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name2, sizeof(name2));
  new string2[90];
  GetPlayerIp(playerid, IP, 16);
  format(string2, sizeof(string2), "IP=%s", dini_Get(name2, "IP"));
  if(strcmp(string2, IP, false)) { return SendClientMessage(playerid, ADMIN,"This account isn't registered! Use /register to register it."); }
    if(strcmp(string2, IP, true)) { OnPlayerLogin(playerid); return 1; }
  return 1;
  }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)