[FilterScript] Advanced Spectate System
#1





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:
  • 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
****** - SSCANF
****** - FOREACH
SA-MP Team


Reply
#2

Screenshots would be appreciated.
Reply
#3

Nice
Reply
#4

nvm - issue fixed.
Reply
#5

He fixed it.
Reply
#6

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

Well done!
Reply
#8

Threads links were fixed, sorry for the inconvenience.

Screenshots added as well.
Reply
#9

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

Well done!
Reply
#11

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

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.
Reply
#13

Nice filterscript!
Reply
#14

Nice spectate system.
Reply
#15

Useful.
Reply
#16

Can you put pastebin link?
Reply
#17

Definitely trying it out.
Well done.
Reply
#18

Not really advanced though.
Reply
#19

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.
Reply
#20

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


Forum Jump:


Users browsing this thread: 2 Guest(s)