Probleme with the Team Kill
#1

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);
Reply
#2

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); 
Reply
#3

Thank you a lot Dimi ! i will test it now
Reply
#4

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;
}
Reply
#5

No problem
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)