AntiTeamKill with gTeam - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: AntiTeamKill with gTeam (
/showthread.php?tid=215479)
AntiTeamKill with gTeam -
buzifej - 23.01.2011
how to abuse it?
Re: AntiTeamKill with gTeam -
HyperZ - 23.01.2011
Want Anti-Team Kill?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
} else {
if(gTeam[killerid] != gTeam[playerid])
{
// Valid kill
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 1000);
}
else
{
//Team Killer!
new warning[256];
format(warning, sizeof(warning), "Be careful! You have been punished for teamkilling.");
SendClientMessage(killerid, 0xFFFF00AA, warning);
SendDeathMessage(killerid,playerid,reason);
GivePlayerMoney(killerid, -1000);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
}
return 1;
}
Re: AntiTeamKill with gTeam -
buzifej - 23.01.2011
and how to use?
ToggleFriendlyFire?
Re: AntiTeamKill with gTeam -
The_Moddler - 23.01.2011
SetPlayerTeam.
Re: AntiTeamKill with gTeam -
buzifej - 23.01.2011
it's please write
Re: AntiTeamKill with gTeam -
Mike Garber - 23.01.2011
Quote:
Originally Posted by buzifej
how to abuse it?
|
Why would you wanna abuse It?
*This forum requires that you wait 60 seconds between posts. Please try again in 5 seconds.*