else if(pInfo[playerid][pBlood] <= 1000) { SendClientMessage(playerid,-1,"*"COL_RED" You have low amount of blood! Use a blood bag or a medical kit to replenish your health!"); }
new BloodWarning[MAX_PLAYERS];
else if(pInfo[playerid][pBlood] <= 1000 && gettime() > BloodWarning[playerid] + 600)// 10 minutes
{
SendClientMessage(playerid,-1,"*"COL_RED" You have low amount of blood! Use a blood bag or a medical kit to replenish your health!");
BloodWarning[playerid]=gettime();
}
PHP код:
|
else if(pInfo[playerid][pBlood] <= 1000 && gettime() > BloodWarning[playerid] + 600)// 10 minutes
CheckBars(playerid)
{
if(pInfo[playerid][pIsPlayerSpawned] == true && pInfo[playerid][pIsPlayerInMenu] == false)
{
if(pInfo[playerid][pHunger] <= 0)
{
new str[65];
format(str,sizeof(str),"* "COL_GREY" %s has starved to death!", pInfo[playerid][pUsername]);
SendNearbyMessage(60.0, playerid, str, -1);
SendClientMessage(playerid,-1,"*"COL_GREY" You starved to death!");
SetPlayerHealth(playerid, 0.0);
}
else if(pInfo[playerid][pThirst] <= 0)
{
new str[65];
format(str,sizeof(str),"* "COL_GREY" %s has died of thirst!", pInfo[playerid][pUsername]);
SendNearbyMessage(60.0, playerid, str, -1);
SendClientMessage(playerid,-1,"*"COL_GREY" You died of thirst!");
SetPlayerHealth(playerid, 0.0);
}
else if(pInfo[playerid][pBlood] <= 0)
{
new str[65];
format(str,sizeof(str),"* "COL_GREY" %s has died of blood loss!", pInfo[playerid][pUsername]);
SendNearbyMessage(60.0, playerid, str, -1);
SendClientMessage(playerid,-1,"*"COL_GREY" You died of blood loss!");
SetPlayerHealth(playerid, 0.0);
}
else if(pInfo[playerid][pTemperature] <= 0.0)
{
new str[65];
format(str,sizeof(str),"* "COL_GREY" %s has frozen to death!", pInfo[playerid][pUsername]);
SendNearbyMessage(60.0, playerid, str, -1);
SendClientMessage(playerid,-1,"*"COL_GREY" You froze to death!");
SetPlayerHealth(playerid, 0.0);
}
new BloodWarning[MAX_PLAYERS];
else if(pInfo[playerid][pBlood] <= 1000 && gettime() > BloodWarning[playerid] + 600)// 10 minutes
{
SendClientMessage(playerid,-1,"*"COL_RED" You have low amount of blood! Use a blood bag or a medical kit to replenish your health!");
BloodWarning[playerid]=gettime();
}
}
return 1;
}
else if(pInfo[playerid][pBlood] <= 1000 && gettime() > (BloodWarning[playerid] + 600))// 10 minutes
new BloodWarning[MAX_PLAYERS]; Must be at top of script not inside the function
|