[5+REP] Blood Counter.
#1

my blood not counter, only count: Blood: 12000 and and does not rise or lower. [5REP+]

pawn Код:
format(string,sizeof(string),"Murders: 0~n~Bandits Killed: 0~n~Blood: %d~n~Players (Connected/Total): %i/200~n~Temperature: %02d |C~n~Weapon: %s(Ammo: %d)~n~Alive time: %02d:%02d~n~Name: %s",SpielerInfo[playerid][pBlood],ServerInfo[isPlayers],SpielerInfo[playerid][pTemparatur1],weps,GetPlayerAmmo(playerid),SpielerInfo[playerid][pAliveMinutes],SpielerInfo[playerid][pAliveSeconds],GetName(playerid));
Blood Counter
pawn Код:
}
        if(SpielerInfo[playerid][pBlood] >= 12000)PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],16711935),PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]),PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
        else if(SpielerInfo[playerid][pBlood] <= 8000 && SpielerInfo[playerid][pBlood] >= 4000)PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],0xFFB400FF),PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]),PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
        else if(SpielerInfo[playerid][pBlood] >= 1 && SpielerInfo[playerid][pBlood] <= 3999){
            PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],LIGHTGREEN);
            if(SpielerInfo[playerid][pBloodCounter] == 0)SpielerInfo[playerid][pBloodCounter]=1,PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]);
            else if(SpielerInfo[playerid][pBloodCounter] == 0)SpielerInfo[playerid][pBloodCounter]=0,PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
        }
        else if(SpielerInfo[playerid][pBlood] <= 1)SetPlayerHealth(playerid,0),PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],16711935),PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]),PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
Reply
#2

anyone?
Reply
#3

I do not see where you change the variable.
Reply
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
I do not see where you change the variable.
give one tip?
Reply
#5

Where do you change the blood variable?
Reply
#6

Quote:
Originally Posted by Abagail
Посмотреть сообщение
Where do you change the blood variable?
do not know why I'm asking you a hint of how to fix.
Reply
#7

anyone? i not uderstand the comments up.
Reply
#8

They want to know where do you change the variable "SpielerInfo[playerid][pBlood]"

Some examples
pawn Код:
SpielerInfo[playerid][pBlood] += 5;
SpielerInfo[playerid][pBlood]++;
SpielerInfo[playerid][pBlood]--;
because the code you gave only shows the textdraws which are irrelevant
Reply
#9

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
They want to know where do you change the variable "SpielerInfo[playerid][pBlood]"

Some examples
pawn Код:
SpielerInfo[playerid][pBlood] += 5;
SpielerInfo[playerid][pBlood]++;
SpielerInfo[playerid][pBlood]--;
because the code you gave only shows the textdraws which are irrelevant
oh sure but u will help me? +1 rep for you
pawn Код:
Onplayerconnect

SpielerInfo[playerid][pBlood] = 12000;
SpielerInfo[playerid][pBloodCounter] = 0;

OnplayerDeath
SpielerInfo[playerid][pBlood]=12000;

...
        if(SpielerInfo[playerid][pBlood] >= 12000)PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],16711935),PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]),PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
        else if(SpielerInfo[playerid][pBlood] <= 8000 && SpielerInfo[playerid][pBlood] >= 4000)PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],0xFFB400FF),PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]),PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
        else if(SpielerInfo[playerid][pBlood] >= 1 && SpielerInfo[playerid][pBlood] <= 3999){
            PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],LIGHTGREEN);
            if(SpielerInfo[playerid][pBloodCounter] == 0)SpielerInfo[playerid][pBloodCounter]=1,PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]);
            else if(SpielerInfo[playerid][pBloodCounter] == 0)SpielerInfo[playerid][pBloodCounter]=0,PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
        }
        else if(SpielerInfo[playerid][pBlood] <= 1)SetPlayerHealth(playerid,0),PlayerTextDrawColor(playerid,DayZ_Anzeige4[playerid],16711935),PlayerTextDrawHide(playerid,DayZ_Anzeige4[playerid]),PlayerTextDrawShow(playerid,DayZ_Anzeige4[playerid]);
only have it, if is incorrect what i have put to work?
Reply
#10

You aren't decreasing it anywhere, just setting it to 12000.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)