[PLEASE NEED HELP] What's wrong with this?
#5

How much armour does he get after you bit when his armour is gone?

pawn Код:
dcmd_bit(playerid, params[])
{
             new Float:Health, Float:a;
             GetPlayerArmour(playerid,a);
             if(a > 0)
             {
                SetPlayerArmour(playerid, a-10);
                GameTextForPlayer(playerid,"A ~r~zombie ~w~ hits your ~g~armour ~w~!",2000,4);
             }
             else if(a > 0 && a < 10)
             {
                SetPlayerArmour(playerid, 0);
                GameTextForPlayer(playerid,"A ~r~zombie ~w~ hits your ~g~armour, your armour is now gone! RUN! ~w~!",2000,4);
             }
             else if (IsInfected[playerid] == 0 && a <= 0)
             {
                GetPlayerHealth(playerid,Health);
                SetPlayerHealth(playerid, Health-5);
                InfectionTime[playerid] = 0;
                StopTimer[playerid] = SetTimer("infectiontimer", 1000, true);//starts infection
                IsInfected[playerid] = 1;
                GameTextForPlayer(playerid,"A ~r~zombie ~w~ hits you !",2000,4);
             }
             else
             {
             GetPlayerHealth(playerid,Health);
             SetPlayerHealth(playerid, Health-5);
             GameTextForPlayer(playerid,"A ~r~zombie ~w~ hits you !",2000,4);
             }
}
return 1;
}
Try this.
Reply


Messages In This Thread
[PLEASE NEED HELP] What's wrong with this? - by Saw® - 21.06.2012, 15:50
Re: [PLEASE NEED HELP] What's wrong with this? - by Saw® - 21.06.2012, 16:58
Re: [PLEASE NEED HELP] What's wrong with this? - by judothijs - 21.06.2012, 17:50
Re: [PLEASE NEED HELP] What's wrong with this? - by Saw® - 21.06.2012, 18:59
Re: [PLEASE NEED HELP] What's wrong with this? - by judothijs - 21.06.2012, 19:34
Re: [PLEASE NEED HELP] What's wrong with this? - by Saw® - 21.06.2012, 19:45

Forum Jump:


Users browsing this thread: 1 Guest(s)