Server Kill After map
Hi, i want my server to kill itself after one map has been played,
I have written this code but it seems to cause some funny behavior and doesnt always work, Anyone know of any better way to kill the server? Code:
thanks, Mikey_trw p.s i tried with and without a server_exec(); after the quit command |
a
Code:
|
#include amxmodx
|
Quote:
|
Ok the plugin now works,
Code:
But, when used in conjunction with another plugin that uses mySQL the server crashes, and gives dbi_query errors. It seems that the server calls plugin_end AFTER the next map has been loaded. Is there a function that is called after the map has been played, so i can kill the server gracefully after 20 minutes of play? Also, Is there a way to automagically close the clients CS as well? I have tried client_cmd("quit") - see above but this deosnt seem to work, possible because when this is called the client is mid map-reload Thanks, Mike Thanks, EDIT: the server only crashes IF there are players connected, which is kinda daft. Anyone have any idea why this might be happening? |
Code:
|
great thanks, v3x, I'll give that a try now.
|
Ok, perhaps I am being stupid, but
Code:
always returns 0. Any reason for this? Thanks |
Try this instead and see if it changes results:
set_task(get_cvar_float("mp_timelimit")*60.0, "Kill_Server"); |
what is this for??..
confused. u guys r to smart |
| All times are GMT -4. The time now is 14:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.