SA-MP Forums Archive
[5+REP] Blood Counter. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [5+REP] Blood Counter. (/showthread.php?tid=567471)



[5+REP] Blood Counter. - StarPeens - 14.03.2015

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]);



Re: [5+REP] Blood Counter. - StarPeens - 14.03.2015

anyone?


Re: [5+REP] Blood Counter. - Abagail - 14.03.2015

I do not see where you change the variable.


Re: [5+REP] Blood Counter. - StarPeens - 14.03.2015

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


Re: [5+REP] Blood Counter. - Abagail - 14.03.2015

Where do you change the blood variable?


Re: [5+REP] Blood Counter. - StarPeens - 14.03.2015

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.


Re: [5+REP] Blood Counter. - StarPeens - 15.03.2015

anyone? i not uderstand the comments up.


AW: [5+REP] Blood Counter. - Nero_3D - 15.03.2015

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


Re: AW: [5+REP] Blood Counter. - StarPeens - 15.03.2015

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?


Re: [5+REP] Blood Counter. - CalvinC - 15.03.2015

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