Send client message
#1

hello i use this on player death..

pawn Код:
new string_2[128];
    format(string_2, sizeof(string_2), "DEATH MESSAGE::{FF0000} %s Has Killed %d. (%s)", killerid, playerid, reason);
    SendClientMessageToAll(COLOR_MAROON, string_2);

i want like this: e.g
Код:
DEATH MESSAGE:: Anak Has Killed Omega. (Minigun)
but i what get IG
Код:
DEATH MESSAGE::{FF0000} яя Has Killed 0. (я)
please help me
Reply
#2

You pass an id as string which of coruse has no sense. Use GetPlayerName.
Reply
#3

Try something like this:
Код:
new string_2[128], wepname[32], killername[24], playername[24];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(killerid, killername, sizeof(killername));
GetWeaponName(reason, wepname, sizeof(wepname));

format(string_2, sizeof(string_2), "DEATH MESSAGE::{FF0000} %s Has Killed %s. (%s)", killername, playername, wepname);
SendClientMessageToAll(COLOR_MAROON, string_2);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)