Death Message Weapon?
#1

i want to send a message on death with the gun the killer used

this is what i coded but no weapon appears, it just has a space

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  SendDeathMessage(killerid, playerid, reason);
  GetPlayerName(killerid, name, sizeof(name));
  GetPlayerName(playerid, dname, sizeof(dname));
  if(killerid != INVALID_PLAYER_ID){

        format(string, sizeof(string), "%s(%d) Has Killed %s(%d) With a %s.", name,killerid, dname,playerid,reason);
        SendClientMessageToAll(COLOR_RED, string);
    } else {
        format(string, sizeof(string), "%s (%d) Died.",dname,playerid);
        SendClientMessageToAll(COLOR_RED, string);
    }

    return 1;
}
i want it to say for example:

Jonny (8 Has Killed Steve (45) With A Combat Shotgun.

if he uses a combat shotgun....

thanks.
Reply
#2

'reason' is an integer not a string.
Reply
#3

GetWeaponName(reason)? that function is buggy though
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)