[help] /login /register problem ?
#1

i ve got roleplay server i put all filescriptes, gm and scripting file...

all is working but when someone want /register or /login acc it is not react ?

i dont know what is the problem ?

i try to change commands /login and /register from other GM and same is hapening...

someone help ...
Reply
#2

Show your /login /register.
Reply
#3

Код:
//-------------------------------[Login]--------------------------------------------------------------------------
	if (strcmp(cmd, "/login", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_RED, "~°~Balkan-SF~°~® RP server: Vec ste logirani.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /login <lozinka>");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}
	if (strcmp(cmd, "/register", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, " * SERVER: Vec ste ulogirani.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "/accounts/%s.ini", sendername);
			new File: hFile = fopen(string, io_read);
			if (hFile)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "To ime vec postoji, molimo uzmite drugo ime.");
				fclose(hFile);
				return 1;
			}
			if(strlen(sendername) >= 16) { // Igrica automatski ne dopusta vise od 16 znakova , ali za svaki slucaj :)
				SendClientMessage(playerid, COLOR_YELLOW, "Vase ime mora imati manje od 16 slova!");
			}
	 	  /*new ch = sendername[0];
			new i;
			if(strfind(sendername, "_", true) == -1) return SendClientMessage(playerid, COLOR_LIGHTRED, "Ime i prezime izmedu mora sadrzavati podvlaku!");
			if((ch >= 'a' && ch <= 'z')) return SendClientMessage(playerid, COLOR_LIGHTRED, "Ime i prezime mora biti napisano velikim pocetnim slovom!");
			while(sendername[i++]) {
  			if(strfind(string[i], "_", true) != -1) {
  				string[i++];
  				if(string[i] >= 'a' && string[i] <= 'z') {
						return SendClientMessage(playerid, COLOR_LIGHTRED, "Ime i prezime mora biti napisano velikim pocetnim slovom!");
					}
				}
				else return Kick(playerid);
			}*/
	    new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /register <lozinka>");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}
I changed this login/register with this and same:

Код:
//-------------------------------[Login]--------------------------------------------------------------------------
	if (strcmp(cmd, "/login", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /login [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}
	if (strcmp(cmd, "/register", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: Vec ste logirani.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "%s.ini", sendername);
			new File: hFile = fopen(string, io_read);
			if (hFile)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "To ime nazalost vec postoji ali mozete izabrati drugo.");
				fclose(hFile);
				return 1;
			}
	    new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}
Is there some problem with scripting files or FS ? is that possible ?

my home made server is working well... but on FTP when i upload GM, FS and ScriptFiles is not working...
you can go to my server ip is: 85.25.124.155:7725 pass: kastav and tell me whats the problem...





Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)