SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 13/06/2017, 06:30 AM   #1
Daymen
Little Clucker
 
Daymen's Avatar
 
Join Date: Feb 2017
Location: locating . . .
Posts: 48
Reputation: 9
Lightbulb Advanced Spectate System





The main point of a spectation system for administration to be able to view players that can be a potential harm to their server, though, it can also be used by players.
It all depends on how your server is set up to function. The main idea I had in mind while developing this was simply "convenience" for the person whom had interest
in spectating a player. Though this might only fit a specific audience's needs from a spectation system as it stands, but it's easily editable.



Code:
=> Version 1.0 Released - June 13th, 2017 <=
* Smart checks in place to protect issues happening upon initially spectating.
* Grabs the following data to later replace when done spectating, listed in order as placed in code:
--Player Weapon Data ( each slot's weapon and ammunition )
--Player Health
--Player Amour
--Interior and World
--Vehicle Information, if pertains (vehicle ID, seat ID, vehicle position )
--Player Position, if on foot
--Name of whom Spectating
* Smart checks upon exiting spectator's mode and spawning - regarding health, armor, weapon, and vehicle data
* If whom you are spectating dies, it waits for the player to respawn, then initializes spectation
* If whom you are spectating disconnects, spectation ends
* If whom you are spectating goes from on-foot -> vehicle or vice-versa, spectation standards are adjusted accordingly
* If a player's interior changes, spectation standards adjust accordingly
( Note: Sometimes SA-MP doesn't fully adjust it's spectation mode. Interior & World IDs will match, but not update on screen.
Resulting in a blank spectation. Simply respectating fixes this issue. )
* If a player enters a checkpoint, it will adjust spectation standards accordingly
* You may use your mouse to switch through online players to spectate ( LMB = +1 || RMB = -1 )
- Baseline Functionality Posted Below -



You must have the following includes for this filterscript to work:

ZCMD
SSCANF
FOREACH



* Smart checks in place to protect issues happening upon initially spectating. [93-109]
* Grabs the following data to later replace when done spectating, listed in order as placed in code:
  • Player Weapon Data ( each slot's weapon and ammunition )
  • Player Health
  • Player Amour
  • Interior and World
  • Vehicle Information, if pertains (vehicle ID, seat ID, vehicle position )
  • Player Position, if on foot
  • Name of whom Spectating
* Smart checks upon exiting spectator's mode and spawning - regarding health, armor, weapon, and vehicle data
* If whom you are spectating dies, it waits for the player to respawn, then initializes spectation
* If whom you are spectating disconnects, spectation ends
* If whom you are spectating goes from on-foot -> vehicle or vice-versa, spectation standards are adjusted accordingly
* If a player's interior changes, spectation standards adjust accordingly
( Note: Sometimes SA-MP doesn't fully adjust it's spectation mode. Interior & World IDs will match, but not update on screen.
Resulting in a blank spectation. Simply respectating fixes this issue. )
* If a player enters a checkpoint, it will adjust spectation standards accordingly
* You may use your mouse to switch through online players to spectate ( LMB = +1 || RMB = -1 )


There are specific things I had placed into this for the purpose of being able to test the script, but can also come in hand for some. They are listed with their purposes below:

* If you have MAX_PLAYERS already defined, you may remove the definitions up near the top.
-- Some don't have this correctly defined, or want to guarentee their MAX_PLAYERS within the filterscript.
* Change p_adminlevel to your admin level variable if you want it to be restricted to administration.
-- If you plan to restrict this to adminstration, replace 'p_adminlevel' to your administration variable for players.
* Change admin_duty to your admin on duty variable if you have one.
-- If you have a godmode command for administration, replace 'admin_duty' to whatever your variable is that checks if it's enabled or disabled.







If you have interest in obtaining the code for this filterscript, you may download it here.




Tee - Base Idea for Spectation System Structure (Outdated & Unorganized)
Zeex - ZCMD
Y_Less - SSCANF
Y_Less - FOREACH
SA-MP Team



Last edited by Daymen; 13/06/2017 at 02:54 PM.
Daymen is offline   Reply With Quote
Old 13/06/2017, 07:32 AM   #2
iLearner
Gangsta
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 655
Reputation: 134
Default Re: Advanced Spectate System

Screenshots would be appreciated.
iLearner is offline   Reply With Quote
Old 13/06/2017, 08:02 AM   #3
Bernadeath
Banned
 
Join Date: Jun 2017
Location: Philippines
Posts: 15
Reputation: 8
Default Re: Advanced Spectate System

Nice
Bernadeath is offline   Reply With Quote
Old 13/06/2017, 09:24 AM   #4
Infinity
High-roller
 
Infinity's Avatar
 
Join Date: Jul 2009
Posts: 1,536
Reputation: 975
Default Re: Advanced Spectate System

nvm - issue fixed.
__________________

I apologize for the stupidity of my fellow members

Quote:
Originally Posted by !damo!spiderman View Post
Stand for something that's going to help the world rather than fill it with more hate. Give someone a hug, tell someone you care... Do something, do anything but do it with love not hate.

Last edited by Infinity; 14/06/2017 at 08:38 AM.
Infinity is offline   Reply With Quote
Old 13/06/2017, 11:12 AM   #5
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,426
Reputation: 1241
Default Re: Advanced Spectate System

He fixed it.

Last edited by Pottus; 13/06/2017 at 05:51 PM.
Pottus is offline   Reply With Quote
Old 13/06/2017, 02:03 PM   #6
renatog
Huge Clucker
 
Join Date: Mar 2016
Posts: 341
Reputation: 48
Default Re: Advanced Spectate System

2017 and people are still using ad-links to SHARE code.
renatog is offline   Reply With Quote
Old 13/06/2017, 02:19 PM   #7
Franci
Little Clucker
 
Franci's Avatar
 
Join Date: Mar 2014
Location: Tirana Albania
Posts: 2
Reputation: 0
Default Re: Advanced Spectate System

Well done!
__________________
HostName: San Fierro Cops And Robbers (0.3.7)
Address: 192.169.82.202:7777
Mode: Cops And Robbers
Language: All (English)

- An awesome CnR server consisting of doozy features! Come, we have players! -

Franci is offline   Reply With Quote
Old 13/06/2017, 02:45 PM   #8
Daymen
Little Clucker
 
Daymen's Avatar
 
Join Date: Feb 2017
Location: locating . . .
Posts: 48
Reputation: 9
Default Re: Advanced Spectate System

Threads links were fixed, sorry for the inconvenience.

Screenshots added as well.
__________________


Filterscripts:
* Advanced Spectation System

Tutorials:
* Most Wanted Command
Daymen is offline   Reply With Quote
Old 14/06/2017, 05:18 PM   #9
Daymen
Little Clucker
 
Daymen's Avatar
 
Join Date: Feb 2017
Location: locating . . .
Posts: 48
Reputation: 9
Default Re: Advanced Spectate System

Quote:
Originally Posted by Bernadeath View Post
Nice
Quote:
Originally Posted by Franci View Post
Well done!
Thanks you guys!
__________________


Filterscripts:
* Advanced Spectation System

Tutorials:
* Most Wanted Command
Daymen is offline   Reply With Quote
Old 14/06/2017, 05:23 PM   #10
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 4,266
Reputation: 1137
Default Re: Advanced Spectate System

Well done!
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] NRank System V1.0 | Advanced Rank System | 5+ Commands | Dialog System [Much More] Nirzor Filterscripts 9 18/04/2014 10:49 PM
Spectate system bug. lean1337 Scripting Help 0 26/06/2013 06:37 PM
[FilterScript] [FS]spectate System [BP]Tony Filterscripts 12 26/06/2011 06:48 PM
[FilterScript] Spectate System Nonameman Filterscripts 11 22/08/2010 04:07 AM


All times are GMT. The time now is 01:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.