SA-MP Forums Archive
Error in my script - 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: Error in my script (/showthread.php?tid=123995)



Error in my script - ~Dangun! - 28.01.2010

See pastebin link

http://pastebin.com/m1f88369e

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


Re: Error in my script - biltong - 28.01.2010

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


Re: Error in my script - Jeffry - 28.01.2010

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.


Re: Error in my script - ~Dangun! - 28.01.2010

@ 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;
  }