Thread: [FF2] Player Shields (Help)
View Single Post
Wliu
Veteran Member
Join Date: Apr 2013
Old 08-02-2016 , 12:26   Re: Player Shields (Help)
Reply With Quote #4

You'll have to create a new global array, something like new shieldsLeft[MAXPLAYERS + 1]. Then somewhere reasonable (CheckItems, MakeNotBoss, something like that) assign however many shield hits you want to everyone.

Then change this bit of code to the following:
Code:
if(shield[client] && shieldsLeft[client] && damage) {     shieldsLeft[client]--;     if(!shieldsLeft[client])     {         RemoveShield(client, attacker, position);     }     return Plugin_Handled; }

And finally, make sure to reset shieldsLeft to 0 at the end of each round (or beginning).
__________________
~Wliu
Wliu is offline