Uxi
Advanced User
- Joined
- Feb 9, 2015
- Messages
- 291
- Reaction score
- 6
Sktrypt na w??czanie silnika TFS 1.x Zabezpieczenie!Bez has?a nie uruchomisz silnika.Musisz mie? source lub pasy by go w?aczy?.Jesli stawiasz ots polecam source trzma? na swoim pc w razie czego mo?na skompilowa? i odpali? server.
[LUA] // Password prompt. I'm sure there are better ways to do this(for example maybe use string::compare() and put this somewhere else or in its own function)
const std::string c_password = "password"; // enter your password here. NO SPACES
std::string password = ""; // initialize string
std::cout << "Enter password please\t" << std::endl; // prompt user to enter pass
std::cin >> password; // get password from the console
// test to see if c_password is equals to password
if (c_password != password) { // if the password is not equals it will say "wrong pass" and exit the program with exit code -1(error)
std::cout << "Wrong password, cya!" << std::endl;
exit(-1);
} // if it is equals it will execute everything else normally[/LUA]
W linijce:
const std::string c_password = "password"; // enter your password here. NO SPACES
"password" wpisz swoje pasy np.tfs1.0456852 (nale?y zapami?ta?)
Wklejamy to w linijce 80(notepad ++ w pliku otserver.cpp
Autorem kodu jest dominique120 z ot....Pomys?odawc? jestem ja!
Lecz nie wykona?em tego kodu!
Testowany na Windows!
PSaj Reputa!!!!!!!!
Kopiowanie skryptu na inne fora za moj? zgod?!
[LUA] // Password prompt. I'm sure there are better ways to do this(for example maybe use string::compare() and put this somewhere else or in its own function)
const std::string c_password = "password"; // enter your password here. NO SPACES
std::string password = ""; // initialize string
std::cout << "Enter password please\t" << std::endl; // prompt user to enter pass
std::cin >> password; // get password from the console
// test to see if c_password is equals to password
if (c_password != password) { // if the password is not equals it will say "wrong pass" and exit the program with exit code -1(error)
std::cout << "Wrong password, cya!" << std::endl;
exit(-1);
} // if it is equals it will execute everything else normally[/LUA]
W linijce:
const std::string c_password = "password"; // enter your password here. NO SPACES
"password" wpisz swoje pasy np.tfs1.0456852 (nale?y zapami?ta?)
Wklejamy to w linijce 80(notepad ++ w pliku otserver.cpp
Autorem kodu jest dominique120 z ot....Pomys?odawc? jestem ja!
Lecz nie wykona?em tego kodu!
Testowany na Windows!
PSaj Reputa!!!!!!!!
Kopiowanie skryptu na inne fora za moj? zgod?!