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 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);
}
|
SendClientMessageEx(playerid, COLOR_YELLOW, string);
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);
}
if(killerid != INVALID_PLAYER_ID)
{
new 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));
SendClientMessageEx(playerid, COLOR_YELLOW, "you were killed by %s with weapons %s",KillerName,WeaponName);
SendClientMessageEx(killerid, COLOR_YELLOW, "you killed %s with weapons %s",VictimName,WeaponName);
}