Jump to content
  • 0

pomoc If Server Empty


Jakub Kučera

Dotaz

Ahoj, zkouším si udělat jeden FS, ale potřebuji udělat, že pokud je server prázdný = 0 hráčů, tak se nastaví heslo a spustí timer na X minut, dokud se server zase neodemkne a zase nebude možnost se připojit.

 

PS: Ten Timer Vím :)

Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 0

Ty robíš cmd systémy a nevieš ani cyklus? :d

 

stock Empty(){

for(new i; i< MAX_PLAYERS; i++){

if(IsPlayerConnected(i)) return false;

}

return true;

}

 

Díky, víš já jsem tohle zatím nepotřeboval :d

Link to comment
Share on other sites

  • 0

:d :d :d To mi fakt chceš povedať že si NIKDY nepotreboval cyklus? :d Tak to si nikdy ani neotvoril pawn LOL

 

 

Otevřel :) Ale když se podíváš do mých FS, tak jsem ho nikdy nepoužil.

 

Je to špatně ? Nebo proč mi to nejde?

 

for(new i; i< MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) return SetTimer("Heslo", 60000, false);
}
Link to comment
Share on other sites

  • 0

Neviem, čo robí ten public "Heslo".

public Heslo()
{
SendRconCommand("password Nic");
SetTimer("BezHesla", 60000, false);
return 1;
}

public BezHesla()
{
SendRconCommand("password 0");
return 1;
}
Link to comment
Share on other sites

  • 0

Bo to mas obracene heslo tito nastavi kdyz server prazdny neni

stock IsServerEmpty()
{
	for(new i;i<MAX_PLAYERS;i++)
	{
		if(IsPlayerConnected(i)) return 0;
	}
	return 1;
}

if(IsServerEmpty()) SetTimer("Heslo", 60000, false);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...