12.05.2009, 21:08
Heyy, First post so be nice lol
My server is a TDM server and there is two teams. When you kill a memberof the other team you get exp and 500$. But if you team kill you get -1000$. The problem is that when you team kill you also get 500$ and experince.
Here's the code: }
if (Eastteam[playerid] == Eastteam[killerid] ) // Easteam Team Kill
{
SendClientMessage(killerid, COLOR_RED, "Do not Team Kill (-1000 Money)");
GivePlayerMoney(killerid,-1000);
}
if (WestTeam[playerid] == WestTeam[killerid] ) // WestTeam team Kill
{
SendClientMessage(killerid, COLOR_RED, "Do not Team Kill(-1000)");
GivePlayerMoney(killerid,-1000);
}
if (WestTeam[playerid] == WestTeam[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 (Eastteam[playerid] == Eastteam[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);
}
SendDeathMessage(killerid, playerid, reason);
return 1;
}
If someone could help it would be great
My server is a TDM server and there is two teams. When you kill a memberof the other team you get exp and 500$. But if you team kill you get -1000$. The problem is that when you team kill you also get 500$ and experince.
Here's the code: }
if (Eastteam[playerid] == Eastteam[killerid] ) // Easteam Team Kill
{
SendClientMessage(killerid, COLOR_RED, "Do not Team Kill (-1000 Money)");
GivePlayerMoney(killerid,-1000);
}
if (WestTeam[playerid] == WestTeam[killerid] ) // WestTeam team Kill
{
SendClientMessage(killerid, COLOR_RED, "Do not Team Kill(-1000)");
GivePlayerMoney(killerid,-1000);
}
if (WestTeam[playerid] == WestTeam[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 (Eastteam[playerid] == Eastteam[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);
}
SendDeathMessage(killerid, playerid, reason);
return 1;
}
If someone could help it would be great