[HELP] Check this code
#1

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if((weaponid == 0) && (gTeam[issuerid] == 8) && (gTeam[issuerid] == 9) && (gTeam[issuerid] == 10))
{
             new Float:Health, Float:a;
             GetPlayerArmour(playerid,a);
             if(a > 0)
             {
                SetPlayerArmour(playerid, a-10);
                InfectionTime[playerid] = 0;
                SetTimer("infectiontimer", 1000, true);//starts infection
                IsInfected[playerid] = 1;
             }
             else
             {
                GetPlayerHealth(playerid,Health);
                SetPlayerHealth(playerid, Health-4);
                GetPlayerHealth(issuerid,Health);
                if(Health < 100) SetPlayerHealth(issuerid, Health+6);
                InfectionTime[playerid] = 0;
                SetTimer("infectiontimer", 1000, true);//starts infection
                IsInfected[playerid] = 1;
             }

}
    return 1;
}
I made this code , so i only be sure if it work , so Teams 8 & 9 & 10 are Zombies .
Questions:

1-As i thought , issuerid = Zombies (or player who give dammage , or punch player)
playerid=Survivors (playerid reffers to players who get dammage the punched ones).
is it Correct ?

2-This is what the script will do :
if a player is a part of Team 8 or Team 9 or Team 10 , and punch a player (weaponid 0) , the Punched Players(playerid) will lose health & armour. & start a timer for them.
are those things will happen?(i didn't spoke about armour..)
Thank you
Reply


Messages In This Thread
[HELP] Check this code - by Saw® - 20.06.2012, 23:29
Re: [HELP] Check this code - by Jonny5 - 21.06.2012, 01:03
Re: [HELP] Check this code - by DeathTone - 21.06.2012, 01:07
Re: [HELP] Check this code - by Saw® - 21.06.2012, 01:31
Re: [HELP] Check this code - by Geeboi_Mehdi - 21.06.2012, 01:35
Re: [HELP] Check this code - by DeathTone - 21.06.2012, 01:42
Re: [HELP] Check this code - by Saw® - 21.06.2012, 01:44
Re: [HELP] Check this code - by DeathTone - 21.06.2012, 01:49
Re: [HELP] Check this code - by Geeboi_Mehdi - 21.06.2012, 01:49
Re: [HELP] Check this code - by Saw® - 21.06.2012, 01:50

Forum Jump:


Users browsing this thread: 1 Guest(s)