Probleme with the Team Kill - 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: Probleme with the Team Kill (
/showthread.php?tid=279498)
Probleme with the Team Kill -
ServerScripter - 27.08.2011
Hi guys, First of all , i hope the Website is Open ...
i madded whene someone kill an other Player in his Team (he Dead+ get -2000$ and -10Score)
But my Problem is The Killer +the Killed Player Get Dead+ get -2000$ and -10Score
i want Only punish the Killer only not the killed Person :
this is my code:
pawn Code:
if(gTeam[killerid] == gTeam[playerid]) {
////This is the Team Kill ////////
SendDeathMessage(killerid,playerid,reason);
SetPlayerHealth(killerid, 0);
SetPlayerScore(killerid,GetPlayerScore(killerid)-10);
GivePlayerMoney(playerid, -2000);
GameTextForPlayer(playerid,"-2000$ and -10Score for Team Kill !",1,1);
Re: Probleme with the Team Kill -
[MG]Dimi - 27.08.2011
PHP Code:
GivePlayerMoney(playerid, -2000);
GameTextForPlayer(playerid,"-2000$ and -10Score for Team Kill !",1,1);
to
PHP Code:
GivePlayerMoney(killerid, -2000);
GameTextForPlayer(killerid,"-2000$ and -10Score for Team Kill !",1,1);
Re: Probleme with the Team Kill -
ServerScripter - 27.08.2011
Thank you a lot Dimi ! i will test it now
Re: Probleme with the Team Kill -
Amel_PAtomAXx - 27.08.2011
pawn Code:
if(gTeam[killerid] == gTeam[playerid])
{
SendDeathMessage(killerid,playerid,reason);
SetPlayerHealth(killerid, 0);
SetPlayerScore(killerid,GetPlayerScore(killerid)-10);
GivePlayerMoney(killerid, -2000);
GameTextForPlayer(killerid,"~r~-2000$ ~w~and ~r~-10Score ~w~for Team ~r~Kill !",1500,5);
return 1;
}
Re: Probleme with the Team Kill -
[MG]Dimi - 27.08.2011
No problem