AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Ghost Recorder (https://forums.alliedmods.net/showthread.php?t=87314)

TeddyDesTodes 03-09-2009 21:34

Ghost Recorder
 
4 Attachment(s)
Ghost Recorder
TeddyDesTodes 2009

.: Description / Features :.

This plugin let player record their movements and saves them for later replay
this is useful for jumping against urself on kreedzmaps(or bhop or whatever)
like in racegame the ghost driver
Default settings are :
- 6 Saveslots per map and player
- unlimited recording time
- recording with 1,5Kbyte/s


.: CVars :.
  • recorder_ignore_velocity <0|1> | Default: 0 Switch to ignore Velocity data disabled by default (very buggy and not useful)
  • recorder_maxsize <size in kb> | Default: 2048 to disable set to 0
.: Client Commands :.
  • say /demomenu - shows the menu
.: Credits :.
  • Empī - helping me with cast stuff
.: Changelog :.

version 0.24 (record_rendermode.amxx)
  • added addToFullPack forward that only the owner of the Ghost can see it
  • added menuItem for visibility in rendermenu
  • possibly fixed servercrash when someone is recording and replaying and server is restarting/mapchanging
  • fixed Loading of other recording
  • added progress indicator to playback hud
  • fixed missing sequences
  • changed fileformat and lowered size of header (new FileVersion is 24) (still compatible with FileVersion 22)
version 0.23
  • moved recorddir to "addons/amxmodx/data/record/"
  • added menu to choose Rendermode for the Ghost
  • added the possibility to load recordings from other players
  • changed filelayout a bit
  • added extension ".rec" to files
  • added Possibility to restrict filesizes
  • optimized old code
version 0.21(record.amxx)
  • added automatic dir creation
  • removed unused vars
version 0.2 initially release

.: Known Bugs :.
  • Problems with pev_sequence and pev_gaitsequence (some sequences are not shown (upper body goes to default position)) (dont know how to fix this)(fixed in 0.24)
  • Sizerestriction not working hopefully fixed inn next version)
.: How to install :.
  • Install like normal plugin
  • create a folder called "record/" in your data direcory (files will be save to this directory)(created automatically since 0.23)
.: Note :.
  • Server need write and read rights fro save directory
  • per default files will be written with 1.5Kbyte/sec ( 15 min equal 1.4MB) so be sure u have enought space on your server or change RECLIMITER to a bigger value or loweer the amount of save slots
  • byterate is calculated like this : 48*(1/RECLIMITER) this is max byterate per sec
  • if you set RECLIMITER to 0.0 every playerthink will be recorded wich on normal server is approx. 66 times/sec (3.1Kbyte/s (2.7MB for 15 min))
  • EDIT: just tested 20 min produced 1.5MB file
  • didn't test on 64bit system dont know if it will work since datatypes are a bit different
  • only tested in CStrike
  • you could test it here 85.14.217.35:1338
.: ToDo :.
  • tweaking visual stuff if needed
.: FileStructure (Version 22) :.

[HEADER][FLOAT][THINK][THINK][THINK][THINK]... ...[THINK]

the file is read until no data is found first float is useless

Header:
Code:

INT        Version [22]
INT        Unix Timestamp
String[33]    PLayer Name
String[33]    Steam ID
String[33]    Map
String[33]    Hostname
String[65]    Weapon Model
String[65]    Player Model

Think:
Code:

Float    origin[0]
Float    origin[1]
Float    origin[2]
Float    angles[0]
Float    angles[1]
Float    angles[2]
Float    velocity[0]
Float    velocity[1]
Float    velocity[2]
Int    sequence
Int    gaitsequence
Float    Time to next think

See servers running Ghost Recorder

FuZ!on 03-09-2009 21:47

Re: Ghost Recorder
 
Very, very interesting.

Exolent[jNr] 03-09-2009 22:17

Re: Ghost Recorder
 
1. g_TotalThink is never used for any purpose.

2. You should use mkdir() if the save directory doesn't exist in the plugin_init().

That's all I looked at right now. I may look more later.

TeddyDesTodes 03-09-2009 22:21

Re: Ghost Recorder
 
1. ok will change but why is no warning thrown...

2. does file_exists work for dirs?

EDIT: nvm all...

uploaded fixed version

Brad 03-10-2009 00:18

Re: Ghost Recorder
 
Edit your initial post and make sure the bulk of it is in the normal font and format. You must post in a manner consistent with the norm here.

Wentix 03-10-2009 04:36

Re: Ghost Recorder
 
Can you add support for play recorded actions on current player, not ghost-player?

Very interesting plugin =).

xPaw 03-10-2009 05:19

Re: Ghost Recorder
 
@Wentix:
pwned 255 block, ands lets do it 60x? :mrgreen:

BOYSplayCS 03-10-2009 06:25

Re: Ghost Recorder
 
Wow, this is great!

TeddyDesTodes 03-10-2009 08:10

Re: Ghost Recorder
 
@xPaw
??????

xPaw 03-10-2009 08:54

Re: Ghost Recorder
 
You should store mapname at plugin_init, and players steamid on client_authorized(), instead of getting it tons of times


All times are GMT -4. The time now is 15:12.

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