30.03.2010, 17:30
Quote:
Originally Posted by $ЂЯĢ
Label needs to be created under OnPlayerSpawn, otherwise it will work only for the first time (since you delete it under OnPlayerProtectionOff and if player spawns again there won't be any label).
'protection' time is constant, so it's useless to make it variable (just make #define PROTECTIONTIME 5000). It's also good idea to desync player while being under protection (return ' under OnPlayerUpdate) otherwise possible spawnkillers can simply follow that palyer for those 5 seconds and kill afterwards. Oh and make that protected palyer can't use weapons during that time (SetPlayerArmedWeapon). This is how I'd do it: http://pawn.pastebin.com/ZjcT5RCD |
but it works just fine the way i made it so i wont change it.