Storing a variable for each player
Hi!
I'm making a vip plugin for my community and in there i want to have so each VIP player can respawn/heal only 3 times per round. I have gotten it to work the way i wanted with resets each round and all. BUT it's global. So if player 1 uses heal then player 2 only has 2 left ect. I want it to be 3 heals for each player and not for every player together. So my question is: How can i store a variable for each player? Example bit of my code (Stitched together, not actual layout) Code:
new uRes, uHeal; |
Re: Storing a variable for each player
I don't have any knowlage in tf2 plugins but this should work:
PHP Code:
|
Re: Storing a variable for each player
Well that seems to work only i get "undefined symbol "client"".
I can't seem to figure out why, if it's a spelling error or similar? |
Re: Storing a variable for each player
Learn about arrays and look for examples later.
|
Re: Storing a variable for each player
You create global array, loop array indexs on round start.
PHP Code:
|
| All times are GMT -4. The time now is 12:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.