[NEED HELP]OnPlayerDeath...
#1

I have this code...

Код:
public OnPlayerDeath(playerid,killerid,reason)
{
  new str[128],playersname[24],killersname[24];
  GetPlayerName(playerid,playersname,24);
  GetPlayerName(killerid,killersname,24);
  format(str,sizeof(str),"%s has been killed by %s",playersname,killersname);
  SendClientMessage(playerid, COLOR_ORANGE,str);
  return 1;
}
Ok but i still haven't found when a player dies by himself it says me:
Someone has been killed by, and nothing else, someone is the playersname
Can i fix this?
Reply
#2

I am really soory for the bump but i need to fix this... please...
Reply
#3

pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
  if(killerid != INVALID_PLAYER_ID)
  {
    new str[80],name[2][MAX_PLAYER_NAME];
    GetPlayerName(playerid,name[0],MAX_PLAYER_NAME); GetPlayerName(killerid,name[1],MAX_PLAYER_NAME);
    format(str,sizeof(str),"%s has been killed by %s",name[0],name[1]); SendClientMessage(playerid, COLOR_ORANGE,str);
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)