Jakub Kučera 6 Odesláno: 25. Červen, 2014 Share Odesláno: 25. Červen, 2014 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 More sharing options...
0 Jakub Kučera 6 Odesláno: 25. Červen, 2014 Author Share Odesláno: 25. Červen, 2014 Ty robíš cmd systémy a nevieš ani cyklus? 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 Link to comment Share on other sites More sharing options...
0 Jakub Kučera 6 Odesláno: 25. Červen, 2014 Author Share Odesláno: 25. Červen, 2014 :d To mi fakt chceš povedať že si NIKDY nepotreboval cyklus? 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 More sharing options...
0 Kubko 22 Odesláno: 25. Červen, 2014 Share Odesláno: 25. Červen, 2014 Neviem, čo robí ten public "Heslo". Link to comment Share on other sites More sharing options...
0 Jakub Kučera 6 Odesláno: 25. Červen, 2014 Author Share Odesláno: 25. Červen, 2014 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 More sharing options...
0 ATomas 288 Odesláno: 25. Červen, 2014 Share Odesláno: 25. Červen, 2014 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 More sharing options...
0 Jakub Kučera 6 Odesláno: 25. Červen, 2014 Author Share Odesláno: 25. Červen, 2014 Aha, díky //Edit Funguje Link to comment Share on other sites More sharing options...
0 Tanga 131 Odesláno: 25. Červen, 2014 Share Odesláno: 25. Červen, 2014 Do hesla by si si mohol dať niečo náhodné, kedysi som tak mal RCON, keď sa hackovali heslá (neviem či sa to robí ešte stále). Link to comment Share on other sites More sharing options...
Dotaz
Jakub Kučera 6
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now