Assist system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Assist system (
/showthread.php?tid=581734)
Assist system -
arlindi - 15.07.2015
hello everyone i have created an assist system but i need some help in it
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;
}
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
Re: Assist system -
arlindi - 15.07.2015
AnyOne Please ? Thanks