cmd /login
#1

i found a football gamemod and i have this cmd and when i type /login password show me LOGIN ERROR

Код:
//-------------------------------------------------("DUDB")-------------------------------------------------
	if (strcmp(cmd, "/login", true) == 0)
	{
	   	if (dUserINT(PlayerName(playerid)).("banned") == 1)
		{
    	new pName[MAX_PLAYER_NAME];
    	new string1[128];
    	GetPlayerName(playerid, pName, sizeof(pName));
    	format(string1, sizeof(string1), "%s has been kicked from the server, Reason: ACCOUNT BANNED.", pName);
    	SendClientMessageToAll(COLOR_RED, string1);
		Kick(playerid);
  		}
		else if (logged[playerid] != 1 && udb_Exists(PlayerName(playerid)))
		{
			new dir[256];
			dir = strtok(cmdtext, idx);
			if (strlen(dir) && strcmp(dir, dUser(PlayerName(playerid)).("password"), true) == 0)
		{
			logged[playerid] = 1;
			new score = dUserINT(PlayerName(playerid)).("goalsscored");
			SetPlayerScore(playerid,score);

			SendClientMessage(playerid, COLOR_RED, "Successfully Logged in!");
		}
	}
		else SendClientMessage(playerid, COLOR_RED, "Login error!");
		return 1;
	}
Reply


Messages In This Thread
cmd /login - by srcka< - 15.08.2012, 12:21
Re: cmd /login - by Jstylezzz - 15.08.2012, 12:28
Re: cmd /login - by srcka< - 15.08.2012, 16:24

Forum Jump:


Users browsing this thread: 2 Guest(s)