20.06.2012, 23:29
(
Последний раз редактировалось Saw®; 21.06.2012 в 00:31.
)
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;
}
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