SA-MP Forums Archive
[FilterScript] Advanced Spectate System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Advanced Spectate System (/showthread.php?tid=635750)

Pages: 1 2


Advanced Spectate System - Daymen - 13.06.2017





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.



Код:
=> 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:* 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
****** - SSCANF
****** - FOREACH
SA-MP Team





Re: Advanced Spectate System - iLearner - 13.06.2017

Screenshots would be appreciated.


Re: Advanced Spectate System - Bernadeath - 13.06.2017

Nice


Re: Advanced Spectate System - Infinity - 13.06.2017

nvm - issue fixed.


Re: Advanced Spectate System - Pottus - 13.06.2017

He fixed it.


Re: Advanced Spectate System - renatog - 13.06.2017

2017 and people are still using ad-links to SHARE code.


Re: Advanced Spectate System - Franci - 13.06.2017

Well done!


Re: Advanced Spectate System - Daymen - 13.06.2017

Threads links were fixed, sorry for the inconvenience.

Screenshots added as well.


Re: Advanced Spectate System - Daymen - 14.06.2017

Quote:
Originally Posted by Bernadeath
Посмотреть сообщение
Nice
Quote:
Originally Posted by Franci
Посмотреть сообщение
Well done!
Thanks you guys!


Re: Advanced Spectate System - Lorenc_ - 14.06.2017

Well done!


Re: Advanced Spectate System - Daymen - 17.06.2017

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Well done!
Cheers!


Re: Advanced Spectate System - HydraHumza - 17.06.2017

That's something I was working for a long ago for my server But stopped on 60%. As playing sa-mp is a miracle for now.


Re: Advanced Spectate System - saffierr - 19.06.2017

Nice filterscript!


Re: Advanced Spectate System - Nakul - 21.06.2017

Nice spectate system.


Re: Advanced Spectate System - Astralis - 22.06.2017

Useful.


Re: Advanced Spectate System - Dayrion - 23.06.2017

Can you put pastebin link?


Re: Advanced Spectate System - LinardsLiepins - 23.06.2017

Definitely trying it out.
Well done.


Re: Advanced Spectate System - iLearner - 23.06.2017

Not really advanced though.


Re: Advanced Spectate System - Daymen - 26.06.2017

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Not really advanced though.
It's advanced compared to the simple spectate system that doesn't save any values. It's for a set gamemode that actually utilizes this type of information to be saved.


Re: Advanced Spectate System - Matthew57 - 29.06.2017

Lol you posted the first link in ad.fly go get a job lmao