[GUI] Maybe who can create Register and Login System?
#1

Hello
(Maybe who can create Register and Login System?)
Код:
//-------------------------------[Login]--------------------------------------------------------------------------
	if (strcmp(cmd, "/login", true) ==0 || strcmp(cmd, "/l", true) ==0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You a logged in.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAY, "USAGE: (/l)ogin [Password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			//Encrypt(tmppass);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}
	
	//-----------Register---------------
	if (strcmp(cmd, "/reg", true) ==0 || strcmp(cmd, "/register", true) ==0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "You a logged in.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "users/%s.ini", sendername);
			new File: hFile = fopen(string, io_read);
			if (hFile)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "Љis vartotojas jau yra sukurtas. Praљome pasikeisti į kitą");
				fclose(hFile);
				return 1;
			}
	    new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Naudojimas: (/reg)istruotis [slaptaћodis]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			//Encrypt(tmppass);
			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}
Like This:
Quote:



Reply
#2

Search, one already has been posted. Integrate it yourself.
Reply
#3

Ask in the script request topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)