30.08.2016, 20:05
That's not how switch works: https://sampwiki.blast.hk/wiki/Control_Structures#switch
I also fixed your message size (too small) and your playerids.
You were mixing between them and for some reason you were use a new variable (which was equal to 0)
pawn Код:
if(issuerid != INVALID_PLAYER_ID && bodypart == BODY_PART_HEAD)
{
new szMessage[60];
SetPlayerHealth(playerid, 0);
format(szMessage, sizeof(szMessage), "[(!)]%s has killed you by a headshot!", GetPlayerNameEx(issuerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMessage);
format(szMessage, sizeof(szMessage), "[(!)]You killed %s with a headshot!", GetPlayerNameEx(playerid));
SendClientMessageEx(issuerid, COLOR_LIGHTBLUE, szMessage);
}
You were mixing between them and for some reason you were use a new variable (which was equal to 0)