SA-MP Forums Archive
Send client message - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Send client message (/showthread.php?tid=439079)



Send client message - Anak - 23.05.2013

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


AW: Send client message - HurtLocker - 23.05.2013

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


Re: Send client message - Yuup - 23.05.2013

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);