Jump to content
  • 0

Vreau sa bag Rcon password 2


Question

Posted

Salut, sunt incepator in ceea ce tine de samp [creare,scripting]... e primul meu server si as vrea sa bag 2 parole la rcon... dupa ce te loghezi la prima, sa ti-o ceara si pe a doua.

!Nu stiu cum, dar cineva tot imi sparge serverul si le da la toti admin si vip...etc!

Cum pot face?

Folosesc game mode romania real stunt

13 answers to this question

Recommended Posts

Posted

[tt]Invata. Uite niste indicii[/tt]

[tt]public OnRconLoginAttempt( ip[], password[ ], success )[/tt]

[tt]public OnDialogResponse (playerid, dialogid, response, listitem, inputtext[ ] )[/tt]

7bdea99b11.png

rimmon curv.

Posted

[tt]Invata. Uite niste indicii[/tt]

[tt]public OnRconLoginAttempt( ip[], password[ ], success )[/tt]

[tt]public OnDialogResponse (playerid, dialogid, response, listitem, inputtext[ ] )[/tt]

M-ai lamurit total :))

#Altcineva ?

Posted

Omul ti-a dat cele necesare pentru a face scriptul. Aici este sectiunea "Ajutor scripting" NU "fa-mi/da-mi si mie"

Si ce fac eu cu liniile astea?  :undecided:

Posted

Vrei un sfat?

Dezactiveaza RCON-ul,si fa comanda /makeadmin(/setlevel,depinde cum ai tu),sa poata fi accesata doar de pe contul tau.

Massari e curva mea

Posted

Uite un script:

#define FILTERSCRIPT

#include <a_samp>

//-------------------Defines--------------------
#define SecondaryRconPass "Beta" //Parola secundara
#define DIALOG_TYPE_SecondaryRcon           2013
//----------------------------------------------

//------------------------------------------------------------------------------
new Attempts[MAX_PLAYERS];
//------------------------------------------------------------------------------
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" RCON SPassword - Loaded succesfully!");
	print("--------------------------------------\n");
	return 1;
}
#endif

public OnRconLoginAttempt(ip[], password[], success)
{
	if(success)
	{
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
  			if(IsPlayerConnected(i))
  			{
  			    new pIP[16];
				GetPlayerIp(i, pIP, 16);
				if(!strcmp(pIP,ip,true))
				{
					new string[128];
					format(string,sizeof(string),"{FFFFFF}Please enter the secondary password!");
					ShowPlayerDialog(i, DIALOG_TYPE_SecondaryRcon, DIALOG_STYLE_PASSWORD,"RCON Secondary Password",string, "Ok", "Close");
				}
			}
		}
	}
	return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_TYPE_SecondaryRcon)
	{
	    if (response)
	    {
        	if (!strcmp(SecondaryRconPass, inputtext) && !(!strlen(inputtext)))
			{
    			GameTextForPlayer(playerid, "~r~~h~RCON ~w~~h~Authorized !",3000,3);
			}
			else
			{
				if(Attempts[playerid] == 3)
				{
					SendClientMessage(playerid, 0xFF0000AA, "You are kicked for entering wrong Secondary RCON Password!");
				 	Kick(playerid);
				}
				Attempts[playerid] ++;
				new tmp[140];
	  			SendClientMessage(playerid, 0xFF0000AA, "Invalid RCON Password!");
   				format(tmp,sizeof(tmp),"{FF0000}Invalid Password! \n{FFFFFF}Enter the correct {FF0000}RCON Secondary Password{FFFFFF}!\n\n{FFFF00}Attempts: {FF0000}%d{33FF33}/3", Attempts[playerid]);
				ShowPlayerDialog(playerid, DIALOG_TYPE_SecondaryRcon, DIALOG_STYLE_PASSWORD, "RCON Secondary Password",tmp, "Ok", "Close");
			}
        }
		else
		{
			SendClientMessage(playerid, 0xFF0000AA, "Kicked !");
	    	return Kick(playerid);
 		}
    }
 	return 1;
}

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.