Last kill does not work
#2

Quote:
Originally Posted by skiplovebra
Посмотреть сообщение
I added this line under onplayerdeath When the player is killed sends a message to that person someone can help me fix it
Код:
if(killerid != INVALID_PLAYER_ID)
 	{
		new string[156],WeaponName[24],VictimName[MAX_PLAYER_NAME],KillerName[MAX_PLAYER_NAME];
		GetPlayerName(playerid, VictimName, sizeof (VictimName));
		GetPlayerName(killerid, KillerName, sizeof (KillerName));
  		GetWeaponName(GetPlayerWeapon(killerid), WeaponName, sizeof (WeaponName));
  		format(string, sizeof(string),"you were killed by %s with weapons %s",KillerName,WeaponName);
  		SendClientMessageEx(COLOR_YELLOW,playerid,string);
  		format(string, sizeof(string),"you killed %s with weapons %s",VictimName,WeaponName);
  		SendClientMessageEx(COLOR_YELLOW,killerid,string);
    }
I'm not sure if you intentionally changed the order of arguments of SendClientMessageEx, but usually SendClientMessage should be called like this:

Код:
SendClientMessageEx(playerid, COLOR_YELLOW, string);
(color and playerid are swapped)
Reply


Messages In This Thread
Last kill does not work - by skiplovebra - 22.09.2018, 03:48
Re: Last kill does not work - by NaS - 22.09.2018, 04:48
Re: Last kill does not work - by skiplovebra - 22.09.2018, 05:07
Re: Last kill does not work - by TheToretto - 22.09.2018, 10:36

Forum Jump:


Users browsing this thread: 1 Guest(s)