Raised This Month: $7 Target: $400
 1% 

FF2 Player Shields (Help)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tetradox
Junior Member
Join Date: Aug 2016
Old 08-02-2016 , 00:40   Player Shields (Help)
Reply With Quote #1

Hello, i decided to make freak fortress 2 server and i'm adding little new things to it, so i was wondering if its possible to add more shields to the demo/sniper so they last longer, like 3 boss hits, by editing the plugin. Also i'm a newbie at this but i kind of know how it works, help is appreciated, thanks

Last edited by Tetradox; 08-02-2016 at 00:45.
Tetradox is offline
zyox123cc
Senior Member
Join Date: Jul 2016
Location: spycrab
Old 08-02-2016 , 03:32   Re: Player Shields (Help)
Reply With Quote #2

ok
zyox123cc is offline
93SHADoW
AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
Old 08-02-2016 , 11:36   Re: Player Shields (Help)
Reply With Quote #3

Yeah, it's possible
__________________
93SHADoW is offline
Send a message via AIM to 93SHADoW Send a message via Skype™ to 93SHADoW
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
Tetradox
Junior Member
Join Date: Aug 2016
Old 08-02-2016 , 19:25   Re: Player Shields (Help)
Reply With Quote #5

Thank you so much!, i got it to work right now and added the backstab sound effect to every hit, also thanks for the fast answer
Tetradox is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode