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;
public OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
uRes = 0;
uHeal = 0;
}
else if (uHeal == 2)
{
PrintToChat(param1, "Fullt HP (3/3)");
SetEntityHealth(param1, 100);
uHeal++;
}
else if (uHeal == 3)
{
PrintToChat(param1, "You've used all your heals!");
}