Jump to content

Question

Posted

1 Am un mod care nu accepta mai mult de 25 de playeri .. Servaru e hostat 50 sloturi , am bagat si alte GM si mergea peste 30 de playeri ..

2 imi ziceti unde gasesc huiqlhw1pglpvv6govl_thumb.gif Alea cu S V N ... ?

9 answers to this question

Recommended Posts

Posted

public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
		    new string3[32];
			new playername3[MAX_PLAYER_NAME];
   new WantedLevel[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
			    strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
			    new var[32];
				format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
				PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid); 
if(dialogid == 12345)
		{
		    if(strlen(inputtext))
		    {
				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, "That Username is already taken, please choose a different one.");
					fclose(hFile);
					return 1;
				}
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerRegister(playerid,tmppass);
			}
			else
			{
 				new regstring[128];
				new regname[64];
				GetPlayerName(playerid,regname,sizeof(regname));
				format(regstring,sizeof(regstring),"Bun venit,{00CC00} %s\n {FFFFFF}Nu esti inregistrat.\nTe rog scrie-ti parola aici:",regname);
				ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
			}
		}
	}
stock strvalEx( const string[] )
{
   //Register Protection
   if( strlen( string ) >= 50 ) return 0;
   return strval(string);
}
if (gPlayerAccount[playerid] != 0)
		{
			new loginstring[128];
			new loginname[64];
			GetPlayerName(playerid,loginname,sizeof(loginname));
			format(loginstring,sizeof(loginstring),"{FFFFFF}Bine ai Revenit {00CC00} %s\n{FFFFFF}Acest nick este inregistrat.\n{FFFFFF}Te poti loga acum:",loginname);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
		}
public OtherTimer()
{
	new string[256];
	new Float:oldposx, Float:oldposy, Float:oldposz;
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
            if(SafeTime[i] > 0)
			{
				SafeTime[i]--;
			}
			if(SafeTime[i] == 1)
			{
				if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
				{
				    new loginname[64];
					new loginstring[128];
					GetPlayerName(i,loginname,64);
					format(loginstring,sizeof(loginstring),"{00FFFF}Bun Venit pe UnionComunity RolePlay, {FF0000} %s\n {00FFFF}Te poti loga acum:",loginname);
					ShowPlayerDialog(i,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Intrare","Iesire");
				}
			}
new loginstring[128];
				new loginname[64];
				GetPlayerName(playerid,loginname,sizeof(loginname));
				format(loginstring,sizeof(loginstring),"{00FFFF}Bun venit {FF0000} %s\nTe poti loga acum:",loginname);
				ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
			}
	}
public OnPlayerLogin(playerid,password[])
{


    ClearAnimations(playerid);//clear
	SetPlayerHealth(playerid,0.0);
	new tmp2[256];
    new string2[64];
	new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
	format(string2, sizeof(string2), "users/%s.ini", playername2);
	new File: UserFile = fopen(string2, io_read);
	if ( UserFile )
	{
	    new PassData[256];
	    new keytmp[256], valtmp[256];
	    fread( UserFile , PassData , sizeof( PassData ) );
	    keytmp = ini_GetKey( PassData );
	    if( strcmp( keytmp , "Key" , true ) == 0 )
		{
			valtmp = ini_GetValue( PassData );
			strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
		}
		if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
		{
			    new key[ 256 ] , val[ 256 ];
			    new Data[ 256 ];
       new WantedLevel[MAX_PLAYER_NAME];

Guest farse
Posted

ai cumva in gm ceva gen:

#undef MAX_PLAYERS

#define MAX_PLAYERS 25

?

Posted

Nu ...

nu...nu ai pe dracu(scz de expresie) nu ai cum sa nu ai pt ca ala yonutzzz sau cum il cheama de pe sa-mp.ro are acelasi GM ca si tn sunt sigur ca akm ii "moda" sa folositi toti GreenZone RP sau cum il cheama...deci cam toti aveti aceasi problema...

Fara reclama in semnatura!

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.