PDA

Voir la version complète : pb "Rotating Mapcycle"


-r3d-
04/05/2006, 12h03
Lu all,

Comme je l'ai indiqué dans le titre je cherche un plugin qui, suivant l'heure de la journée, prend tel ou tel mapcycle. Je n'ai trouvé qu'un plugin et encore ce nest qu'un source:

#include <amxmod>

public load_mapcycle()
{
new today_str[8], cmd[48]
get_time("%H",today_str)
new today = strtonum(today_str)

if ((today >= 0) && (today < 4))
server_cmd("mapcyclefile addons/amx/mapcycles/evening.txt")
else if ((today >= 4) && (today < 18 ))
server_cmd("mapcyclefile addons/amx/mapcycles/day.txt")
else if (today >= 18 )
server_cmd("mapcyclefile addons/amx/mapcycles/evening.txt")


return PLUGIN_HANDLED
}

public plugin_init()
{
register_plugin("Rotating Mapcycle","0.1","JustinHoMi")
load_mapcycle()
return PLUGIN_CONTINUE
}

Le probleme est que si j'active ce plugin le serveur se crash

L 05/04/2006 - 11:37:33: Server cvar "amx_version" = "0.9.9 (2 modules)"
L 05/04/2006 - 11:37:33: Server cvar "sv_maxspeed" = "900"
L 05/04/2006 - 11:37:33: Server cvar "pausable" = "0"
L 05/04/2006 - 11:37:33: Server cvar "amx_nextmap" = "de_aztec"
./hlds_run: line 379: 827 Segmentation fault $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
./hlds_run: line 412: /bin/date: Permission denied
: Server restart in 10 seconds
./hlds_run: line 418: /bin/date: Permission denied
./hlds_run: line 418: mail: command not found
./hlds_run: line 419: /bin/date: Permission denied
./hlds_run: line 419: mail: command not found
./hlds_run: line 450: /bin/date: Permission denied
: Server Quit

Quelqu'un peut-il m'aider??