05.03.2009, 23:34
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
i want it to say for example:
Jonny (8
Has Killed Steve (45) With A Combat Shotgun.
if he uses a combat shotgun....
thanks.
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;
}
Jonny (8

if he uses a combat shotgun....
thanks.