AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Delay, works once! (https://forums.alliedmods.net/showthread.php?t=40292)

xeonn 06-25-2006 20:02

Delay, works once!
 
Hi, i dont know what im doing wrong but here is a example how i want it to work:

amx_lncss makes a screesnhot of EVERY user in the game
amx_lncsst "5.0" makes every 5.0 seconds a screenshot of EVERY user in the game and loops this during the whole game. if everyplayer in the server is gone the set_task will close it self, so if the server is empty the amx_lncsst wont make any screens anymore.

So far i coded:
Code:

/*
* Latenightcup.nl Screenshot System
* Coded by xeoN
* Contact: [email protected]
*/


#include <cstrike>
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    register_plugin("LNC Screenshot","1.0","xeoN")
    register_concmd("amx_lncss","cmd_ss",ADMIN_BAN,"- forces all users to take a screenshot");
    register_concmd("amx_lncsst", "cmd_sst", ADMIN_CVAR, "- make every X seconds a screenshot of every user");
   
}

public client_connect(id)
{
    client_print(id, print_console, "[LNCSS] This server supports the Latenightcup Screenshot System (LNCSS).")
    server_print("[LNCSS] This server supports the Latenightcup Screenshot System (LNCSS).")
    return 1
}
public cmd_ss(id,level,cid)
{
  if(!cmd_access(id,level,cid,1))
      return PLUGIN_HANDLED;

  client_cmd(0,"snapshot");
  return PLUGIN_HANDLED;
}

public cmd_sst(id,level,cid)
{
    if(!cmd_access(id,level,cid,1))
    return PLUGIN_HANDLED;
   
    set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id);
    return PLUGIN_HANDLED;
}

Anyone knows how to do this, i need it verry bad :arrow:
Thank you !

Xanimos 06-26-2006 00:23

Re: Delay, works once!
 
set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id);

should be

set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id , _ , _ , "b" , <number of times>);

xeonn 06-26-2006 04:48

Re: Delay, works once!
 
Quote:

Originally Posted by Suicid3
set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id);

should be

set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id , _ , _ , "b" , <number of times>);

yes, but he must do it all match kong so..

v3x 06-26-2006 05:05

Re: Delay, works once!
 
Quote:

Originally Posted by xeonn
yes, but he must do it all match kong so..

What the crap are you talking about? :shock:

xeonn 06-26-2006 05:06

Re: Delay, works once!
 
*UPDATE*

Is this possible:
Code:

public cmd_sst(id,level,cid)
{
    if(!cmd_access(id,level,cid,1))
    return PLUGIN_HANDLED;
   
    set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id, _ , _ , "b", random_num);
    return PLUGIN_HANDLED;
}


v3x 06-26-2006 05:10

Re: Delay, works once!
 
Nope. It'd be more like:

set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id, _ , _ , "a", random_num(1, 5));

xeonn 06-26-2006 05:16

Re: Delay, works once!
 
I need a script, that during the match the screenshots being continued all match long, till the players leave.

xeonn 06-26-2006 07:18

Re: Delay, works once!
 
Ok, screenshots are working

Next problem:
Code:

public cmd_sst(id,level,cid)
{
    if(!cmd_access(id,level,cid,1))
    return PLUGIN_HANDLED;
   
 
    set_task( get_cvar_float("amx_lncsst"), "cmd_ss", id, _ , _ , "b", 10);
    return PLUGIN_HANDLED;
}

The timer does not work, he keeps on make screenshots, i want every 3 min one screenshot.

v3x 06-26-2006 07:56

Re: Delay, works once!
 
Put this in amxx.cfg: amx_lncsst 180

60 * 3 = 180

xeonn 06-26-2006 08:08

Re: Delay, works once!
 
Quote:

Originally Posted by v3x
Put this in amxx.cfg: amx_lncsst 180

60 * 3 = 180

The command wont stop:


[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !
[LNCSS] The screenshots has been made !

He's doing that on 1 sec or so :S


All times are GMT -4. The time now is 07:59.

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