13.06.2017, 05:30
(
Последний раз редактировалось Daymen; 13.06.2017 в 13:54.
)
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 )
You must have the following includes for this filterscript to work:
ZCMD
SSCANF
FOREACH
* 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
* 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.