15.02.2014, 18:17
I've tried doing this several times, but never succeeded ;__;
Here's the script I've currently got:
(Ignore the first part)
I tried with the "newhealth = health" bla bla, but due to it it made the armour be removed, and health be set to 5 or something D:
Here's the script I've currently got:
(Ignore the first part)
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(gTeam[issuerid] != gTeam[playerid])
{
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
}
}
if(gTeam[issuerid] == gTeam[playerid])
{
if(issuerid != INVALID_PLAYER_ID)
{
if( !InGG{ issuerid } || !InWZ{ issuerid } || !InDuel{ issuerid } )
{
if( !AdminDuty{ issuerid } || !AdminDuty{ playerid } )
{
GameTextForPlayer(issuerid, "~r~Don't team-attack!", 3500, 3);
/*new Float:health, Float:newhealth;
health = GetPlayerHealth(playerid, health);
newhealth = health -= amount;
SetPlayerHealth(playerid, newhealth);
new Float:armour, Float:newarmour;
armour = GetPlayerArmour(playerid, armour);
armour = armour -= amount;
SetPlayerArmour(playerid, newarmour);*/
}
}
}
}
//Rest of script here