Login    Forum    Register    Members   Search    FAQ

Board index » Apollo RP Plugins » Suggestions/Requests




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Useful for servers with shitbags
 Post Posted: Mon Feb 01, 2010 5:50 pm 
Offline

Joined: Wed Jan 13, 2010 1:19 am
Posts: 86
A script could probably do this, but I can't come up with a script that gives this idea an infinite life span without having to manually modify the script on a daily basis.

It would be nice if this process could be automated.

Code:
stop; record feb01a
//ten minute interval
stop; record feb01b
//ten minute interval
stop; record feb01c

//etc.


Top 
 Profile  
 
 Post subject: Re: Useful for servers with shitbags
 Post Posted: Mon Feb 01, 2010 6:24 pm 
Offline
Moderator
User avatar

Joined: Sun Sep 28, 2008 10:27 pm
Posts: 587
Location: Kissimmee, FL.
This should work for you.

Code:
#include <amxmodx>
#include <amxmisc>

new bool:g_bRecording[33]

new g_szDemoName[33][16]
new g_iPart[33]

public plugin_init()
{
   register_plugin("Demo Break", "1.0", "Spunky")

   register_clcmd("amx_record", "cmd_record", ADMIN_ALL, "<demo> <interval>")
   register_clcmd("amx_stoprecord", "cmd_stoprecord")
}

public cmd_record(id, level, cid)
{
   if (!cmd_access(id, level, cid, 3))
      return PLUGIN_HANDLED

   else if (g_bRecording[id])
   {
      console_print(id, "Already recording...")

      return PLUGIN_HANDLED
   }

   read_argv(1, g_szDemoName[id], 15)
   client_cmd(id, "record ^"%s0^"", g_szDemoName[id])

   g_iPart[id]++

   console_print(id, "Started recording...")

   new szInterval[6]
   read_argv(2, szInterval, 5)

   set_task(str_to_float(szInterval), "fnBreak", id, _, _, "b")

   g_bRecording[id] = true

   return PLUGIN_HANDLED
}

public cmd_stoprecord(id)
{
   if (task_exists(id))
   {
      remove_task(id)
      client_cmd(id, "stop")

      console_print(id, "Stopped recording...")

      g_iPart[id] = 0
      g_bRecording[id] = false
   }
   else
      console_print(id, "Not recording...")

   return PLUGIN_HANDLED
}

public fnBreak(id)
{
   client_cmd(id, "stop; record ^"%s%d^"", g_szDemoName[id], g_iPart[id])

   console_print(id, "Splitting to part %d...", g_iPart[id])

   g_iPart[id]++
}


amx_record - Starts a demo.
amx_stoprecord - Stops a demo.

First parameter is <demo>, which is the demo name. Second parameter is <interval>, which is the time in seconds between breaks.


You do not have the required permissions to view the files attached to this post.

_________________
Jean Meslier wrote:
[Human kind] shall not be free until the last king is strangled with the entrails of the last priest.


Top 
 Profile  
 
 Post subject: Re: Useful for servers with shitbags
 Post Posted: Tue Feb 02, 2010 1:35 pm 
Offline

Joined: Wed Jan 13, 2010 1:19 am
Posts: 86
Being someone who has never handled AMX before, how do I use this?


Top 
 Profile  
 
 Post subject: Re: Useful for servers with shitbags
 Post Posted: Tue Feb 02, 2010 2:17 pm 
Offline
Moderator
User avatar

Joined: Sun Sep 28, 2008 10:27 pm
Posts: 587
Location: Kissimmee, FL.
Download Demo.amxx, throw it in your plugins folder, then add the plugin to the bottom of plugins.ini in the configs directory. Restart your server.

_________________
Jean Meslier wrote:
[Human kind] shall not be free until the last king is strangled with the entrails of the last priest.


Top 
 Profile  
 
 Post subject: Re: Useful for servers with shitbags
 Post Posted: Fri Feb 05, 2010 4:30 am 
Offline
Moderator
User avatar

Joined: Mon Jun 30, 2008 7:00 pm
Posts: 400
here have a hit

_________________
Image


Top 
 Profile  
 
 Post subject: Re: Useful for servers with shitbags
 Post Posted: Fri Feb 05, 2010 5:56 am 
Offline
Official Troll

Joined: Thu May 15, 2008 9:24 pm
Posts: 117
here suck on my nuts


Top 
 Profile  
 
 Post subject: Re: Useful for servers with shitbags
 Post Posted: Tue Mar 02, 2010 1:54 pm 
Offline
User avatar

Joined: Sun Dec 28, 2008 3:42 pm
Posts: 628
Location: Press 3 to Robwhore
wonsae wrote:
here suck on my nuts

I start to like you.

_________________
Superlagg wrote:
Sure, you can /me at the map geometry all day, but unless there's someone hiding on the roof or the admin reads the server logs, its essentially wasted time.

<3


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 7 posts ] 

Board index » Apollo RP Plugins » Suggestions/Requests


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron