AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   timed commands exec on server (HELP) (https://forums.alliedmods.net/showthread.php?t=75431)

Trion 08-05-2008 13:20

timed commands exec on server (HELP)
 
Hello, I wana to do plugin whos can exclude to my server command ewery 60seconds but dose work :cry:
Code:

#include <amxmodx>
public plugin_init()
{
 register_plugin("exec every 60seconds", "6.9", "Trion");
}
public server_cmd()
{
 set_task(60.0, "server_exec")
}
public server_exec()
{
 server_cmd("amx_reloadadmins")
}

Sombady Cant Help Me Please . . .

danielkza 08-05-2008 13:55

Re: timed commands exec on server (HELP)
 
Code:

#include <amxmodx>

public plugin_init()
{
    set_task(60.0,"ReloadAdmins",_,_,_,"b")
}

public ReloadAdmins()
    server_cmd("amx_reloadadmins")


danielkza 08-05-2008 14:05

Re: timed commands exec on server (HELP)
 
Quote:

Originally Posted by xPaw (Post 665093)
PHP Code:

#include <amxmodx>

public plugin_init()
{
    
set_task(60.0,"task_reload")
}
public 
task_reload()
{
   
ReloadAdmins();
   
set_task(60.0,"ReloadAdmins")
}

public 
ReloadAdmins()
    
server_cmd("amx_reloadadmins"


Why re-setting the task yourself? The native already has this functionality,there's no reason to add 2 function calls, and call the native again.

Trion 08-05-2008 15:16

Re: timed commands exec on server (HELP)
 
Thx danielkza :up: :)
You wery help me :avast:


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

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