AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to crash the server? (https://forums.alliedmods.net/showthread.php?t=99165)

kurian 08-02-2009 07:38

How to crash the server?
 
I'm trying to setup the auto-restart setting of my server service. How do I write a plugin that can crash the server when I give the command?

It should be a regular crash like "hlds.exe - Application Error" "The exception unknown exception ....." etc.

01101010 08-02-2009 07:42

Re: How to crash the server?
 
PHP Code:

public plugin_precache()
{
    
engfunc(EngFunc_PrecacheModel"my_name_is_john.hi")



kurian 08-02-2009 07:44

Re: How to crash the server?
 
Quote:

Originally Posted by 01101010 (Post 888298)
PHP Code:

public plugin_precache()
{
    
engfunc(EngFunc_PrecacheModel"my_name_is_john.hi")



Would that work only in plugin_precache or can I call it anywhere?

01101010 08-02-2009 07:48

Re: How to crash the server?
 
Anytime.

It would display the "Model not found" error, and the server shut down.

If you want another method to crash it, I know more.

kurian 08-02-2009 07:49

Re: How to crash the server?
 
I don't want a "handled" crash. I want an unhandled exception like a genuine crash. The kind that would trigger the OS's error/debug with Visual Studio routine.

01101010 08-02-2009 07:51

Re: How to crash the server?
 
What about this.
PHP Code:

message_begin(MSG_BROADCASTSVC_TEMPENTITY);
write_byte(17);
write_coord(321.1);
write_coord(31.4646);
write_coord(4314.41);
write_short(e411414);
write_byte(4164161564516);
write_byte(hiim crasher);
message_end(); 

Umm, this is also good

PHP Code:

client_print(0"hi %s %f %d %s %f %d %d %s hehehe i crashed it"


kurian 08-02-2009 08:14

Re: How to crash the server?
 
It doesn't crash. Doesn't even say anything.

Alka 08-02-2009 08:35

Re: How to crash the server?
 
Simlpe, register a command like "say /test" then make engfunc(EngFunc_RemoveEntity, id); id, the index of player that called the func.

hzqst 08-02-2009 08:46

Re: How to crash the server?
 
engfunc(EngFunc_RemoveEntity, a player's index(1~32))or create a func_breakable and then remove it

kurian 08-02-2009 09:10

Re: How to crash the server?
 
I want to call it from server console without any players. I'll try func_breakable


All times are GMT -4. The time now is 18:29.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.