[Ajuda] /logar
#1

galera meu comando /logar estб logando com qalker senha qe bote msm qe nao seje a registrada.
e pra aqueles qe vim falar qe meu gm й thug ou gf ou vim criticar esse й um forum pra ajuda desde ja agradeзo esses.
Код:
 	if (strcmp(cmd, "/logar", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_DBLUE, "[BPC]: Vocк jб esta logado.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USE: /logar [Senha]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}
	if (strcmp(cmd, "/registrar", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_DBLUE, "[BPC]: Vocк jб esta logado.");
				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, "Este Nick jб existe, tente outro.");
				fclose(hFile);
				return 1;
			}
	    new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USE: /registrar [Senha]");
				SendClientMessage(playerid, COLOR_YELLOW, "-==> Use Nome_Sobrenome ( Ex: Guru_Josh ) <==-");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}
Reply


Messages In This Thread
[Ajuda] /logar - by Joao Ziicka - 26.02.2010, 00:42
Re: [Ajuda] /logar - by Guilherme_Canani - 26.02.2010, 01:15
Re: [Ajuda] /logar - by Joao Ziicka - 26.02.2010, 01:34
Re: [Ajuda] /logar - by Andre_Santos - 26.02.2010, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)