Spec (TogglePlayerSpectating) Problem!
#7

@danish007 Bad Bad Bad wont work if more than 1 admin is specing.Moreover using timers is bad.You are executing code unnecessarily though the player does not change interior/state.

https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange
https://sampwiki.blast.hk/wiki/OnPlayerStateChange

When the interior changes for a player, the admin who is specing and the player will be in different interiors.Therefore the admin cannot see the player.

Make an array which stores the player id who is being speced for each admin.Loop through the array and check if the spec id matches with playerid(whose interior changed), if there was an admin specing that player then set the admins interior id to the players.Similarly do it in OnPlayerStateChange.You'll have to make an admin spec a vehicle (vehicle of the player who has to be spectated) rather than specing the player directly.
Reply


Messages In This Thread
Spec (TogglePlayerSpectating) Problem! - by Airman123 - 21.05.2015, 10:43
Re: Spec (TogglePlayerSpectating) Problem! - by Bailews - 21.05.2015, 10:46
Re: Spec (TogglePlayerSpectating) Problem! - by Airman123 - 21.05.2015, 10:48
Re: Spec (TogglePlayerSpectating) Problem! - by Konstantinos - 21.05.2015, 10:55
Re: Spec (TogglePlayerSpectating) Problem! - by Airman123 - 21.05.2015, 11:22
Re: Spec (TogglePlayerSpectating) Problem! - by danish007 - 24.05.2015, 08:00
Re: Spec (TogglePlayerSpectating) Problem! - by Yashas - 24.05.2015, 10:19

Forum Jump:


Users browsing this thread: 2 Guest(s)