Raised This Month: $32 Target: $400
 8% 

Ricochet Spectate


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Ricochet        Category:   General Purpose        Approver:   Hawk552 (427)
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 01-27-2007 , 21:48   Ricochet Spectate
Reply With Quote #1

Ricochet Spectate - Current version is 1.1

Description: This allows you to spectate players in first person for the Half-Life mod, Ricochet.

Usage: spec <authid, nick or #userid>

Installation:
  1. Place ricospec.amxx into your plugins folder
  2. Add ricospec.amxx to your plugins.ini file
Notes:
  • Before any of you ask; no, you currently cannot spectate players in first person.
  • I am aware that this plugin probably won't be used by anyone here, but I noticed some people were trying to use attach_view to look through another persons view. Well now you can see how it's done by looking at the source.
  • Thanks to jtp10181, for sharing this code.
Changelog:
Quote:
Ricochet Spectate 1.1
Released: Jan 30, 2007
- Players can no longer spectate when alive

Ricochet Spectate 1.0
Released: Jan 27, 2007
- Initial release
Attached Files
File Type: sma Get Plugin or Get Source (ricospec.sma - 1731 views - 3.3 KB)

Last edited by GoD-Tony; 10-21-2007 at 12:38. Reason: misc
GoD-Tony is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-27-2007 , 21:53   Re: RicoSpec
Reply With Quote #2

I'd like to suggest a more functional name rather than catchy; perhaps "Ricochet Spectate"?

Also, this code, to the best of my knowledge, is not functional:

Code:
    if (!cmd_access(id,level,cid,1)) 
        return PLUGIN_HANDLED

    new numbargs = read_argc()
    
    if (numbargs == 1 && isSpectating[id]) 
    {
        stop_spectating(id)
    }
    else if (numbargs == 2)
The reason is that cmd_access will check for args being more or less than 1. If it isn't 1, then it'll get stopped there, and numbargs will never be 2.

If you've tested it, it's possible I'm wrong, but it looks messed to me.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-27-2007 , 22:06   Re: Ricochet Spectate
Reply With Quote #3

cmd_access checks for a minimum number of arguments. Otherwise, the many commands that have optional arguments wouldn't work. In this example, if you don't specify a player to spectate, then it stops you from spectating.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 01-27-2007 , 22:08   Re: RicoSpec
Reply With Quote #4

Quote:
Originally Posted by Hawk552 View Post
I'd like to suggest a more functional name rather than catchy; perhaps "Ricochet Spectate"?
Fair enough. I admit RicoSpec would not be a good name if people were searching for something of this functionality.

Quote:
Originally Posted by Hawk552 View Post
Also, this code, to the best of my knowledge, is not functional:
It has worked fine so far. I have tested it with different people and myself the past few days.
GoD-Tony is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-27-2007 , 22:10   Re: RicoSpec
Reply With Quote #5

Quote:
Originally Posted by killerbee123 View Post
Fair enough. I admit RicoSpec would not be a good name if people were searching for something of this functionality.


It has worked fine so far. I have tested it with different people and myself the past few days.
My bad, it seems alright other than that.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 01-28-2007 , 00:01   Re: Ricochet Spectate
Reply With Quote #6

What makes this Ricochet specific?
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 01-28-2007 , 09:46   Re: Ricochet Spectate
Reply With Quote #7

Quote:
Originally Posted by Lord_Destros View Post
What makes this Ricochet specific?
Code wise, nothing. The point is that it was designed with Ricochet in mind, and the fact that most other popular mods already have first person spectating, I think it's safe to say that this plugin will be useless to other mods as-is.
GoD-Tony is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 01-29-2007 , 01:57   Re: Ricochet Spectate
Reply With Quote #8

TS doesn't .....
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 01-29-2007 , 10:21   Re: Ricochet Spectate
Reply With Quote #9

Quote:
Originally Posted by Lord_Destros View Post
TS doesn't .....
Even then, because of the way this works (using cameras) you would not be able to see their HUD (including the gun models). This works with Ricochet because there isn't a HUD to begin with .
GoD-Tony is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 01-30-2007 , 19:36   Re: Ricochet Spectate
Reply With Quote #10

Updated to 1.1
GoD-Tony is offline
Reply



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 02:50.


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