Team Kill problem again
#1

Hey again, Thanks to those who helped me with my team kill problem before. Bassically there are two team and if you kill some from the other team you get ex + 500$. If you team kill you get -1000$. But it's saying "Don't team kill, -1000$." When you kill someone from the opposite team.

Here is the script:
public OnPlayerDeath(playerid, killerid, reason)
{
if (Eastteam[playerid] == 1 && reason == 54)
{
SendClientMessage(playerid, COLOR_RED, "You have lost 1000 Dollars for Suspected suicide, if ");
SendClientMessage(playerid, COLOR_RED, "this is a error in the Script, please report this to ");
SendClientMessage(playerid, COLOR_RED, "the forums (www.santos-gaming.net.tf) ");
GivePlayerMoney(playerid,-1000);
}

if (Eastteam[playerid] == Eastteam[killerid] ) // east Team Kill
{
SendClientMessage(killerid, COLOR_RED, "Do not Team Kill (-1000 Money)");
GivePlayerMoney(killerid,-1000);
}

if (WestTeam[playerid] == WestTeam[killerid] ) // west Team Kill
{
SendClientMessage(killerid, COLOR_RED, "Do not Team Kill(-1000)");
GivePlayerMoney(killerid,-1000);
return 1;
}

if (Eastteam[playerid] && WestTeam[killerid]) //west kill east
{
PlayerInfo[killerid][pExp] += 10;
PlayerInfo[playerid][pDeaths] += 1;
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+ 1;
SendClientMessage(killerid,COLOR_RED," You got 500$ for the kill and 10 EXP.");
GivePlayerMoney(killerid,500);
}

if (WestTeam[playerid] && Eastteam[killerid]) // east Kill west
{
PlayerInfo[killerid][pExp] += 10;
PlayerInfo[playerid][pDeaths] += 1;
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
SendClientMessage(killerid,COLOR_RED," You got 500$ for the kill and 10 EXP.");
GivePlayerMoney(killerid,500);
}



If you could help, It would be much appriciated.

Thankss
J@meZ..
Reply


Messages In This Thread
Team Kill problem again - by jamesb93 - 13.05.2009, 21:12
Re: Team Kill problem again - by Think - 13.05.2009, 21:25

Forum Jump:


Users browsing this thread: 2 Guest(s)