Raised This Month: $95 Target: $400
 23% 

Ghost Recorder


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   Exolent[jNr] (178)
TeddyDesTodes
Senior Member
Join Date: Oct 2008
Location: 10.25.15.210
Old 03-09-2009 , 21:34   Ghost Recorder
Reply With Quote #1

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
Attached Files
File Type: sma Get Plugin or Get Source (record.sma - 1676 views - 10.6 KB)
File Type: sma Get Plugin or Get Source (record_rendermode.sma - 1573 views - 23.3 KB)
__________________

Last edited by TeddyDesTodes; 03-11-2009 at 17:00. Reason: corrected byterate
TeddyDesTodes is offline
Send a message via ICQ to TeddyDesTodes
FuZ!on
Senior Member
Join Date: Aug 2007
Old 03-09-2009 , 21:47   Re: Ghost Recorder
Reply With Quote #2

Very, very interesting.
FuZ!on is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-09-2009 , 22:17   Re: Ghost Recorder
Reply With Quote #3

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.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TeddyDesTodes
Senior Member
Join Date: Oct 2008
Location: 10.25.15.210
Old 03-09-2009 , 22:21   Re: Ghost Recorder
Reply With Quote #4

1. ok will change but why is no warning thrown...

2. does file_exists work for dirs?

EDIT: nvm all...

uploaded fixed version
__________________

Last edited by TeddyDesTodes; 03-09-2009 at 22:33.
TeddyDesTodes is offline
Send a message via ICQ to TeddyDesTodes
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 03-10-2009 , 00:18   Re: Ghost Recorder
Reply With Quote #5

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.
Brad is offline
Wentix
Junior Member
Join Date: Jan 2009
Old 03-10-2009 , 04:36   Re: Ghost Recorder
Reply With Quote #6

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

Very interesting plugin =).
Wentix is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-10-2009 , 05:19   Re: Ghost Recorder
Reply With Quote #7

@Wentix:
pwned 255 block, ands lets do it 60x?
__________________
xPaw is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-10-2009 , 06:25   Re: Ghost Recorder
Reply With Quote #8

Wow, this is great!
BOYSplayCS is offline
TeddyDesTodes
Senior Member
Join Date: Oct 2008
Location: 10.25.15.210
Old 03-10-2009 , 08:10   Re: Ghost Recorder
Reply With Quote #9

@xPaw
??????
__________________
TeddyDesTodes is offline
Send a message via ICQ to TeddyDesTodes
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-10-2009 , 08:54   Re: Ghost Recorder
Reply With Quote #10

You should store mapname at plugin_init, and players steamid on client_authorized(), instead of getting it tons of times
__________________
xPaw is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:45.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode