PDA

View Full Version : Assist system


arlindi
15/07/2015, 10:03 AM
hello everyone i have created an assist system but i need some help in it

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;
}


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

arlindi
15/07/2015, 10:30 AM
AnyOne Please ? Thanks