Quote:
Originally Posted by Shinja
Line? and show code above aswell
|
correction;
Utils/PlayerFunctions.pwn(110
: error 029: invalid expression, assumed zero
Utils/PlayerFunctions.pwn(110
: warning 215: expression has no effect
Utils/PlayerFunctions.pwn(110
: error 001: expected token: ";", but found "if"
Line 1108:
Код:
else if(pInfo[playerid][pBlood] <= 1000 && gettime() > BloodWarning[playerid] + 600)// 10 minutes
The whole part:
PHP код:
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;
}