death bug plz help
#1

ok so what happens is when you kill somebody not in a dm works fine you killed a player and gain 75k but when you go into a deathmatch on the right it sends the deathmsg twice and it says


You Have Killed A Player And Gained 75K
you killed somebody in mac

and its for all dms cant fix it you can pm me for the ip and il show u thanks heres the onplayerdeath code

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(dildo[playerid] == 1)
  {
  SendDeathMessage(killerid, playerid, reason);
  SendClientMessage(killerid, 0xFF0000FF, "You killed somebody in dildo ");
  new name[MAX_PLAYER_NAME], string[128];
  GetPlayerName(playerid, name, sizeof(name));
  format(string, sizeof(string), "%s {F3FF02}Has Died In {FF00EA}Dildo {00C0FF}Deathmatch{F81414}!",name);
  SendClientMessageToAll(0xFFFF00AA, string);
  dildo[playerid] = 0;
  }
  if(minig[playerid] == 1)
  {
  SendDeathMessage(killerid, playerid, reason);
  SendClientMessage(killerid, 0xFF0000FF, "You killed somebody in minigun");
  new name[MAX_PLAYER_NAME], string[128];
  GetPlayerName(playerid, name, sizeof(name));
  format(string, sizeof(string), "%s {F3FF02}Has Died In {FF00EA}Minigun {00C0FF}Deathmatch{F81414}!",name);
  SendClientMessageToAll(0xFFFF00AA, string);
  minig[playerid] = 1;
  }
  if(macdm[playerid] == 1)
  {
  SendDeathMessage(killerid, playerid, reason);
  SendClientMessage(killerid, 0xFF0000FF, "you killed somebody in mac");
  new name[MAX_PLAYER_NAME], string[128];
  GetPlayerName(playerid, name, sizeof(name));
  format(string, sizeof(string), "%s {F3FF02}Has Died In {FF00EA}Mac {00C0FF}Deathmatch{F81414}!",name);
  SendClientMessageToAll(0xFFFF00AA, string);
  macdm[playerid] = 1;
  }
  else
  {
  SendDeathMessage(killerid, playerid, reason);
  SendClientMessage(killerid, 0xFF0000FF, "You Have Killed A Player And Gained 75K");
  GivePlayerMoney(killerid,75000);
  }
  return 1;
}
it compiles fine tho thankyou!!

Remember if i dint explane it good pm me and il give u ip and u can see 4 ya self ty
Reply
#2

just use else if after the first if
Reply
#3

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
just use else if after the first if
tryed that gets MADLY Bugged dont worry i made a spawn[playerid = 0; and stuff and got it working thanks 4 the reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)