21.02.2018, 13:19
So..I want to sync player health and armour. When they aren't synchronized by the SA-MP or whatever.
So I made 2 variables where I stored the player last health and armour.
and when I finish checking I use SetPlayerHealth/Armour...
So basically, when a player change his VW to anoter VW where a Player is AFK (they aren't sync) so I want to do when the player that isn't AFK shoot in player that is AFK to take damage (default the player doesn't take DMG).
So I made this script, in OnPlayerGiveDamage: https://pastebin.com/jgXh60cn
And OnPlayerUpdate: https://pastebin.com/bVwWTBHC
I tested on my server and nothing happend, like before, when they aren't sync , the player AFK still doesn't take dmg.
So I made 2 variables where I stored the player last health and armour.
and when I finish checking I use SetPlayerHealth/Armour...
So basically, when a player change his VW to anoter VW where a Player is AFK (they aren't sync) so I want to do when the player that isn't AFK shoot in player that is AFK to take damage (default the player doesn't take DMG).
So I made this script, in OnPlayerGiveDamage: https://pastebin.com/jgXh60cn
And OnPlayerUpdate: https://pastebin.com/bVwWTBHC
I tested on my server and nothing happend, like before, when they aren't sync , the player AFK still doesn't take dmg.