health regeneration for my vip players.
#2

pawn Код:
new vip[MAX_PLAYERS]; //Variable for VIP

//under gamemode or fs init

SetTimerEx("VipHealth", 60000, true, "i", playerid); //every minute since the server start


forward VipHealth(playerid);
public VipHealth(playerid)
{
   if(vip[playerid] >= 1 && IsPlayerConnected(playerid)) // checks to see if the player is connect and is a vip
   {
     new Float: vHealth;//variable
     GetPlayerHealth(playerid, vHealth); // setting a value to vHealth which is = to the player health
     SetPlayerHealth(playerid, vHealth + 5); // Sets the player Health +5
   }
   return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)