Jump to content
  • 0

Crash Server


Guest Mariachi

Question

Guest Mariachi
Posted

Stie cineva care ar putea fi cauza la urmatoarea problema ? Am modificat un mod , nu are nicio eroare / warning ,dar cand intru in joc si ma loghez ia crash serveru . Aici este codul de /login , daca stie cineva

//-------------------------------[Login]--------------------------------------------------------------------------
	if (strcmp(cmd, "/login", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "Server: Esti deja logat.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "FOLOSESTE: /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: Esti deja logat.");
				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, "Acest nume este deja luat, te rog alege altul.");
				fclose(hFile);
				return 1;
			}
	        new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "FOLOSESTE: /register [parola]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}

4 answers to this question

Recommended Posts

  • 0
Posted

Nu cred ca e de la asta dar incerca si asta

//-------------------------------[Login]--------------------------------------------------------------------------
if (strcmp(cmd, "/login", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_BRIGHTRED, "SERVER: You are already logged in.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_BRIGHTRED, "USAGE: /login [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}
asta e pentru login
//-------------------------------[Register]--------------------------------------------------------------------------
	if (strcmp(cmd, "/register", true)==0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /register [password]");
			return 1;
		}
		if (gPlayerAccount[playerid] == 1)
		{
			SendClientMessage(playerid, COLOR_ORANGE, "   Dieser Name ist registriert");
			return 1;
		}

pentru regietr

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

  • 0
  • Administrator
Posted

Verifica folderul scriptfiles...sigur e de acolo.

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

  • 0
Posted

asta e Godfather... posteaza in Topicul Godfather !!!

-Toate tutorialele postate intra aici sau puneti-le direct [url=http://www.sa-mp.ro/forum/index

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.