Crashing the server
#1

1)Is there a way you can quit/crash your server trough script. This may look crazy but I want to make some holes inside of the script to make sure none will use it if it got stolen.
I've tried call OnGameModeExit and nothing happens. Everything is same as it was before.
Reply
#2

I've seen someone who asked about a similar thing.
And the only way was to kick not /q(uit) the player.
To crash your server, might be able to do. But then, it can make players go away. Alot of a**holes is out there.
I would suggest to make some auto kick/ban insted if a user access the db/files

(Im not sure)
Reply
#3

You can stop the server by sending rcon command exit ( SendRconCommand("exit"); )
Reply
#4

Quote:
Originally Posted by Unknownich
Посмотреть сообщение
You can stop the server by sending rcon command exit ( SendRconCommand("exit"); )
you can still steal the files without rcon! SendRconCommand("exit")

Quote:

#include <a_samp>

main()
{
print("\n---------------------------------------");
print(" Crashing the server.");
print("---------------------------------------\n");
}

public OnGameModeInit()
{
// Crashing the server here
new File:crash;
fclose(crash);
return 1;
}

public OnGameModeExit()
{
return 1;
}

or

Quote:

#include <a_samp>

main(){}

public OnGameModeInit()
{
SendRconCommand("exit");
return 1;
}

public OnGameModeExit()
{
return 1;
}


or even make a command (ZCMD):

CMD:crashserver(playerid, params[]){
if(IsPlayerAdmin(playerid)){
SendRconCommand("exit");
}
return 1;
}

And i guess he wants it to auto detect if someone trys to enter the files. Not that someone needs to enter a CMD, then you could only colse the server as it is.
Reply
#5

pawn Код:
CMD:closeserver(playerid,params[])
{
SendClientMessageToAll(playerid,-1,"Server Is Closed!");
SendRconCommand("exit");
return 1;
}
this command will close the server ..
Reply
#6

Thank you guys. Rep for all.
Reply
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
Err, you realise that after doing that just once, the other scripters will realise and FIX the bug, rendering this approach useless? Plus you will need to join every server using your script repeatedly.
Don't worry. I know what am I doing .
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)