15.07.2015, 10:03
hello everyone i have created an assist system but i need some help in it
HEre is the code
i wat to get assist just when i make damage from team human to team zombie
and also i want to get all assists of the player
Thanks
PHP код:
new assist[MAX_PLAYERS];
new Float:Tdamage[MAX_PLAYERS][MAX_PLAYERS];
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
Tdamage[playerid][damagedid]=Tdamage[playerid][damagedid]+amount;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
for(new i;i<=MAX_PLAYERS;i++)
{
if(Tdamage[i][playerid]>=50.0)
{
assist[i]++;
SendClientMessage(i,0x33AA33AA,"You gained an assist.");
if(assist[i]==2)
{
//kills[playerid]++;
SendClientMessage(i,0x33AA33AA,"You gained a kill for 2 assist's.");
Tdamage[i][playerid]=0;
}
}
}
return 1;
}
i wat to get assist just when i make damage from team human to team zombie
and also i want to get all assists of the player
Thanks