19.10.2014, 07:48
Introduction
So i'm trying to figure out these death reasons for my gamemode.
But it doesn't display anything neither i get any errors / warnings on pawno.
That's the code, the problem is it doesn't show anything when i die.
EDIT: Forgot to add this https://sampwiki.blast.hk/wiki/Weapons
I used cases from there.
So i'm trying to figure out these death reasons for my gamemode.
But it doesn't display anything neither i get any errors / warnings on pawno.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
PInfo[playerid][Deaths]++;
PInfo[killerid][Kills]++;
new weapname[50];
new string[128];
GetWeaponName(GetPlayerWeapon(killerid), weapname, sizeof(weapname));
switch (reason)
{
case 49:
{
format(string, sizeof(string), "~r~%s~w~ got ~r~hit by a vehicle.", GetPName(playerid));
SendClientMessageToAll(COL_RED, string);
}
case 50:
{
format(string, sizeof(string), "~r~%s~w~ got ~r~Heli-bladed.", GetPName(playerid));
SendClientMessageToAll(COL_RED, string);
}
case 51:
{
format(string, sizeof(string), "~r~%s~w~ has ~r~died in explosion.", GetPName(playerid));
SendClientMessageToAll(COL_RED, string);
}
case 53:
{
format(string, sizeof(string), "~r~%s~w~ has ~r~drowned.", GetPName(playerid));
TextDrawSetString(Killpopup1, string);
}
case 54:
{
format(string, sizeof(string), "~r~%s~w~ has ~r~fell to death.", GetPName(playerid));
SendClientMessageToAll(COL_RED, string);
}
default:
{
format(string, sizeof(string), "~r~%s~w~ has died.", GetPName(playerid));
SendClientMessageToAll(COL_RED, string);
}
}
return 1;
}
EDIT: Forgot to add this https://sampwiki.blast.hk/wiki/Weapons
I used cases from there.