SA-MP Forums Archive
Onplayerdeath - 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: Onplayerdeath (/showthread.php?tid=412694)



Onplayerdeath - Youtube12 - 02.02.2013

Hi guys, i want a script in onplayerdeath, when u kill someone it will send you a gametext (gametextforplayer)
Example: u killed %d

Regards *******12


Re: Onplayerdeath - Sime30 - 02.02.2013

pawn Код:
new pname[MAX_PLAYER_NAME]
new kstring[128]; //killer message
    GetPlayerName(playerid, pname, sizeof(pname));
    format(kstring, sizeof(kstring), "~b~You killed %s",pname);
    GameTextForPlayer(killerid, kstring, 4000, 3);



Re: Onplayerdeath - spedico - 02.02.2013

^ No need for that large string. Well I am going to post mine aswell since I made it already..
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new String[40], pName[24];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(String, sizeof(String), "You killed ~r~%s!", pName);
    GameTextForPlayer(killerid, String, 6000, 6);
    return 1;
}



AW: Onplayerdeath - Youtube12 - 02.02.2013

Ok thank you