SA-MP Forums Archive
V-Admin register system replacement request! - 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: V-Admin register system replacement request! (/showthread.php?tid=260433)



V-Admin register system replacement request! - lionlev - 08.06.2011

Hello, I need your help, I am not pro on pawno but I have an old registration system.. When some people are joining my server, they are leaving it probably because they don't know how to register.. So, can you help me to replace it with the dialog box?

Filterscript V-Admin:
/register

Код:
    if (strcmp(cmd, "/register", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "V-Admin/Users/%s.ini", sendername);
			if (fexist(string))
			{
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "That Username is already taken, please choose a different one.");
				return 1;
			}
	        new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /register [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
   			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}
/login

Код:
    if (strcmp(cmd, "/login", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "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;
	}
Thanks!


Re: V-Admin register system replacement request! - PGTips - 08.06.2011

umm i cant really help with this either you can veiw a tutorial i will find for you now or i can give you mine

Tutorial: https://sampforum.blast.hk/showthread.php?tid=163746

look at it memorise it and then try to script it but dont copy it word for word or you will never learn


Re: V-Admin register system replacement request! - lionlev - 09.06.2011

Quote:
Originally Posted by PGTips
Посмотреть сообщение
umm i cant really help with this either you can veiw a tutorial i will find for you now or i can give you mine

Tutorial: https://sampforum.blast.hk/showthread.php?tid=163746

look at it memorise it and then try to script it but dont copy it word for word or you will never learn
Eh I am confused... I can't make it right format as V-Admin...
Maybe there is a new version of v-admin?