Killing ..
#1

Hello.
I have made teams.
I was just woundering how i could make, when England kills a German player the England guy gets +$1000
and the German player gets -$1000

Also the other way around.


Could you help me out? i have searched places but i cannot find.

I would be really greatful if you coud help.

Thanks!
Reply
#2

pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
 GivePlayerMoney(killerid, 1000);
 GiverPlayerMoney(playerid, -1000):
 return 1;
}
Just use that code if you only have two teams. But problem with this is every time they die even if they kill their self they will still lose -1000.
Reply
#3

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if (GetPlayerTeam(killerid == TEAM_GERMAN && GetPlayerTeam(playerid == TEAM_ENGLAND))
{
      GivePlayerMoney(killerid, 1000);
      GivePlayerMoney(playerid, -1000);
      return 1;
}
if (GetPlayerTeam(killerid == TEAM_ENGLAND && GetPlayerTeam(playerid == TEAM_GERMAN))
{
      GivePlayerMoney(killerid, 1000);
      GivePlayerMoney(playerid, -1000);
      return 1;
}
Hope it helps
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)